cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G030F gpio MODER seems readonly.

re.wolff9
Senior

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.

1 REPLY 1
Uwe Bonnes
Principal II

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