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

Timer unable to start multiple instances of app timer

Hi , 

I have been working on an example code in SDK : nRF5_SDK_17.0.2_d674dde\examples\ble_central_and_peripheral\experimental\ble_app_multirole_lesc\pca10040\s132\ses\

So I wanted to create a repeated timeout based event to be  executed. So I created a the timer instance and started  the timer; however, the timeout even is not happening could you help me. 

I have provided the section fo the code where I have created the timer inside the main function. 

#define timer_ticks APP_TIMER_TICKS(3000)

APP_TIMER_DEF(mytimer_id);

////app_timer_id_t mytimer_id;
error_code = app_timer_create(&mytimer_id, APP_TIMER_MODE_REPEATED, timer_event_handler);
APP_ERROR_CHECK(error_code);
error_code = app_timer_start(&mytimer_id,timer_ticks,NULL);

The initilialization fo the timer is already done prior to this. 

Parents Reply
  • Hi,

    The ble_app_hrs example shows how you can setup a timer while using the softdevice. You can try to compare your code with that example and see if you have initialized the module similarly.

    Rommel said:
    Even raised the interrupt priority fo the timer from default 6 to 0.

    You should definitely NOT raise the interrupt priority to 0 while using the Softdevice, as it will hinder it to respect any time critical requirements.

    regards
    Jared 

     

Children
No Data
Related