Differences between interrupt service routine (ISR) and a subroutine

Started by 2005 in comp.arch.embedded11 years ago 36 replies

Hi What are the differences between ISR and a subroutine in embedded systems, how about the following: - interrupts are disabled by the...

Hi What are the differences between ISR and a subroutine in embedded systems, how about the following: - interrupts are disabled by the microprocessor prior to calling the isr - isr's are always smaller - an isr cannot be written in C - a subroutine always has arguments - the CPU flags are stored on the stack in addition to the return address Thanks


writing ISR for UART

Started by sohagiut in comp.arch.embedded9 years ago 26 replies

hy, i am not very expert in C. Can any one give me a sample example on ISR for UART.i am using MPLAB with c18. how to write IRQ in ISR. also how...

hy, i am not very expert in C. Can any one give me a sample example on ISR for UART.i am using MPLAB with c18. how to write IRQ in ISR. also how can i add "case" in side ISR? can any one give me any tips or any link. thanks in advance


Using ISR() Macro in AVR-GCC

Started by Vivek B in comp.arch.embedded9 years ago 8 replies

Hi folks, My code is handling both timer0 interrupt and SPI interrupt. And I don't want to loose any of the SPI interrupts and hence thought...

Hi folks, My code is handling both timer0 interrupt and SPI interrupt. And I don't want to loose any of the SPI interrupts and hence thought of making the timer0 ISR to work in NOBLOCK mode. But when i use ISR(TIMER0_COMP_vect, ISR_NOBLOCK) { /* Code */ } the compiler gives an error: "macro "ISR" passed 2 arguments, but takes just 1" where it works fine for ISR(TIMER0_COMP_vec...


Why ISR contains no arguments and return type is void

Started by sudheervemana in comp.arch.embedded13 years ago 11 replies
ISR

HI all, Can any one clear me why cant we pass the arguments to an ISR and also why the ISR returns nothing. With...

HI all, Can any one clear me why cant we pass the arguments to an ISR and also why the ISR returns nothing. With Regards, Sudheervemana.


DUART ISR

Started by Vasilios Dimos in comp.arch.embedded13 years ago 1 reply

Hello all, i am currently working on a development board with the ST10 and a NS16c552 duart with 16Byte FIFO. I am trying to use the duart to...

Hello all, i am currently working on a development board with the ST10 and a NS16c552 duart with 16Byte FIFO. I am trying to use the duart to connect to a bluetooth module. I am having some difficulties and with the DUART ISR, which causes some unpredictable behaviour, and i was wondering if anyone has some experience with this duart ? I am writing the ISR in c for the tasking compiler, and...


BREAK module on a 68HC908

Started by Yvan BOURNE in comp.arch.embedded13 years ago 2 replies

Hi, I try to use the BREAK module on a 68HC908KX8. On my first compare, the software go inside the SWI isr, no problem. Inside my SWI isr,...

Hi, I try to use the BREAK module on a 68HC908KX8. On my first compare, the software go inside the SWI isr, no problem. Inside my SWI isr, I send some bytes by the SCI, and I've received a special byte to exit the isr (with a RTI). My software return in the main loop, but never return inside the SWI isr at the next match between the register BRK and the internal address bus (the bit B...


Wrong return address in ISR with GCC

Started by Erik Larsson in comp.arch.embedded10 years ago 5 replies

Hi! I've found a strange thing when using interrupts with GCC. When I compile the code and run it GCC tends to change the code depending in...

Hi! I've found a strange thing when using interrupts with GCC. When I compile the code and run it GCC tends to change the code depending in the content of the ISR-routine. When the interrupt occurs the return address + 0x04 is stored in lr register. This is as it should be. The first thing that happens in the ISR is a SUBS lr, lr, #0x04 to get the correct return address. The the ISR will...


C6713 DSK issue

Started by ratemonotonic in comp.arch.embedded9 years ago

Hi All , I am starting off using the C6713 DSK (latest rev D). I am having some problems sampling and doing some signal processing in the ISR....

Hi All , I am starting off using the C6713 DSK (latest rev D). I am having some problems sampling and doing some signal processing in the ISR. If I add 1) two multipliers 2) 2 FIR filters( both 31 taps) 3) downconverter into the ISR, then it looks like the DSP is not having enough time between sample and hence missing out a lot of samples. The ISR I am trying out is from a DSP book for d...


regarding ISR

Started by alee...@gmail.com in comp.arch.embedded9 years ago 22 replies

can i allocate dynamic memory in ISR ?? If yes wat shd be the precautions i need to take care ??

can i allocate dynamic memory in ISR ?? If yes wat shd be the precautions i need to take care ??


Nested interrupt

Started by thiru_vid in comp.arch.embedded8 years ago 6 replies

Timer1 ISR _______________________________________________________________ | | | |___________ ...

Timer1 ISR _______________________________________________________________ | | | |___________ Timer 3 ISR _________ _________ ________ _________ ________ | | | | | | | | | |


SCI Interrupt on freescale HCS12XDP512 - CodeWarrior + ProcessorExpert

Started by Florian E. Teply in comp.arch.embedded9 years ago 3 replies

Hey Folks, Right now i'm trying to fix a problem i got with an Interrupt Service Routine created by ProcessorExpert and CodeWarrior: The...

