Skip to main content
Associate III
April 9, 2025
Solved

From power-on to GPIO settings 【STM32H743XGH6】

  • April 9, 2025
  • 4 replies
  • 539 views

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.

This topic has been closed for replies.
Best answer by Andrew Neil

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 

4 replies

Andrew Neil
Andrew NeilBest answer
Super User
April 9, 2025

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.
NiMAuthor
Associate III
April 11, 2025

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.

mƎALLEm
ST Technical Moderator
April 9, 2025

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 "Best answer" on the reply which solved your issue or answered your question.
NiMAuthor
Associate III
April 11, 2025

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.