STM32L051 won't restart with LSE soldered even if using LSI
I have multiple boards with a STM32L051 MCU and 2 board revision, A and B.
A: no LSE oscillator, LED connected via 550 Ohm resistor, around 20uF capacitance on VCC, radio module soldered
B: 6pF 32kHz +-20 ppm oscillator soldered, 9pF load capacitors, a +-20 ppm accuracy oscilloscope shows me an error of the LSE of ~12 ppm (measured via MCO pin).
LED connected via 2k resistor, around 10uF capacitance on VCC, no radio module soldered
Here's the problem:
If I use AC6 to program board A, do an upload + reset the board via AC6, everything is working fine. The board starts up, LED blinks.
If I use the same procedure for board B, even when only LSI is configured in software, the code gets uploaded, but the board is stuck somewhere - no LED blinking.
The same holds true for when I disconnect/connect a battery. If I do it multiple times, sometimes board B is working. Every 2nd time or so.
The strange thing is: When debugging on board A or B everything is working normally. I can also use the LSE - it starts up within ~1 second.
I have designed the board according to the oscillator design guideline: very short traces, guard ring.
I cannot say if this startup issue has anything to do with the LSE. Maybe it's a capacitance issue, or something else. But why is debugging working then flawlessly?
