cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L073RZT6 hardly booting the firmware

VMeto.1
Associate II

Hello ST Community,

I have a PCB designed according to the attached schematic.

Recently, I have been struggling with the following awkward issues:

1) The flashed firmware (via UART) doest not always start (2/10 attempts lead to successful code execution, with a delay of 3-5 seconds after power-up and no capacitors present in the schematic).

2) The device flashes succesfullly via the ST Cube Programmer.

3) I have changed 6 ICs on 3 PCBs - all of them behaving in exacty the same manner.

The NRST and BOOT0 pullups have been changed from 100K to 10K - no difference.

Unfortunately, I could not find the schematics of the STM32L073RZT6 for a reference.

May some please advise where to start from?

And what is the explanation for this strange bahaviour?

Thank you in advance!

6 REPLIES 6

BOOT0 needs a pull-DOWN to consistently boot user code from FLASH

Floating results in unreliable operation especially with slow rise times on the power supplies.

High starts the ROM LOADER, not your code.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
KnarfB
Principal III

For a reference see Getting started with STM32L0xx hardware development.

Do you have external decoupling capacitors close to the chip and a stable power supply?

hth

KnarfB

MM..1
Chief II

BOOT0 R9 100k is very big change to 10k and for boot fw you need jumper to GND.

And second source of trouble is HSE Xtals, need start stable and ok, otherwise if firmware is configured to HSE PLL your code start but hangs.

VMeto.1
Associate II

"BOOT0 needs a pull-DOWN to consistently boot user code from FLASH"

@Tesla DeLorean

---> Yes, upon flashing I connect BOOT0 to VCC (P2 - pins 1,2) and then, for booting, I switch it to GND (ping 2,3).

"Do you have external decoupling capacitors close to the chip and a stable power supply?"

@KnarfB

--->Well, the decoupling is not quite good. I have 2x 100nF decaps at about 20mm from the microcontroller.

The power supply comes from a CP2101 boards (also tried with several) with 5V to 3.3V LDO. It works without any issues with other MCUs.

"BOOT0 R9 100k is very big change to 10k and for boot fw you need jumper to GND."

@MM..1 

Indeed, that is why I have tried with both values. It does not change the behaviour.

"And second source of trouble is HSE Xtals, need start stable and ok, otherwise if firmware is configured to HSE PLL your code start but hangs."

Hm, this is interesting. I have left places on the PCBs for both the HSE and the LSE (32k) XTALs, but I haven't soldered none of them. Doesn't it work by using the internal oscillator?

On your design miss SWD debug , then you cant handle why your code don’t work and where stuck.
Normal way to load and test code isnt UART...
VMeto.1
Associate II

Yes, you are 100% right, I agree....

Tried with adding both the oscillators - LSE and HSE. Still without success.