Re: Differences between interrupt service routine (ISR) and a subroutine



"2005" <uws2003@xxxxxxxxx> wrote in message
news:1164736936.337323.40270@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi

This is another homework question isn't it?

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

Not always - google for nested interrupts.

- isr's are always smaller

Not necessarily. ISRs _should_ be kept small but that doesn't always
happen.

- an isr cannot be written in C

Not true but when written in C you normally need an attribute to tell
the compiler that the function is to be an ISR.

- a subroutine always has arguments

Not true. void Subroutine(void); is a perfectly acceptable prototype.

- the CPU flags are stored on the stack in addition to the return
address

That is true (although I suspect some pedants will find an example of
systems that don't).



.



Relevant Pages

  • Re: how to minimize interrupt latency using interrupt affinity in
    ... it would be VERY useful if the CPU or ISR ... one can see nested interrupts etc). ... my ISR runs on a processor core which is not ever used by other ISRs: ... even though I set affinity to 0x3 for all drivers ...
    (microsoft.public.development.device.drivers)
  • Re: how to minimize interrupt latency using interrupt affinity in
    ... it would be VERY useful if the CPU or ISR usage ... one can see nested interrupts etc). ... used by other drivers' interrupts and that only core 3 is used by my ISR. ...
    (microsoft.public.development.device.drivers)
  • Re: Strange problem with semFlush/semTake
    ... As I stated in one of my previous messages, the cmpTime task takes only ... As for the use of semGive instead of semFlush, ... If the ISR fires, let's say, while your task is ... I am using binary semaphores to sync between interrupts and tasks and I ...
    (comp.os.vxworks)
  • Re: arm-elf-gcc building erroneous code for ISR (long posting)
    ... > example from Keil which should demonstrate the use of interrupts and of ... > essentially an empty loop now) and simply let the timer ISR toggle a LED ... > suspect a bug in gcc. ... this include the correct subs pc,lr,#4 that performs a return from interrupt ...
    (comp.arch.embedded)
  • Re: semtake function in ISR
    ... ISR, but upon closer inspection, it is being called from task-level. ... including whether interrupts are enabled or disabled. ... TaskA gets the semaphore and continues chugging along, ... If you are a newbie to VxWorks, here are the reasons why semTake ...
    (comp.os.vxworks)