I was following this thread: http://e2e.ti.com/support/microcontrollers/hercules/f/312/p/247260/865774.aspx#865774 . In this thrad there was a remaining discrepancy in the number of clock cycles between the event and the ISR; 47 clock cycles (Sunil Oak) against 145 (Yangzong).
So I made a simple test case, based on HalCogen 3.06 and CCS5.4, which is:
RM48 running at 200 MHz (5ns). HET1:0 as 10kHz-PWM- Signal, duty cycle 1:1. Used a wire to connect HET1:0 to GIOA0. GIOA0 is programmed as input with IRQ- interrupt at GIO-high enabled. In the interrupt service routine for GIOA:0 another pin (GIOA1) is toggled. Use an oscilloscope to monitor HET1:0 and GIOA1.
Here are the results in form of the time between the rising edge at HET1:0 (wired to GIOA0) and the toggling of GIOA1 :
1. the GIOA1 - toggle- instruction (gioToggleBit(gioPORTA,1)) placed in function gioNotification: 960 ns
2. the toggle - instruction directly placed at the beginning of ISR-function gioHighLevelInterrupt: 660 ns
So even when I place the toggle instruction as first place in the ISR, it takes 660ns/5ns = 132 clock cycles!
Can anybody explain this large delay? It is a really long delay compared to other microcontrollers. Sunil mentioned in the thread above a "peripheral access delay of about 22 cycles". Where can I find this in the documentation? What means "about", is this access delay a fuzzy number or is it fixed? Under what circumstances do I have to take into accout this access delay? Even when I subtract 22 cycles for writing GIOA1 from my result, there are still 110 cycles (or 550 ns) left.
It would be nice to get a clear description of the timeline, how the RM48 acts regarding to interrupt latency.
Frank