cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE - STM32U5 Port G Issue

George747
Associate

Using STM32CubeIDE Version 1.14.1
MCU Package STM32U5 1.4.0
Using custom  STM32U5A9ZJT6Q  PCB

Issue:-
a.) if (HAL_GPIO_ReadPin(GPIOG, GPIO_PIN_7)) // PG7 pin 92 is always reading 0
b.) HAL_GPIO_TogglePin(GPIOG, GPIO_PIN_12); // is not toggling the pin

Ports A, C & E are working as expected.
----------------------------------------------------------------------------------------------------------------

I found possible issue and fixes in Zephyr rtos:-
Zephyrproject-rtos / zephyr :- Drivers: gpio: stm32u5 portG not working #50158
[backport v3.1-branch] drivers: gpio: stm32: Apply GPIOG specific code to U5 series #50484

Question:
Has the STM32U5 Port G issue been fixed on the STM32CubeIDE?
If yes - how do I implement it?

Please advise.

1 ACCEPTED SOLUTION

Accepted Solutions
SofLit
ST Employee

Hello,

Read this theard: https://community.st.com/t5/stm32-mcus-products/trouble-with-gpiog-on-stm32u575zit6/td-p/635064

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
SofLit
ST Employee

Hello,

Read this theard: https://community.st.com/t5/stm32-mcus-products/trouble-with-gpiog-on-stm32u575zit6/td-p/635064

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Thanks SofT_it,

Adding:-

__HAL_RCC_PWR_CLK_ENABLE();
HAL_PWREx_EnableVddIO2();

 

worked for me.

liteyear
Associate II

Seems this is not required for the STM32U595QII6Q (but was required for the STM32U585QIIx). For the former, the CubeMX generated code includes a SystemPower_Config() function called from main(). As well as setting the SMPS settings specific to the Q variants, also calls HAL_PWREx_EnableVddIO2() for you.