2021-12-08 09:50 AM
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!
2021-12-08 10:02 AM
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.
2021-12-08 10:02 AM
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
2021-12-08 10:33 AM
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.
2021-12-09 12:16 AM
"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?
2021-12-09 02:07 AM
2021-12-09 02:44 AM
Yes, you are 100% right, I agree....
Tried with adding both the oscillators - LSE and HSE. Still without success.