How to write an ISR in UCOS-ii

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 external interrupt handler:

#pragma interrupt_handler int0_isr:2 void int0_isr(void) { count++; }

On every occurrence of the interrupt, I am incrementing a count. SO it should increase whenever an interrupt should occur. But while interrupts are occurring, there is no increase in the value of count.

Kindly suggest how to write an interrupt handler in UCOS-ii, so as to handle the external interrupts. Also, should I call this handler from the main function.?

Kindly suggest in this regard with your views and ideas.

Thanks. Prakhar.

Reply to
Prakhar
Loading thread data ...

In short, I am asking how to write an external interrupt handler in ucos-ii ?

Thanks & Regards, Prakhar

Reply to
Prakhar

First get the interrupt handler working without the presence of uCOS, then refer to your supplier of the source code (book, distributor, micrium, etc) to determine how to modify it to get it working under uCOS, if any modification is required at all.

How do you expect people to answer your question when you make no reference to the processor or compiler you are using?

--
Regards,
Richard.

+ http://www.FreeRTOS.org
13 official architecture ports, 1000 downloads per week.

+ http://www.SafeRTOS.com
Certified by TÜV as meeting the requirements for safety related systems.
Reply to
FreeRTOS.org

There are samples in various ports for uCOS. Check the micrium web site. The ports are free to download

--
Scott
Validated Software Corp.
Reply to
Not Really Me

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.