2023-12-29 11:16 AM
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
Solved! Go to Solution.
2023-12-29 11:38 AM
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
2023-12-29 11:24 AM
The HAL library comes with examples, of which you will probably find an RTC example.
2023-12-29 11:38 AM
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
2023-12-29 11:51 AM - edited 2023-12-29 12:00 PM
@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
2023-12-29 11:59 AM
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
2023-12-29 12:20 PM
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
+ 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:
something like this, for beginner:
2023-12-29 12:25 PM - edited 2023-12-29 12:27 PM
https://www.st.com/en/embedded-software/stm32cubel0.html
The advice to start with a nucleo should be seriously considered.
2023-12-29 12:46 PM
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
2023-12-29 12:52 PM - edited 2023-12-29 12:53 PM
hmmm...
https://www.st.com/en/evaluation-tools/nucleo-l011k4.html
from cad ...
https://www.st.com/resource/en/schematic_pack/nucleo-32pins_sch.zip
2023-12-29 01:21 PM
AScha.3, thanks so much. I didn't know where that was available.
-Kevin