2024-10-09 12:48 AM
I like to configure IWDG (with early interrupt), but the UI in STM32CubeMX for IWDG lacks the NVIC settings tab compared to WWDG. I know that both units share the same ISR "WWDG_IWDG_IRQHandler", but why do I need to activate WWDG to get the Interrupt code generated? I really just like to use the IWDG due to its low power (stop 2) capabilities, I don't want the WWDG at all.
How can I activate the interrupt code generation for IWDG without activating WWDG?
Is this intentionally or is this a bug in STM32CubeU0 MCU package in STM32CubeMx?
ps. latest available versions installed (6.12.1 + STM32CubeU0 Firmware Package V1.1.0 / 05-June-2024)
Solved! Go to Solution.
2024-10-30 07:40 AM
Hello @chrislro,
An internal ticket for STM32CubeMX team has been created (Ticket 195398), as it is not possible to enable the interrupt through the graphic interface.
However, you can find attached, a working project using STM32U083, at each IWDG early interrupt, the counter is refreshed and the LED toggles.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-10-09 01:31 AM
Hello @chrislro,
The IWDG early wakeup interrupt can be activated by changing this parameter in stm32CubeMX:
Also, there is a separate ISR named for early wakeup using HAL named: HAL_IWDG_EarlyWakeupCallback
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-10-09 02:40 AM - edited 2024-10-09 02:41 AM
Hi,
I have not yet generated the code. I stumbled over the NVIC setting view in STM32CubeMX. When enabling solely IWDG, setting the values and selecting the IWDG early wakeup interrupt as you mentioned, still in the NVIC configuration, the respective NVIC interrupt is NOT selected and also not manually selectable as it is greyed out.
As said, when configuring the WWDG, NVIC allows checkmarking the interrupt.
I assume without the checkmark, also code is not generated for the IWDG early wakeup interrupt ISR. As said I have not yet generated code.
ps. Currently I am using the Nucleo-U031R8
2024-10-09 03:21 AM
Hello again,
The IWDG_EarlyWakeup interrupt is different from the the NVIC interrupt (IWDG global interrupt)
By modifying the value of the IWDG EWI you should be able to activate that interrupt and when you'll generate the code you can handle this interrupt in the dedicated ISR (IWDG_EarlyWakeupCallback)
I was able to test this on an stm32U5 (different use case), you can check it: IWDG early wakeup interrupt in Stop modes for STM3... - STMicroelectronics Community
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-10-09 05:38 AM
Hm,
2024-10-09 07:56 AM
Hello again @chrislro,
Please let me clarify that the use case of U5 is not similar to U0, the need to enable the EXTI line in U5 4M/512k is to overcome the limitation present in U5 2M (ES0499 2.18.1)
Regarding the interrupt that's not firing, I was able to replicate the behavior on my side, so I submitted a ticket internally for further investigation (Ticket 193297).
I will keep you updated!
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-10-09 08:57 AM
Got it. Thanks.
2024-10-30 07:40 AM
Hello @chrislro,
An internal ticket for STM32CubeMX team has been created (Ticket 195398), as it is not possible to enable the interrupt through the graphic interface.
However, you can find attached, a working project using STM32U083, at each IWDG early interrupt, the counter is refreshed and the LED toggles.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.