cancel
Showing results for 
Search instead for 
Did you mean: 

using 32 MHz crystall with STM32L011K4

MKora
Associate II

Hi,

In a project I need a precise timing so I cant rely on th internal oscilator and want

to use a crystal 24-32MHz with MCU. But actually I couldnt find anything about this possibility in datasheet.

the sample is 32 KHz that is not good for my application. Anyone knows is it possible or not. if yes could you point which pins the crystal should be connected?

Also in CubeMx/Clock Configuration I couldnt enable HSE, the circle is disabled.

thanks.

4 REPLIES 4
Chris1
Senior III

This part does not appear to support a crystal for the high-speed clock. But you could supply an external clock signal connected to the CK_IN pin.

See "External clock source characteristics"

https://www.st.com/resource/en/datasheet/stm32l011k4.pdf

You can apply a TCXO clock source to the CK_IN (PA0) pin

I don't use CubeMX so can't speak to its failings, but you can readily configure the clock source/settings in SystemClock_Config()

I've selected this part for a very small foot-print application.

Watch that CubeMX / HAL don't overwhelm this part with bloat.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
MKora
Associate II

Hi, thanks for your reply.

Do you know any MCU in this family that supports crystal?

Is it safe to change the clock source during runtime?

Well you can select between HSI, MSI, HSE and PLL, etc as you wish. If you change the CPU or bus speeds you might also need to adjust peripheral baud rate dividers to compensate.

As I recall higher pin count devices allow for two crystal pins​. And where precision isn't required the internal oscillators can be used.

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