Skip to main content
Graduate II
April 9, 2025
Solved

From power-on to GPIO settings 【STM32H743XGH6】

  • April 9, 2025
  • 2 replies
  • 504 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 

    2 replies

    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 

    NiMAuthor
    Graduate II
    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.

    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.

    NiMAuthor
    Graduate II
    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.