Hey Folks, Right now i'm trying to fix a problem i got with an Interrupt Service Routine created by ProcessorExpert and CodeWarrior: The ISR loses received chars (as in not calling the appropriate Event Handler) when the reception of that char is finished while the transmit-ISR is running. As far as i can tell, this happens because the transmit-ISR clears a status register which also co...


how to ISR code with lesser memory usage(Urgent)

Started by lallisidhu in comp.arch.embedded9 years ago 6 replies

Hi all, Could anybody help me or guide me to write a better ISR code which uses lesser memory and compiles smaller hex file.The problem I am...

Hi all, Could anybody help me or guide me to write a better ISR code which uses lesser memory and compiles smaller hex file.The problem I am facing is if I use too many 'if else' conditions in my ISR the hex file compiles shoots to 18Kb whereas if i use one or two conditions only the hex file is around 5Kb .I want my compiled Hex file to be around 8-10 Kb.Below is my code of ISR. // ******...


How to write an ISR in UCOS-ii

Started by Prakhar in comp.arch.embedded10 years ago 3 replies

Hello, I am developing a program which creates many tasks, schedules them and responds to external interrupts, when they ouccr. In my program...

Hello, I am developing a program which creates many tasks, schedules them and responds to external interrupts, when they ouccr. In my program in UCOS-ii, I have enabled the external interrupts (the values of the resgisters are set correspondingly). Now, I want to write the interrupts handler for this ext interrupt., i.e, an ISR. I tried the following ISR with an intention to write an ex...


LPC1768 copy & execute isr from sram

Started by navman in comp.arch.embedded6 years ago 2 replies

Hi, Is there any example code to make the ISR to run out of SRAM. I know that it involves the following steps: 1) Copy ISR from flash to...

Hi, Is there any example code to make the ISR to run out of SRAM. I know that it involves the following steps: 1) Copy ISR from flash to SRAM. 2) Copy vector table to SRAM 3) Remap vector table to SRAM using VTOR I'm struggling here. Any examples for such code? I'm using the LPC1768 processor with LPCxpresso IDE/compiler. I need to do this to avoid the annoying lag when jumping to interrup...


calling a c function from assembly ISR

Started by serene in comp.arch.embedded9 years ago 4 replies
ISR

hi Am using PSoC designer with complier IMAGECRAFT. I want to call a C function for CRC8_CCITT from an assembly ISR. I have to pass an...

hi Am using PSoC designer with complier IMAGECRAFT. I want to call a C function for CRC8_CCITT from an assembly ISR. I have to pass an argument and the funtion should return a value also. Can somebody help me to do this..... Thanks, serene


Instrumenting ISR's

Started by D Yuniskis in comp.arch.embedded7 years ago 2 replies

Hi, Subject line gives the gist of the issue -- though the reality is a bit more "involved" (of course! :> ) I'm trying to figure out how...

Hi, Subject line gives the gist of the issue -- though the reality is a bit more "involved" (of course! :> ) I'm trying to figure out how to instrument (certain) "ISR's" to more accurately track resource usage in an application. "Time" is the easiest to envision but the concept applies to other resources as well. [I've been struggling to come up with application neutral examples that


ISR and Halt on an ARM

Started by Raul in comp.arch.embedded12 years ago 2 replies

Is there a way for an ISR to disable the halt instruction on an ARM once the micro-controller embarks upon the perilous path to Halt?

Is there a way for an ISR to disable the halt instruction on an ARM once the micro-controller embarks upon the perilous path to Halt?


interrupts with FX2

Started by jan0385 in comp.arch.embedded7 years ago 22 replies

Hello, do you know where I can find information about setting up an interrupt with the FX2? To my knowledge an ISR looks like: static...

Hello, do you know where I can find information about setting up an interrupt with the FX2? To my knowledge an ISR looks like: static void MyIsr(void) __interrupt 0 { // Clear global USB IRQ EXIF &= ~0x10; .. } But how do I tell the FX2 to run the ISR when the IRQ0 (INT0 pin) occurs? Best regards Jan --------------------------------------- Posted through h...


AVR ATMEGA88 PCINT PROBLEM

Started by Rohan in comp.arch.embedded10 years ago 2 replies

Hi, I am trying to use the PCINT0 interrupt on the Atmega88 chip but an unable to get it working. i want it to work for pin number 12, 13 and...

Hi, I am trying to use the PCINT0 interrupt on the Atmega88 chip but an unable to get it working. i want it to work for pin number 12, 13 and 14 ie PCINT0, PCINT1 and PCINT2 respectively. i am initializing it as main(){ PCIFR = 0X01; PCMSK0 = 0X07; Sei(); } AND ISR(PCINT0_vect){ send_byte(1); } The ISR is not getting fired using only this code. Am i missing out on som...


Help with interrupts please

Started by panfilero in comp.arch.embedded10 years ago 4 replies

Hello I'm having a heck of a time trying to get interrupts to work on my MCU. All my coding is in C, and basically I want to jump to an...

Hello I'm having a heck of a time trying to get interrupts to work on my MCU. All my coding is in C, and basically I want to jump to an isr whenever I sense something in my serial port. So I wrote a function like this: interrupt 20 void isr(void) {....} the function just spits out some characters to let me know it's ok. I found the number 20 in my data sheet listed as the "Vector N...