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

Timer Example Issue

I'm building a new application based on the no softdevice template example. I pulled in the code from the UART BLE example to redirect printf to the serial interface and that works. Next I wanted to add a timer so I copied the timer example but the timing off the interrupt was completely off.

At long last I discovered that the template example has Timer 0, 1, 2 all enabled while the Timer example only has timer 0 enabled. By disabling timer 1 and 2 my application started working. Can someone explain why disabling those two timers caused the application to start working again?

Parents
  • I am facing a similar issue but with SDK-12.2.0. Considering only timer example in peripheral directory, the example runs perfectly fine if run with timer 0. However, if I configure the example to use timer 1 or timer 2, it does not work as observed with timer 0. This is just an observation.

    The main problem is in BLE_Peripheral examples. I am able to initialize timer 2 and run the code. But if I initialize timer 1, with similar configuration, I get an NRF_ERROR_INVALID_STATE on calling nrf_drv_timer_init();

    Any insights?

Reply
  • I am facing a similar issue but with SDK-12.2.0. Considering only timer example in peripheral directory, the example runs perfectly fine if run with timer 0. However, if I configure the example to use timer 1 or timer 2, it does not work as observed with timer 0. This is just an observation.

    The main problem is in BLE_Peripheral examples. I am able to initialize timer 2 and run the code. But if I initialize timer 1, with similar configuration, I get an NRF_ERROR_INVALID_STATE on calling nrf_drv_timer_init();

    Any insights?

Children
No Data
Related