cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F072C8T7 needs hardware reset upon power on to work!

AHuss.2
Associate

When the device is connected to the ST_LINK, after firmware upload, it works perfectly fine. When I remove the ST_Link and then turn OFF and ON my device, it does not work, unless I initiate a hard reset.

Also, the device works fine when I chose the internal oscillators as a clock source (both with ST-Link connected and without it).

The problem only persists, when in the clock configuration, I choose the clock source and the HSE (external 8MHZ crystal oscillator). The Boot0 pin is pulled low using a 10K resistor. The reset IC keeps the NRST low for at least 300ms as it should be according to the datasheet.

I have used the same 3.3V rail for both the VDDA and VDD. I think this is causing the issue.

1 REPLY 1

Maybe the crystal oscillator take too long to start up. In the various "libraries", after HSE enable, there's a look waiting for the HSE to start up, with a timeout; and if timeout occurs, the given function usually returns with an error. You can check in the software and when this occurs, light up a LED or take similar action to verify this was the problem.

If this is the case, either increase the timeout, write your own routine to start up the oscillator perhaps, and experiment with the capacitors next to the oscillator (see AN2867).

JW