Skip to main content
Jerry1
Visitor II
October 12, 2019
Question

Can I use PH1 as GPIO if I config PH0 as HSE BYPASS Clock Source? The same question on PC14, PC15 for LSE. my chip is STM32H seriies. tks adv.

  • October 12, 2019
  • 9 replies
  • 2794 views

..

This topic has been closed for replies.

9 replies

TDK
October 12, 2019

Yes.

10.3.14 Using the HSE or LSE oscillator pins as GPIOs

When the HSE or LSE oscillator is switched OFF (default state after reset), the related oscillator pins can be used as normal GPIOs.

When the HSE or LSE oscillator is switched ON (by setting the HSEON or LSEON bit in the RCC_CSR register) the oscillator takes control of its associated pins and the GPIO configuration of these pins has no effect.

When the oscillator is configured in a user external clock mode, only the OSC_IN or OSC32_IN pin is reserved for clock input and the OSC_OUT or OSC32_OUT pin can still be used as normal GPIO.

"If you feel a post has answered your question, please click ""Accept as Solution""."
PVand.9
Associate
December 17, 2020

Although it is mentioned that the PH1 is useable as a I/O, I do not succeed in doing so, on the standard configuration of a NucleoL053 where a 8Mhz clock signal is supplied from the ST-link part.

Tesla DeLorean
Guru
December 17, 2020

+1

Concurring with your observation on the L0 series, definitely doesn't function with the STM32L072CZ used on the Murata LoRa device

Not usable as a GPIO w/BYPASS

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
waclawek.jan
Super User
December 17, 2020

> Although it is mentioned that the PH1 is useable as a I/O

Where?

JW

Tesla DeLorean
Guru
December 17, 2020

Now this admittedly is talking about OSC_IN, but the reasonable inference is that OSC_OUT should be uninvolved, and usable.

At a minimum this is poorly documented and misleading

0693W000006GCVlQAO.jpgI haven't tested the H7 implementation, but I'd be cautious..

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Tesla DeLorean
Guru
December 17, 2020

A secondary effect would be some potentially very undesirable behaviour out of the system boot loader..

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Tesla DeLorean
Guru
December 17, 2020

PC14/PC15 on STM32 implementations generally are within the low power domain, these pins have low drive expectations. Check data sheet on specifics

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
TDK
July 28, 2023
"If you feel a post has answered your question, please click ""Accept as Solution""."