Skip to main content
yakdagg
Associate II
September 29, 2021
Solved

Timers and Interrupts

  • September 29, 2021
  • 5 replies
  • 1297 views

i m working with SPC584xxx series MCU and trying to work with timers interrupts.

using 1ms timer for calculating times for operations and using 10ms timer for work.

but when 10ms timer work, 1ms timer is waiting and not triggering until 10ms timers work done.

i just wanna see the how the priorities are working but i couldn't get what i want.

i made all settings via gui and adding callbacks manually.

should i add something else?

    This topic has been closed for replies.
    Best answer by Erwan YVIN

    Hello ,

    There is an example application in SPC5Studio tools suite :

    SPC584Bxx_RLA PIT Test Application for Discovery

    the priority is set in Low Level drivers component

    0693W00000FAowKQAT.png 

    You can find all the information in the Reference Manual RM0449

    Best Regards

    Erwan

    5 replies

    Erwan YVIN
    Erwan YVINBest answer
    ST Employee
    September 29, 2021

    Hello ,

    There is an example application in SPC5Studio tools suite :

    SPC584Bxx_RLA PIT Test Application for Discovery

    the priority is set in Low Level drivers component

    0693W00000FAowKQAT.png 

    You can find all the information in the Reference Manual RM0449

    Best Regards

    Erwan

    yakdagg
    yakdaggAuthor
    Associate II
    September 30, 2021

    i saw this example but it s not about priorities. i tried change priorities manually from IRQ Priority Settings which you share ss but they're not cutting processes.

    as example

    task2_{ >10ms timer >IRQ Priority 16

    some processes +2ms

    }

    task_1{>1ms timer >IRQ Priority 8

    counter++

    }

    at this scenario, "task_1" should cut "task_2" least 2 time and counter should increase. but it is not working.

    by the way, timer registers are counting at backplan but interrupts are not triggering.

    Erwan YVIN
    ST Employee
    September 30, 2021

    Sorry ,

    it is well PIT channel priority (cf tooltip) (cf help section)

    PIT = Periodic Interrupt Timer

    could you try to enable the switch :

    OSAL_ENABLE_IRQ_PREEMPTION ?

    Best Regards

    Erwan

    yakdagg
    yakdaggAuthor
    Associate II
    September 30, 2021

    it's default value is FALSE but tried with both option which TRUE and FALSE. unfortunately results are same.

    0693W00000FB3ouQAD.bmp

    yakdagg
    yakdaggAuthor
    Associate II
    October 12, 2021

    no more help ? any other solution? maybe a misspoint?