2025-04-09 2:46 AM
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.
Solved! Go to Solution.
2025-04-09 3:19 AM
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
2025-04-09 3:19 AM
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
2025-04-09 3:32 AM - edited 2025-04-09 3:34 AM
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:
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:
Hope that helps.
2025-04-10 5:12 PM
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.
2025-04-10 5:16 PM
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.