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.

Regarding SWI post delay

Hi, 

In Tiva -C launchpad, I programmed LAB_06_SOL_blinkSWI_TM4C_LP example and here is my observation.

I have one swi_post running for every 500ms.  After a swi_post it takes 480 cycles to enter into the function_handler posted by the SWI. Is it something normal?

What is the average delay between posting SWI and entering into the SWI's hanlder?

Start_time;

Swi_post(LEDSwi); // post LEDSwi

void ledToggle(void)

{

End_time;

}

Delay = Start_time - End_Time;  (~ 6 us;480 clocks)

Thanks

siva.

  • On TM4C129 family, the flash runs at 15 MHz.. For a 120 MHz operation, there is a wait state of 7. When CPU jumps to an ISR, there will be a prefetch buffer miss and CPU fetches the first ISR instruction at15 MHz.

    I think that there is something wrong in the way the timing is measured. What did you use to record the time? You can also use an I/O pin to indicate the timing. Set the pin high before the instruction to pos SWI and set the pin low in the beginning of SWI ISR. On a scope, you can confirm how often SWI is posted and the delays.

    Thanks and regards,

    Zhaohong

  • Hi Zhaohong,

    Thanks!! Yes I use GPIO toggle to measure the delay. I use TM4C123 launchpad running at 80Mhz. 

    From what I see is 6 us delay from SWI_POST to function call. Why Flash comes into picture for Posting a SWI? Is there a wayt o minimize this delay?

     

    thanks

    siva,.