cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F042F4P6 keeps resetting, IWDG ?

thomas versmissen
Associate II
Posted on June 30, 2018 at 23:23

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:

  • I Striped down my PCB; I removed the external oscillator and other IC's.
  • I soldered a brand new STM32 on my PCB (couple of times)
  • In CubeMX i made the most basic configuration possible.
  • I swapped the pull up resistor for a 4.7k and 10k resistor.

But still the STM32 keeps resetting..

Is there something i overlooked?

Many thanks,

Thomas

#clock #pll #stm32f042f4p6 #stm32f042f4 #iwdg #reset-reason #cubemx-4.23
15 REPLIES 15
Posted on July 02, 2018 at 15:18

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=false
Posted on July 02, 2018 at 22:47

Strip down the application to absolute minimum - no timer, no I2C, no PLL, and whatnot. Now blink.

If it works, gradually add stuff.

JW

Posted on July 03, 2018 at 09:36

I tested it now with the most basic configuration.

The most basic configuration without PLL runs, but with PLL fails..

Posted on July 06, 2018 at 09:09

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

Posted on July 08, 2018 at 16:54

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!

Posted on July 08, 2018 at 21:28

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