cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L1 and STM32L4 Series LSE 32,768Khz Startup Problem

green_om_2006
Associate III
Posted on May 03, 2017 at 23:26

Hi all,

I have 3 boards with 3 different MCUs, one with STM32L053R8T6, one with STM32L152RCT6, and one with STM32L443RCT6.

All use same 32,768Khz LSE crystal and 12pF caps. But only STM32L053 works fine when LSE is turned on ...

other two MCUs jump to Error handler function. i used STM32Cube for all 3 MCUs. a simple program to turn on LED for example ...

I even changed the crystal with another type, or increased LSE Timeout Value in STM32Cube to 10000 but still no result.

I checked in Debug, the LSERDY flag is not activated and it leads to Timeout and jump to Error Handler function.

What can be the problem ?!

#lse-startup
11 REPLIES 11
green_om_2006
Associate III
Posted on May 06, 2017 at 16:50

Can I use LCR meter to find the PCB capacitance ? or total capacitance when crystal is connected to MCU (after soldering...) ?

green_om_2006
Associate III
Posted on May 15, 2017 at 07:42

The problem is found !

Thank you all for your helps, all problems were because of CSS (Clock security system) enabled in my MCU !

It stops OSC if a small failure occurs and won't start again until power restart (not even hardware reset). when running normally, if i touch crystal pins, CSS disables 32Khz OSC but CPU continues to run code. I've written a small code to turn on LCD clocked from 32Khz LSE, so when it stops, LCD also stops and i couldn't see if he cpu is working or not !

I used Keil debugger to monitor where the code is, if i've touched OSC before entering debugger, when debugger starts, it first resets the MCU but CSS bit is not cleared this way, so in new code running in debugger mode, i just saw that LSE doesn't start and CPU jumped to Error Handler().

in other hard environment (like -10c Temp) CSS just stops LSE after startup and the flag remains even if reset MCU. it prevents LSE start again.