2018-06-30 02:23 PM
Hello,
I have a custom PCB with a STM32F042F4P6.
The STM32 keeps resetting at a rate of 2.5 Hz. I measured this with a scope on the NRST pin.
After a long search i found out that the IWDGRSTF flag is set after each reset. This is strange, because i never enabled the IWDG or WWDG in CubeMX v4.23. I also do not see anything about a set up of a watchdog in the generated code. Further, after i erase the chip in ST-Link utility, the STM32 is still resetting (at a constant rate of >600hz).
NRST pin is pulled up on the PCB with an 43k ohm resistor.
Attached a screenshot of the IWDG and the CSR register.
What I tried so far:
But still the STM32 keeps resetting..
Is there something i overlooked?
Many thanks,
Thomas
#clock #pll #stm32f042f4p6 #stm32f042f4 #iwdg #reset-reason #cubemx-4.23Solved! Go to Solution.
2018-07-02 08:18 AM
I read in
https://community.st.com/0D50X00009XkXVlSAN
that Flash latency settings can be a possible source of this problem. However, ' HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1' is executed after ' HAL_RCC_OscConfig(&RCC_OscInitStruct' in which '__HAL_RCC_PLL_ENABLE();
' is executed. Further, Flash Latency is 1. ________________ Attachments : PLLerror.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxSE&d=%2Fa%2F0X0000000ayF%2FtUlp3WQgGgOJBc3BJnI6FUB4QeNY0B1L5Ba08jeR1Ic&asPdf=false2018-07-02 03:47 PM
Strip down the application to absolute minimum - no timer, no I2C, no PLL, and whatnot. Now blink.
If it works, gradually add stuff.
JW
2018-07-03 02:36 AM
I tested it now with the most basic configuration.
The most basic configuration without PLL runs, but with PLL fails..
2018-07-06 02:09 AM
with PLL fails
What exactly are the symptoms? What are the PLL settings? Read back the RCC registers immediately before the point you suspect the reset occurs (probably just before the sysclk source switch occurs) and check if the PLL is set to frequency you expect. You may also want to output the PLL to a MCO pin and measure.
Also note what Clive said above:
I'd probably double check the board for shorts, or the supply otherwise browning-out, and try and correlate that with the NRST.
JW
2018-07-08 09:54 AM
Its solved now.
The problem was probably that the VDDA pin did not get power one time when i powered up the uc, because i de-soldered to much of my PCB. I think the PLL broke because of that.. Voltage at all pins looked fine, when i measured last time.
In the end, when i could not think of anything else, i replaced the STM32 with a new one, and now it is working.
Thanks a lot guys! I really appreciated your help!
2018-07-08 02:28 PM
Thanks for coming back with the result.
I would suggest damaged chip, but this is in the very first post of yours:
I soldered a brand new STM32 on my PCB (couple of times)
:)
JW