2017-11-02 01:19 AM
Hi all,
In a STM32F0 I have configured the IWDG and every time that in debug mode I stop the MCU, then the watchtdog active and the reset is on.
I read the user Manual and some post seen in this community . I use the HAL library give by ST Microelectronics to configure in this situation the IWDG in debug mode, but finally it's not work proprerlly.
I attach int this post all the code that I testing. .
I use the ST Cube the last version to configure all peripherals devices and the Atollic IDE.
First test I attach the macro and with this macro don't work propoerlly
__HAL_DBGMCU_FREEZE_IWDG();
Second test I include in my project the Standard Peripheral Library to try another function , but don't work propoerlly.
****************************************************************************** * @file stm32f0xx_dbgmcu.c * @author MCD Application Team * @version V1.2.0 * @date 01-August-2013 * @brief This file provides firmware functions to manage the following * functionalities of the Debug MCU (DBGMCU) peripheral: * + Device and Revision ID management * + Peripherals Configuration * @verbatim * @endverbatim * ******************************************************************************DBGMCU_APB1PeriphConfig(DBGMCU_IWDG_STOP,ENABLE);
Can anyone help me ?
Thanks,
Xavier,
#stm32-iwdg2017-11-03 01:25 AM
Hi,
for me on a STM32F437 this works:
DBGMCU->APB1FZ = DBGMCU->APB1FZ | DBGMCU_APB1_FZ_DBG_IWDG_STOP;
Regards, Ralph
2017-11-03 06:19 AM
Hi,
It's strange because in a STM32F103 works fine the same sentence that you wrote.
I don't arrive to configure for STM32F0 and work propertly.
Thanks,
Xavier,
2018-12-24 08:33 PM
Thank you!
I have just tested that __HAL_DBGMCU_FREEZE_IWDG() works on stm32f103.
2019-06-03 12:15 AM
I had the same problem on stm32f030.
An __HAL_RCC_DBGMCU_CLK_ENABLE() before __HAL_DBGMCU_FREEZE_IWDG() did the trick. I don't know why.