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.

Systic-Timer

Other Parts Discussed in Thread: TM4C123GH6PM

Hello all,

I am using Tiva C series ARM TM4C123GH6PM ARM microcontroller.In the code I am using a systic timer and want that the interrupt triggers every 1ms and the sub routine is called.

In sub routine I have already pushed a desired location for PC and I sucessfully am able to jump to the location I want.

The only issue is that the timer wont trigger the next time. I assumed it is because I have never completed the ISR and jumped directly somewhere else. So the IPSR is not changed the way its supposed to be. So can anyone suggest which things to consider while jumping from a ISR and how I can solve my issue.

Thankyou in advance,.

  • Hello Aakash,

    Yes, the ISR needs an exit. Otherwise what you would have is nested interrupts. If you need to branch then in SysTick set a flag and then branch to the PC in the main application.

    Regards
    Amit
  • Thanks for the reply!

    I want to know a method to trick the proceseccor to think that I have completed the ISR so that I can retrigger it.

  • Hello Aakash,

    Don't trick the processor, else it will trick you into believing that your application is running when it is not.

    The SysTick timer has a specific function as a task schedule. So once the timer elapses, set a flag and use the set flag to perform the required actions in the main application. Ensure that the application time execution > SysTick Timer interval to the extent it is workable so that the scheduled tasks work as expected.

    Regards
    Amit