2013-11-09 03:52 PM
Hi Forum,
I need to determine if the IWDG has timed out. After the board resets, can I determine this by checking a flag e.g. if (RCC_GetFlagStatus(RCC_FLAG_IWDGRST) != RESET) // IWDG has reset or if I know that IWDG is about to timeout I can set a flag in flash that I can check after reboot. How can I check if IWDG is about to time out? Many Thanks Bob2013-11-09 04:56 PM
On which part?
Typically you'd determine the reset reason through the RCC flags[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Software%20reset%20flag%20%28SFTRSTF%29%20in%20RCC%20CSR%20register%20what%20source&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=403]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FSoftware%20reset%20flag%20%28SFTRSTF%29%20in%20RCC%20CSR%20register%20what%20source&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=4032013-11-10 02:18 AM
STM32F051
2013-11-11 07:09 AM
Hi Clive,
Thanks for that. I'll have that tested by tomorrow. Bob2013-11-11 07:41 AM
Hi Clive,
We are very soon going to ship code to production, so I appreciate all your help along the way. One final thing I want to implement is flash readback protection. I have a couple of questions.... 1...Can I enable this on the STM32f051in software or does it have to be set in the programming tools? I'm using Keil uVision. It would be preferable if I could set this in software as we will be shipping a lot of these units and if we only had to program the binary, it would make production easier and it would stop any units getting out without protection. 2...Once Flash Readback protection is enabled, can I still use the uVision bugger. Is the board bricked as far as using the debugger on it again, or can I reflash again. 3...How can I verify if protection is enabled. Will uVision display this? Apologies for these questions, but I want to make sure that this stage is correct before we go to production......Bob Carter