Zhaohong or Other experts,
Here comes my question about TMS570LS3137 GIOA interruption timing analysis.
My system uses SPI to read data from the external ADC. An external trigger signal comes to GIOA-2 pin, and triggers an interruption. In ISR of the GIOA interruption, MCU reads the data. Now I just wrote a piece of codes to test the data sampling speed.
I toggled a GPIO pin as a flag at the beginning of ISR to observe the GIOA interruption response time - from the external signal trigger edge to the flage change edge.
My system clock is about 180MHz (179.712MHz), so its period is 5.56ns. However, the measured interruption response delay (for external trigger to entering ISR) is 808ns. In other words, it takes about 145 system clock cycles. It is a big surprise to me and this is absolutely not acceptable.
It seems something wrong. Thus want to get your comments for optimization.
(1) I set the GIOA interruption as IRQ, and use Interruption vector #10 in VIM. Is the 145 system clock cycles is reasonable? If not, what's the reasonable number?
(2) I am using IAR embedded workbench as IDE and coding in C. How much the complier can affect the efficiency, thus affect the delay?
How's if I use assembly language?
(3) Instead of IRQ, will FIQ can help to shorten the interruption response delay?
(4) any other factors can help to reduce the delay? for example, special settings on GIOA control registers etc.
Any suggestion from the Forum is appreciated!
Thanks,
Yanzhong