cancel
Showing results for 
Search instead for 
Did you mean: 

How to control STM32H7RS GPIO port P and N?

Tony2Simmy
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Tony2Simmy
Associate II

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

View solution in original post

7 REPLIES 7
Andrew Neil
Super User

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.

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.

Tony2Simmy
Associate II

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

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.

Hi,

I am working on a project that does not use CUBE and I am running into the same issue trying to use Port N as GPIO. Which power domain needs to be enabled for this to work?

Thanks


@KevLannen wrote:

I am working on a project that does not use CUBE


As @Tony2Simmy suggested, use CUBE to generate sample code for you.

Look at that code to see what needs doing, then do that in your non-CUBE project.

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.

Could you provide more information about the special power domain and how to set it up in Cube?  I am struggling to use PortM for gpio.