In the ARTX, since the isr_evt_set can not be use in the __fiq function, I use the __swi function set the task instead. for exampal: void IsrSetFunction (void) __swi (8) { isr_evt_set (0x0001, tskMyTask); } void FIQ_Handler (void) __fiq { IsrSetFunction(); EXTINT = 0x00000002; // Clear the peripheral interrupt flag } But this way will do? You know, the ARTX using the swi to do something. 'Software interrupts 0-7 are used by the Advanced Real-Time Kernel (ARARM) and may not be used in your application.' So if I use the swi to set a task, this will occur some problem in ARTX?
Yes it will. There are small code sequences, which should be ATOMIC, means never interrupted. But this might not be the case if the FIQ interrupt happens. For example. There is currently executing a protected __swi function. This does not prevent FIQs. So in the middle of this protected function, a FIQ starts another __swi function. This would most likely cause the system crash. Anyway, I suggest you design your software concept so that you do not use FIQ for task synchronization. Use FIQs only for time critical events, which require fast response. It is not possible to get response times for tasks below 1 usec. It is in general a few tens of usec. For this purpose an IRQ interrupt might be used as well. Franc
In my system, I need the FIQ to do something fast but part of the program in the FIQ needn't do fast. Because I want the FIQ can end faster so I want to set a task in the FIQ to do that part of program. But my way to set task in the FIQ is a good way? Any more good suggest?
View all questions in Keil forum