2021-02-10 02:12 AM
Hello everyone,
I am trying to setup the clock of my STM32G070KB using a 8MHz external quartz. I tried 2 different ways, one from CUBEIDE, the other from libopencm3. I didn't succeed to make my application work yet.
CUBEIDE :
I see a warning near the RCC tab in the mx configuration but i can't figure out what is wrong. Here is attached what i see and also the config clock tab. Do you see something wrong ? It seems the HAL code is waiting the HSE to be ready and timeout but i am not sure of it. Also i don't see the MCU is sending pulse to the quartz.
libopencm3 :
Just use the structure attached and the rcc_clock_setup function (for those that used it). I just want to say that i didn't have any trouble with other MCUs.
Thanks for your answer,
Best Regards,
Thomas
Solved! Go to Solution.
2021-02-10 04:34 AM
PC14/PC15 are the LSE connections, not HSE. G0 does not have the HSE available on 32-pin package.
[EDIT]
More precisely, in those packages where HSE pins (PF0/PF1) are not available (generally below 48 pins), PC14 appears to act alternatively as OSC_IN, i.e. it could be used for HSE_BYPASS, i.e. when using external oscillator.
OSC_EN is an AF, working as an output, potentially indicating to the external oscillator that it can switch off now (for low power modes). The exact operation is not very well described in RM.
In short, HSE *oscillator* is not available on the 32-pin package, only an input to HSE from external oscillator.
[/EDIT]
JW
2021-02-10 02:12 AM
2021-02-10 04:34 AM
PC14/PC15 are the LSE connections, not HSE. G0 does not have the HSE available on 32-pin package.
[EDIT]
More precisely, in those packages where HSE pins (PF0/PF1) are not available (generally below 48 pins), PC14 appears to act alternatively as OSC_IN, i.e. it could be used for HSE_BYPASS, i.e. when using external oscillator.
OSC_EN is an AF, working as an output, potentially indicating to the external oscillator that it can switch off now (for low power modes). The exact operation is not very well described in RM.
In short, HSE *oscillator* is not available on the 32-pin package, only an input to HSE from external oscillator.
[/EDIT]
JW
2021-02-10 06:10 AM
Oh okay, thank you for the answer, we did a mistake in the PCB design. We will therefore have to go on the 48 pins.
Thank you again and have a nice day.
Best Regards,
Thomas
2021-02-11 12:37 PM
I don't know what are your other requirements, but take a note that for most uses USART, I2C, SPI can run perfectly fine from HSI.
2021-02-11 11:45 PM
Hello,
That's what we thought, i first didn't use it. But i send real time ECG signal every 30ms let's say and the Host controller sync events on them. As the HSI is not that accurate, there is delay between our events and the signal. Thing that is already corrected byt using HSE on other projects.