Skip to main content
Graduate
January 29, 2025
Solved

OSC32_IN and OSC32_OUT when are not used for LSE on STM32F070CBT

  • January 29, 2025
  • 2 replies
  • 1069 views

Hi,

I am curious about one thig.

I am using STM32F070CBT microcontroller which has LQFP48 package. My curiosity is about 3rd and 4th pins. In datasheet these pins additional  functions are OSC32_IN and OSC32_OUT respectively. In my project, i did not intend to use these pins as external oscillator. Am i have to initialize these pins to use as GPIO and disable HSE oscillator( even if i did not use it as an oscillator) ?

    This topic has been closed for replies.
    Best answer by STTwo-32

    Hello @tensaisakuragi06 

    As you can see on the Table63 and Table 64 of the RM0360 rev5 

    STTwo32_1-1738154541475.png

    if you enable the LSE, the PC14 and PC15 will be automatically set for LSE use. If you want to use them as standard GPIO you have to set LSEON bit in
    RCC_BDCR register PC14MODE bit and PC15MODE bit to 0 and configure the GPIO as standard one using the usual registers. I think throw CubeMX, you just have to disable LSE and enable the GPIO on the mode you want.

     

    Best Regards.

    STTwo-32

    2 replies

    STTwo-32Answer
    Technical Moderator
    January 29, 2025

    Hello @tensaisakuragi06 

    As you can see on the Table63 and Table 64 of the RM0360 rev5 

    STTwo32_1-1738154541475.png

    if you enable the LSE, the PC14 and PC15 will be automatically set for LSE use. If you want to use them as standard GPIO you have to set LSEON bit in
    RCC_BDCR register PC14MODE bit and PC15MODE bit to 0 and configure the GPIO as standard one using the usual registers. I think throw CubeMX, you just have to disable LSE and enable the GPIO on the mode you want.

     

    Best Regards.

    STTwo-32

    Graduate
    January 29, 2025

    Thank you for your reply. I'll try it.