2024-02-05 06:20 AM
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.
Solved! Go to Solution.
2024-02-05 06:27 AM
Hello,
Read this theard: https://community.st.com/t5/stm32-mcus-products/trouble-with-gpiog-on-stm32u575zit6/td-p/635064
2024-02-05 06:27 AM
Hello,
Read this theard: https://community.st.com/t5/stm32-mcus-products/trouble-with-gpiog-on-stm32u575zit6/td-p/635064
2024-02-06 01:09 AM
Thanks SofT_it,
Adding:-
__HAL_RCC_PWR_CLK_ENABLE();
HAL_PWREx_EnableVddIO2();
worked for me.
2024-11-05 09:19 PM
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.