Skip to main content
Explorer
November 21, 2025
Question

In the HSE bypass mode of STM32G0B1, the HSERDY bit cannot be set

  • November 21, 2025
  • 4 replies
  • 364 views

I am currently using STM32G0B1. I found that when using an active crystal oscillator, the STM32 fails to recognize my crystal oscillator, resulting in the HSERDY bit not being set.

This is the configuration of my cubemx.

ShimiaoWang_0-1763695402505.png

Use an oscilloscope to check if the crystal oscillator has started oscillating.

ShimiaoWang_1-1763705052901.jpeg

 

    This topic has been closed for replies.

    4 replies

    Super User
    November 21, 2025

    Isn't that expected behaviour?

    Reference manual RM0444:

    The HSERDY flag in the Clock control register (RCC_CR) indicates if the HSE oscillator is stable or not.

    ...

    Note: Once the HSEON bit is cleared, HSERDY goes low after 6 HSE clock cycles.

    hth

    KnarfB

    Explorer
    November 21, 2025

    The crystal oscillator has started oscillating normally, but the clock initialization will enter a waiting state for the timeout of HSERDY. Could this be a reasonable phenomenon?

    ShimiaoWang_0-1763706792335.png

     

    Super User
    November 21, 2025

    Did you set the scope probe "10:1" ? Because your signal seems to be about 600mV , on the scope pic.

    Need to have hi speed + low capacitance probe .  If not having this, do not touch it with the probe !

    But it has to be 3Vss , to work at 3v3 cpu input.

    +

    You set range 1 ?

    AScha3_0-1763709888772.png

     

     

    Super User
    November 21, 2025

    Bypass is not the correct mode if you have a crystal oscillator. You should choose "Crystal/Ceramic Resonator" and connect it to the OSC_IN and OSC_OUT pins with appropriate load caps.

     

    The signal shown is not a valid bypass clock and HSERDY being low is the expected behavior.

    Technical Moderator
    November 21, 2025

    No, the Bypass mode is the correct config for the crystal oscillator (XO).


    @TDK wrote:

    Bypass is not the correct mode if you have a crystal oscillator. You should choose "Crystal/Ceramic Resonator" and connect it to the OSC_IN and OSC_OUT pins with appropriate load caps.


    This is the case of the XTAL.

    Super User
    November 21, 2025

    You're certainly technically correct here, but the output shown here looks a lot more like a crystal and not an oscillator. Could be an oscillator with less than 0-3.3V output, which would not be compatible with STM32. Probe capacitance shouldn't affect oscillator output much. PN or schematic would be helpful.

    Technical Moderator
    December 19, 2025

    @ShimiaoWang 

    Could you please state on this thread and tell if you have solved the issue. If yes mark as accepted as solution the post that helped/guided you to the solution or tell what was the solution you found and mark it as solution.

    Thank you.