IWDG Early Interrupt not generating on STM32 NUCLEO-U385RG-Q (Arduino IDE)
Hi everyone,
I'm building a watchdog application on the STM32 NUCLEO-U385RG-Q using the Arduino IDE and the IWatchdog library. Since the library doesn’t support early interrupt callbacks, I modified it by adding some LL code (after
LL_IWDG_SetEwiTime(IWDG, (uint32_t)EWITimeout);
LL_IWDG_EnableIT_EWI(IWDG);Arduino Code
#include <IWatchdog.h>
extern "C"{
#include <stm32u3xx_ll_iwdg.h>
#include <stm32u3xx.h>
}
extern "C" void IWDG_IRQHandler (void){
Serial.println("Wake up Interrupt");
}
void setup(){
Serial.begin(115200);
__enable_irq(); // Enables global interrupts
HAL_NVIC_SetPriority(IWDG_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(IWDG_IRQn);
IWatchdog.begin(10000000);
}After further debugging, I found that EWI timeout is not being set if EWI interrupt is enabled and when EWI is disabled EWI timeout is updating but not both at the same time.
Any suggestions would be greatly appreciated.
Thanks,
Vijay
