Skip to main content
re.wolff9
Senior
August 20, 2021
Question

STM32G030F gpio MODER seems readonly.

  • August 20, 2021
  • 1 reply
  • 835 views

I'm bringing up my own STM32G030F board.

I've gotten the "blinky" program to upload and run, but all attempts to change the moder of the GPIOs fail.

At first I was using the proper macros but I've resorted to changing the MODER explicitly in my code, and now even to try it from the debugger. IIRC, that used to work on the countless STM32Fxxx projects that I've done.

While writing this.... I'm going to check RCC. The framework I'm using (Chibios) should enable everything, but who knows.

UPDATE: Yup that was it. Somehow chibios wasn't enabling the GPIOS in RCC.

This topic has been closed for replies.

1 reply

Uwe Bonnes
Chief
August 20, 2021

Some STM GPIO has also a LOck register that can interfere.