Skip to main content
Associate
February 5, 2024
Solved

STM32CubeIDE - STM32U5 Port G Issue

  • February 5, 2024
  • 2 replies
  • 1941 views

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.

2 replies

mƎALLEm
mƎALLEmBest answer
Technical Moderator
February 5, 2024
"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."
George747Author
Associate
February 6, 2024

Thanks SofT_it,

Adding:-

__HAL_RCC_PWR_CLK_ENABLE();
HAL_PWREx_EnableVddIO2();

 

worked for me.

Associate II
November 6, 2024

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.