Skip to main content
Associate II
February 18, 2025
Solved

How to control STM32H7RS GPIO port P and N?

  • February 18, 2025
  • 2 replies
  • 1330 views

I use NUCLEO-H7S3L8 to evaluate our new solution. I want to use GPIO port P to control a few external components.

I add some test code into NUCLEO-H7S3L8\Examples\GPIO\GPIO_IOTggle project, like the below snapped code:

__HAL_RCC_GPIOP_CLK_ENABLE();
GPIO_InitStruct.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOP, &GPIO_InitStruct);
HAL_GPIO_WritePin(GPIOP, GPIO_PIN_0, GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOP, GPIO_PIN_1, GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOP, GPIO_PIN_2, GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOP, GPIO_PIN_3, GPIO_PIN_SET);

After executed the above code, I halted the core and measured voltage of these pins with a multi-meter.

These pins keep LOW voltage.

Does it need an additional configuration when we want to use GPIO port M to P in STM32H7RS?


Code formatting applied - please see How to insert source code for future reference.

Best answer by Tony2Simmy

Need to enable a special power domain. You' better to use CUBE to generate sample code.

2 replies

Andrew Neil
Super User
February 18, 2025

Have you checked that the Nucleo board doesn't have anything else connected to those pins?

Check the User Manual and/or schematics ...

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.
Associate II
February 18, 2025

Hi Andrew, thank for your reply.

I had checked the schematic, those pins connect to a connector.

Actually i had tested port N which have test points in other project, results is same.

Tony2SimmyAuthorBest answer
Associate II
March 5, 2025

Need to enable a special power domain. You' better to use CUBE to generate sample code.

Andrew Neil
Super User
March 5, 2025

Has that solved your issue?

If so, please mark that as the solution:

https://community.st.com/t5/community-guidelines/help-others-to-solve-their-issues/ta-p/575256

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.