We are porting a project from SDK 11 to nrf5 SDK 17.0.2. We have also used a couple of different versions of SDK 15 extensively on several different products.
Our code is encountering an issue with app_timer_start with longer duration times. We are using the app_timer.c, and until SDK 17 there has never been a maximum duration limit. The code in fact does have handling for timers exceeding the duration of the RTC. However in SDK 17, I find the app_timer_start has added a maximum value check:
if ((timeout_ticks < APP_TIMER_MIN_TIMEOUT_TICKS) || (timeout_ticks > MAX_RTC_COUNTER_VAL))
{
return NRF_ERROR_INVALID_PARAM;
}
First, what bug caused Nordic to add this limitation on to app_timer_start? If such a bug exists we need to update several past projects that utilize this function. Could the git history explaining the change be provided?
Second..
I noticed in this discussion: https://devzone.nordicsemi.com/f/nordic-q-a/81603/app_timer_start-issue
That app_timer2.c was recommended as a solution, however our testing with app_timer2 showed significant problems and we reverted back to app_timer.c
Third...
Shouldn't the Release Notes and Migration Guide be updated to note this change and provide some explanation of the reason for the change?
Finally...
Since in our past usage of this function, the app_timer code did correctly handle timer values greater than MAX_RTC_COUNTER_VAL, can we safely disable this check?