Hello Particle forms,
On 6.4 and 8.0-rc.11 , system.resetReasonData() works just fine for this request below.
resetReasonData() = 700; This is correct behavior.
if (strcmp(argv[0], "reset") == 0) {
System.reset(700);
}
But, I have an interrupt style request using HAL_Core_System_Reset_Ex()
On 6.4 resetReasonData() = 201 <- This is correct
But on 8.0-rc.11 resetReasonData() = 0 <- This is wrong. It should be “201”.
void diy_wdog_interrupt() {
if (wdog_count > 0) {
wdog_count--;
TIM_ClearITPendingBit(TIM5, TIM_IT_Update);
} else {
HAL_Core_System_Reset_Ex(RESET_REASON_USER, 201, nullptr);
NVIC_SystemReset();
}
}
Question: What is different between 6.4 and 8.0-rc.11 to could cause resetReasonData() to behave differently for HAL_Core_System_Reset_Ex() ?
Thank you!