If sdk_ets_timer_arm_ms_us is called right after vPortExitCritical inside sdk_ets_timer_disarm on line 247 (by an ISR for example, which was my case), execution will loop forever on line 196, since timer->next!=ETS_TIMER_NOT_ARMED, which was supposed to be changed in line 248.
By delaying the IRS or context switch until sdk_ets_timer_disarm the problem is fixed.
If
sdk_ets_timer_arm_ms_us
is called right aftervPortExitCritical
insidesdk_ets_timer_disarm
on line 247 (by an ISR for example, which was my case), execution will loop forever on line 196, sincetimer->next!=ETS_TIMER_NOT_ARMED
, which was supposed to be changed in line 248. By delaying the IRS or context switch untilsdk_ets_timer_disarm
the problem is fixed.