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

app_timer on app_evt_wait - fails / failing / bugging out / cancelling

In moving to the "rev-2 51422 silicon, we find that the app_timer inevitably fails after minutes to several hours. Power requirement moves from about .002ma to 4.5ma then stays there. Prior silicon did not have this problem.

The same routine is called via the handler on every interval. As discovered, we removed ALL instructions in the handler routine - the event timer still fails.

No other instructions are contained in the main where the app_timer is called.

while (forever) app_evt_wait();

a. Is this a known problem? b. why is it not noted in the PAN c. is there a solid fix that will keep it from failing?

tks!

Parents
  • With new app_timer.c, problem appears to happen more frequently. Here's setup: Thoughts??

    //VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV //++++++++++++++++++++++++++++++++++++++++++++++++ //APP_TIMER_CLOCK_FREQ = 32768 #define SUBTICKS_PER_MINUTE 12u // timer usual clocking ! 12 for default execution , 24 for diag fast cycling. #define RTC_COUNTER_FREQ 1024u //DON'T CHANGE!!! to modify cycles, use above^^^ // Desired RTC COUNTER frequency is 1024Hz. #define RTC_PRESCALER (ROUNDED_DIV(APP_TIMER_CLOCK_FREQ, RTC_COUNTER_FREQ) - 1u) // Computed value of the RTC prescaler register. #define CYCLE_TIMER_INTERVAL APP_TIMER_TICKS(ROUNDED_DIV((60u * 1024u), SUBTICKS_PER_MINUTE), RTC_PRESCALER)

    void timer_initialize(void)
    		{
    				APP_TIMER_INIT(RTC_PRESCALER, 1u, 1u, false);
    				app_timer_id_t timer_id1;
    				uint32_t err_code = app_timer_create(&timer_id1, APP_TIMER_MODE_REPEATED, Tick_Increments_Handler);
    				err_code = app_timer_start(timer_id1, CYCLE_TIMER_INTERVAL, NULL);  					if (LCD_Enabled) APP_ERROR_CHECK(err_code);  
    		}
    
Reply
  • With new app_timer.c, problem appears to happen more frequently. Here's setup: Thoughts??

    //VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV //++++++++++++++++++++++++++++++++++++++++++++++++ //APP_TIMER_CLOCK_FREQ = 32768 #define SUBTICKS_PER_MINUTE 12u // timer usual clocking ! 12 for default execution , 24 for diag fast cycling. #define RTC_COUNTER_FREQ 1024u //DON'T CHANGE!!! to modify cycles, use above^^^ // Desired RTC COUNTER frequency is 1024Hz. #define RTC_PRESCALER (ROUNDED_DIV(APP_TIMER_CLOCK_FREQ, RTC_COUNTER_FREQ) - 1u) // Computed value of the RTC prescaler register. #define CYCLE_TIMER_INTERVAL APP_TIMER_TICKS(ROUNDED_DIV((60u * 1024u), SUBTICKS_PER_MINUTE), RTC_PRESCALER)

    void timer_initialize(void)
    		{
    				APP_TIMER_INIT(RTC_PRESCALER, 1u, 1u, false);
    				app_timer_id_t timer_id1;
    				uint32_t err_code = app_timer_create(&timer_id1, APP_TIMER_MODE_REPEATED, Tick_Increments_Handler);
    				err_code = app_timer_start(timer_id1, CYCLE_TIMER_INTERVAL, NULL);  					if (LCD_Enabled) APP_ERROR_CHECK(err_code);  
    		}
    
Children
No Data
Related