This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Create tow app timer

Hello, support team.

In my SDK, I created two app timer.

What I expected is

 - 1st handler called every 1 msec.

 - The other handler called every 100 msec.

But two handler is called at the same frequency.

How can 2nd handler called after 100 times of 1st handler?

Parents Reply Children
  • I tested your sample and toggled some GPIOs inside runSensor() and repeated_timer_handler(), then I attached a loic analyzer and saw that everything worked as expected. The handler runSensor() ran everyt 100ms and repeated_timer_handler() ran everyt 1ms. (initially they were configured to 10ms and 1000ms, but I changed them to 1ms and 100ms).

    Could you attach a logic analyzer and check if you get the same result?

    Best regards,

    Simon

  • Hello, Simon:)

    I made a break point inside 1st handler and 2nd handler to test my code when I post Q&A.

    If your test result is fine,  It looks like that break point affects test.

    My colleague recommend me to activate APP_TIMER_KEEPS_RTC_ACTIVE.

    Than It works as expected in my test too.

    Thanks for your support!

Related