Other Parts Discussed in Thread: HALCOGEN, SEGGER
Hi All!
Our application needs to reduce the interrupt latency on SCIs RX interrupt. So I tried to route it via FIQ which works partly in debug builds but does not work in release builds. As far as I can see, in debug builds the processor always stops at 0x0000000C, which indicates to my knowledge an instruction prefetch abort.
I did the following to find the root cause:
- project was designed using HALCoGen 4.7.01 and uses FreeRTOS with MPU
- the project is build using CCS 10.2.0.9 and TI compiler v20.2.1.LTS
- the code works well if all SCI interrupts are handled via IRQ
- changed the RX interrupt from Low to High Level (on SCI page of HALCoGen), enabled the new channel at VIM and assigned it to FIQ
- HALCoGen now generates a interrupt handler in sci.c with "#pragma INTERRUPT(linHighLevelInterrupt, FIQ)" decoration
- in RAM settings I assigned 0x200 for IRQ and FIQ Stack Length
- If I do nothing in the FIQ handler (in the switch (vec) statement disable all but the "default" clause) the code still crashes
- Using some debug pins I have the impression, that the processor never reaches the FIQ handler function in sci.c
- If I let the code start with SCI RX on IRQ level and switch it to FIQ in one of the other SCI interrupts, the code crashes after switching.
Can it be, that there is more to do then just add this "#paragma INTERRUPT (.., FIQ)" to get a working FIQ handler? Am I missing something else here? Any hints are very much appreciated.
Jan