This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LC4357: GIO interrupt handling

Part Number: TMS570LC4357
Other Parts Discussed in Thread: TMS570LS1224

TI Team,

I am taking external clock signal (5Mhz) as an interrupt on the GIO pin (GIO PORT A, 7). And in the ISR I am toggling the GIO pin (GIO PORTA, 0), ideally the toggle rate (defined in ISR) should be same as the clock rate (i.e. 5MHz), but it is coming close to ~740 KHz.

I'd like to know what is the maximum frequency up to which the GIO pin can handle the interrupt. Also, can you please suggest what should be done in order to sample interrupt at this frequency.

I am attaching the necessary files

attachments.zip.

  • Hi Harsh,

    The ISR execution time should be shorter than the interval of the interrupt event. The ISR needs to preserve any registers used by the ISR on the stack, and restore them before return, and the ISR needs to read the peripheral's interrupt vector to clear the flag. All of those actions will take cycles too. Please use PMU to measure how many cycles your ISR takes.

  • Hi Wang, 

    I will use the PMU to measure the cycles taken by the ISR. but now, I am running the CPU Clock (GCLK) at 300Mhz, So time period is 3.3ns. The GIO toggle frequency is ~740Khz which means time taken by GIO pin to toggle is 1.35us. So going by this analogy the simple GIO toggle function takes nearly 400 clock cycles. Is my understanding correct or I am missing something because 400 clock cycles for GIO toggle function is decreasing the performance.

  • Your interrupt occurs every 0.2us (5MHz), and your GIO ISR the tries to toggle GIOA[1] pin. I think that toggling a GIO pin (gioToggleBit()) will take around 450ns on TMS570LS1224 (measured on TMS570LS1224 launchpad). 

    The GIO toggle frequency is ~740Khz which means time taken by GIO pin to toggle is 1.35us

     I don't get your point. Is the GIO toggle function called every 1.35us? and 1.35us is determined using RTI interrupt?