cancel
Showing results for 
Search instead for 
Did you mean: 

From power-on to GPIO settings 【STM32H743XGH6】

NiM
Associate III

I would like to know the necessary operations and settings from power on to GPIO control.

I have made a board using STM32H743XGH6.
I want to set the GPIOs to turn on the LEDs, but it does not work.

I am setting the GPIOs by manipulating the registers directly with JTAG.
I would like to know what other settings are necessary before I can get the GPIO to work.
(For example, set this register here, etc.).

Sorry for the general explanation.
Assuming there is nothing wrong with the circuit, any advice would make me happy.

1 ACCEPTED SOLUTION

Accepted Solutions

Use STM32CubeMX (either standalone, or within CubeIDE) ?

Look at examples in STM32CubeH7 ?

https://wiki.st.com/stm32mcu/wiki/Category:Getting_started_with_STM32_:_STM32_step_by_step 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

View solution in original post

4 REPLIES 4

Use STM32CubeMX (either standalone, or within CubeIDE) ?

Look at examples in STM32CubeH7 ?

https://wiki.st.com/stm32mcu/wiki/Category:Getting_started_with_STM32_:_STM32_step_by_step 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
mƎALLEm
ST Employee

Hello @NiM ,

As stated by @Andrew Neil use STM32CubeMx tool to configure the GPIO pins and generate the code and STM32CubeIDE to compile and upload the program to the MCU.

You can also inspire from the example provided in STM32CubeH7 package:

https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/NUCLEO-H743ZI/Examples/GPIO/GPIO_EXTI

If you need to do the direct access to the registers, I suggest you to inspire from the HAL implementation or simply CubeMx with LL (Low Layer) library.

Globally what you need to configure for a GPIO pin to turn on a LED:

1- Enable the AHB clock of the GPIO port

2- Configure the GPIO pin on which the LED is attached in Output Push-pull

3- Set the corresponding bit where the LED is attached either on the ODR register or the BSRR register:

mALLEm_0-1744194760016.png

Hope that helps.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Thank you for your reply.

I could not get the corresponding AHB clock to work properly with Enable.
There may be a problem with my development environment.

I could not get it to work, but I learned a lot about the RCC register specifications.
Your kindness will keep me going today.

Thank you very much.

Thank you for your reply.

After downloading the GPIO settings from STM32CubeIDE, I directly manipulated the corresponding registers, and the LEDs lit up.
The site you sent me was very helpful.

Thanks for your advice and nice kitty.