Skip to main content
Explorer
February 1, 2024
Question

The oscillatoris not working STM32F103CBU6TR

  • February 1, 2024
  • 4 replies
  • 1500 views

Hi,

I'm using STM32F103CBU6TR and I see that the oscillator that connects to osc_in and osc_out is not working.

The NRST is ih high, the BOOT0 is low and the power to the device is good.

What is the problem?

BR

Shmuel

    This topic has been closed for replies.

    4 replies

    Technical Moderator
    February 1, 2024

    All we know so far is that NRST and BOOT0 are not active and that power is applied. There should also be an oscillator at OSC_IN and OSC_OUT, but you should explain this to us in more detail. The fact that these two pins can also be programmed as GPIOs is not even relevant given the lack of information. Can you contribute anything else?

    Regards
    /Peter

    SIlia.1Author
    Explorer
    February 1, 2024

    Hi Peter,

    I'm not using this pins as GPIOs.

    They're only for the oscillator.

    What kind of information do you need?

    Shmuel

    Technical Moderator
    February 1, 2024

    Firstly, the configuration of the STM32, e.g. as an IOC file from CubeMX as well as the schematics (at least the immediate environment) of the STM32.

    Visitor II
    February 2, 2024

    How do you know the external OSC pins are not working?

    If you probe these pins with a scope - and you have a XTAL oscillator there - it cannot work (except you use really very high resistance, 10 MOhm probes): if you probe with a scope the signals on a real crystal (XTAL) oscillator - you kill the resonance of the XTAL.

    The only way to figure out if the HSE XTAL works is:

    • configure the HSE XTAL in void SystemClock_Config(void), e.g.:
      RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
      RCC_OscInitStruct.HSEState = RCC_HSE_ON;
    • and see if you get all the correct clocks, after programming the PLLs, setting DIViders etc.

    Probing the XTAL pins does not tell you anything (it kills all).

    It works fine, if you use a CMOS OSC instead (and just HSE_In). Change the system clock config accordingly (to use the BYPASS mode). Here you can probe with a scope.

    SIlia.1Author
    Explorer
    February 12, 2024

    Hi,

    The problem was on one of my devices.