2022-10-10 10:02 PM
Hi,
How to use STM32G071 watchdog timer with STM32Cube IDE ?
--
karan
2022-10-11 05:49 AM
Hello @Community member ,
There are plenty of examples in cube using the IWDG or WWDG. You can easily take it and using it in your own code:
BR,
Simon
2022-10-11 09:42 AM
Hi @Simon.T
Thanks for update..
I have seen example as below:
\\en.stm32cubeg0\STM32Cube_FW_G0_V1.3.0\Projects\NUCLEO-G071RB\Examples\WWDG\WWDG_Example\Src
And configure as below without any interrupt.
And do addition as attached file. But STM32G0 reset indefinitely Not working properly.
Please guide me..
--
Karan
2022-10-12 07:22 AM
You are not following the example. You are putting a 4000ms delay just after the init of the WWDG which is 2 times more than the maximum time out of the WWDG.
The condition "if (__HAL_RCC_GET_FLAG(RCC_FLAG_WWDGRST) != 0x00u)" and __HAL_RCC_CLEAR_RESET_FLAGS();
WwdgStatus = 0;
need to be before the MX_WWDG_Init();
Without this the MCU will reset every time.
2022-10-12 09:29 AM
Hi @STALA.1 (ST Employee)
Thanks for update..
I have done as below but still same results . MCU keep reseting every time.
--
Karan
2022-10-14 05:30 AM
Hello Karan,
Is it possible to see the Option bit WWDG_SW. And check if the configuration is Hardware window watchdog or software window watchdog.
Because the example run only when the WWDG_SW is in software mode.
Best regards,
Simon
2022-10-14 10:13 PM
Hi @STALA.1 (ST Employee)
Thanks for update..
In STM32CubeProgrammer
The Option bit WWDG_SW is already checked to use software window watchdog.
But when i unchecked with I am unable to Erase / program as well as Option bits to STM32 Chip.
STM32 Chip is detected and I am able to read.
With STM32CubeIDE,
I am getting below error.
--
Karan
2022-10-19 02:20 AM
Hello Karan,
Can you check if you have activated some flash protection like PCROP, WRP or RDP?
The default value are these:
By changing the WWDG_SW bit you shouldn't have an issue like this one.
I have another question, are you using a nucleo board or a custom board?
Simon
2022-10-19 10:43 PM
Hi @STALA.1 (ST Employee)
Thanks for update..
Please check below as update.
Error: Expected value for Option Byte
Why causing this issue ?
--
Gurpreet Singh