A bug appears when trying to restart a periodic timer already running using osTimerStart, with a different period :
The new period is taken in account for one period and period go back to the previous value set by the first osTimerStart call. This is due to 'load' member of timer not re-initialized when timer is detected already running.
Here is the patch for this bug :
static osStatus_t svcRtxTimerStart (osTimerId_t timer_id, uint32_t ticks) { os_timer_t *timer = osRtxTimerId(timer_id);
// Check parameters if ((timer == NULL) || (timer->id != osRtxIdTimer) || (ticks == 0U)) { EvrRtxTimerError(timer, (int32_t)osErrorParameter); //lint -e{904} "Return statement before end of function" [MISRA Note 1] return osErrorParameter; }
if (timer->state == osRtxTimerRunning) { TimerRemove(timer);// 09/03/22 Bug fixed timer->load = ticks; } else { if (osRtxInfo.timer.tick == NULL) {
...
Remark : if RTX source code is not integrated in the project, a call to osTimerStop must be done before calling osTimerStart with a new period value.
Thank you - but there is no more a need to create a Support Ticket at this stage, as the Engineering Team already has been aware of that issue.
However, I was just testing the access at: https://www2.keil.com/support/silver?P=&V=&S= and that worked well for me.