cancel
Showing results for 
Search instead for 
Did you mean: 

Why is LSE limited to 1MHz?

Markus Vogel
Associate III
Posted on July 09, 2018 at 18:19

Hi everyone,

going through the datasheets of STM32L4x1 processors (probably concerns further processors as well) I found that LSE is always limited to 1MHz but my question is what limits it, i.e. can I use LSE > 1MHz in bypass mode?

Quick test:

LSE in bypass mode, fed by 3.579545MHz external clock (don't mind the weird frequency)

MCO active, supplied by LSE gives the same clock (of course with a time shift)

So the LSE can actually drive more than 1MHz (and why shouldn't it?)

Question:

So why is LSE than limited to 1MHz?

What happens when LSE > 1MHz (over time, temperature etc.)? Does it any harm?

Is this probably just a limitation of the RTC peripheral? And if I don't need the RTC can I drive it a higher frequencies?

Why is it interesting to drive LSE with >1MHz?

For an application with UARTs and precise timers you need one precise clock source. All UARTs, some timers can be fed by LSE. Especially for higher baud rates, e.g. 230400 Baud/s you need clocks higher than 1MHz (3.684MHz with x16 oversampling, 1.892MHz for x8 oversampling).

So it would be great to feed all time-critical sources with the precise clock on LSE while your CPU runs on MSI and you can change MSI for low-power modes while your timers and UARTs still run as precise as before. For me that is the best situation if you just change your CPU frequency to your needs and don't have to reprogram peripheral clocks accordingly - which leads to communication errors on UART in case of a current communication and to timing errors on the timers (especially if you reprogram a lot).

Alternatives to LSE > 1MHz

If you cannot use LSE >1MHz (for whatever reason) you could use HSI (but have to calibrate which could lead to errors for long communications when your HSI deviates or you try to recalibrate it during communication). So I don't like the HSI solution.

You could you the precise oscillator on HSE and run the UARTs and timers by SYSCLK. But if your core frequency should be higher than HSE you also have to use the PLL and then use AHB Prescaler when you want to reduce core frequency in low power modes. Then again you keep the UART and timer clock constant but now they are higher, you need the PLL and have a precise core clock, which is probably unnecessary.

Attachments

LSE-Yellow_MCO-Blue.png:

   CH1, yellow: LSE (3.579545MHz from external oscillator)

   CH2, blue: MCO output, fed from LSE (frequency is the same, no limitation to 1MHz, just a huge time shift, but that does    not matter to me)

STM32L451_Clocking.png:

   Screenshot of CubeMX STM32L451 clocking which I refer to in the text above

Looking forward to your opinions and answers on this topic.

Best regards

Markus

#lse #uart #power-managerment #timer
3 REPLIES 3
Posted on July 09, 2018 at 20:23

Limits in the prescalers for the RTC, and power increasing with switching frequency. LSE in low power domain.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Evangelist III
Posted on July 09, 2018 at 21:02

Because it's called: LOW speed. For high speeds there's HSE (HIGH speed.)

-- pa

Markus Vogel
Associate III
Posted on July 12, 2018 at 10:11

Ok, so but except for RTC there would be no real problem with driving LSE higher than 1MHz?

I understand that this is probably not the idea for a low-speed/low-power clock, but still the chance to clock the UARTs/LPTimers with a precise LSE while driving the rest with the low power/not so precise internal clocks (MSI/HSI) seems like a great advantage that ST could promote a bit more