cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting LSE to STM32L010?

KevinZ
Associate II

Hello, all, and Happy New Year!

I'm trying to design my first microprocessor board. I'm trying to follow the guide given by Phil's Lab on YouTube, at https://youtu.be/nkHFoxe0mrU?si=Dx6cx6-a9yXncmEW, which I find very helpful. I'm using an STM32L010K4Tx in a device that is primarily a timer.

I'm not sure I need them, but I wanted to install a High Speed External crystal (HSE) and a Low Speed External crystal (LSE). In the STM32CubeIDE, I have a STM32L010K4Tx set up, and from the Pinout & Configuration Tab, I can select System Core -> RCC. Under RCC Mode and Configuration, I select High Speed Clock (HSE) and for Low Speed Clock (LSE), I select "Crystal/Ceramic Resonator." The pinout diagram seems to show pin 2:RCC_OSC32_IN and pin 3: SCC_OSC32_OUT, which is where I believe that I should connect either side of the HSE crystal and its capacitors. There's also pin 6: RCC_CK_IN but no RCC_CK_OUT pin.

Can someone help me configure the STM32L010K4 to include a LSE crystal or ceramic resonator, and teach me where and how to connect it? I've skimmed the STM32L101 Datasheet and the AN4467 Getting Started application note without finding an answer.

On a related note, is there a published Reference Board schematic for the STM32L010K family? Can someone point it out for me please?

Thanks, again, and happy holidays.

-Kevin

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

Welcome @KevinZ, to the community!

You have misunderstood the pin designations: OSC32_IN and OSC32_OUT are the pins for the 32kHz crystal, i.e. the LSE. The package of your STM32L010K4 has too few pins for there to be two pins available for HSE and only offers CK_IN for connecting an external (high speed) clock source, e.g. an oscillator (see data sheet, table 1, footnote 1).

I hope that's easier to understand now?

Good luck
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

11 REPLIES 11
raptorhal2
Lead

The HAL library comes with examples, of which you will probably find an RTC example.

Peter BENSCH
ST Employee

Welcome @KevinZ, to the community!

You have misunderstood the pin designations: OSC32_IN and OSC32_OUT are the pins for the 32kHz crystal, i.e. the LSE. The package of your STM32L010K4 has too few pins for there to be two pins available for HSE and only offers CK_IN for connecting an external (high speed) clock source, e.g. an oscillator (see data sheet, table 1, footnote 1).

I hope that's easier to understand now?

Good luck
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

@raptorhal2, Thanks for writing. I don't know what a "HAL Library", other than Hardware Abstraction Layer, is. Can you provide a link?

Thanks, again.

-Kevin

Hi, Peter, thanks for replying, and thanks for straightening me out on the OSC32_IN and _OUT pins. That's easily corrected.

I'm still a little lost on the HSE input, then. The footnote says, "HSE available only as external clock input (HSE bypass)." Does this mean that I have to create, say, an 8MHz oscillator circuit with an output, that I would then connect to pin 6: RCC_CLK_IN? Are there any example circuits that provide the characteristics needed for this HSE input pin? (I'm not a professional, just a hobbyist.)

Thanks, again, for helping me.

-Kevin

HSE available only as external clock input ->

use an oscillator (crystal+driver in a case), today not much more expensive than a crystal, see:

https://www.mouser.de/ProductDetail/ABRACON/ASE-8.000MHZ-E-T?qs=s46Hw6dZPL50VkqizsE0GA%3D%3D

AScha3_0-1703880904574.png

+ as a beginner, dont take a exotic mini-case or super-mini-super-low-power chip, just more a "average" chip , and a ready made working board, to learn...like a nucleo board:

see:

https://www.mouser.de/c/embedded-solutions/engineering-tools/embedded-processor-development-kits/?m=STMicroelectronics&instock=y&sort=pricing

something like this, for beginner:

https://www.mouser.de/ProductDetail/STMicroelectronics/NUCLEO-G071RB?qs=sGAEpiMZZMtavWIq7L07BTILH08JBKGJ1zGA5JELfTxyT59%2F2Di8aQ%3D%3D

 

If you feel a post has answered your question, please click "Accept as Solution".

https://www.st.com/en/embedded-software/stm32cubel0.html

The advice to start with a nucleo should be seriously considered.

Ascha.3, thanks for replying, and thanks for the specific recommendation of an oscillator.

Regarding Nucleo boards: What I really want to learn is PCB design of microcontroller products, not just software or firmware programming. I actually have three Nucleo boards (but none with the STM32L010 family) and a bunch of boards (Blue Pills?) with STM32F processors. Are you saying that the schematics for a STM32L010 family Nucleo or discovery board are available, and I can just copy from them? If so, can you provide a link?

Thanks, again, for your advice.

-Kevin

hmmm...

https://www.st.com/en/evaluation-tools/nucleo-l011k4.html

from cad ...

AScha3_0-1703883090864.png

https://www.st.com/resource/en/schematic_pack/nucleo-32pins_sch.zip

If you feel a post has answered your question, please click "Accept as Solution".

AScha.3, thanks so much. I didn't know where that was available.

-Kevin