Hello,
To start, I am using the following tools:
SYS/BIOS: 6.33.1.25
XDCtools: 3.23.0.32
CodeGen Tools: 6.0.2
Board: Piccolo 28069 ControlCARD
Code Composer v5.1.1.00031
I am using the ECAP peripheral to trigger an interrupt on rising and falling edges of an external source that is oscillating at ~250Hz. In the ISR I am toggling a GPIO pin to check the timing between when the stimulus comes in and the ISR is serviced. When the application is run without using SYS/BIOS the delay between the stimulus and the GPIO toggle is ~424ns worst case. When the application is run with SYS/BIOS the delay fluctuates between ~500ns and ~16us worst case. The application isn't doing anything else, no other interrupts or tasks. This seems rather long considering 16us is ~1300 cycles on this part.
I tried bypassing the HWI dispatcher by adding the following lines to the cfg file:
Hwi.zeroLatencyIERMask = 8;
Hwi.nonDispatchedInterrupts["ecapHWI"] = new Hwi.NonDispatchedInterrupt();
Hwi.nonDispatchedInterrupts["ecapHWI"].intNum = 56;
Hwi.nonDispatchedInterrupts["ecapHWI"].fxn = "&ECAP1_Int_Handler";
I also did the equivalent at runtime using Hwi_plug function and plugging the ISR directly into the PIE vector table. However, this yielded the same results. The ISR code is also being run out of RAM. I'm wondering if maybe there is something else that I am missing or something that I need to add to the cfg file?
For reference I've attached two pictures, one of the non-SYS/BIOS application and one of the SYS/BIOS application.
In the following scope traces the yellow signal is the stimulus causing the interrupt through the ECAP module. The green signal is the GPIO that is being toggled in the ISR. The scope capture is set with infinite persistence and the code was run for a few minutes in order to catch multiple instances of worst case delay.
Non-SYS/BIOS, notice the delta of 424ns
SYS/BIOS, notice the delta of 16.184us
Thanks for your help,
Mike