Skip to main content
Visitor II
December 21, 2024
Solved

LED toggling

  • December 21, 2024
  • 3 replies
  • 1014 views

I am using NUCLEO-U575ZI-Q eval board. I am trying to blink RGB LEDs. But RED LED which is connected GPIOG pin 2 is not toggling.

This topic has been closed for replies.
Best answer by Tesla DeLorean

Have you used commands to enable the VDDIO2 power to the GPIOG bank?

No code shown

HAL_PWREx_EnableVddIO2();

 

#define LED3_PIN GPIO_PIN_2
#define LED3_GPIO_PORT GPIOG
#define LED3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOG_CLK_ENABLE()
#define LED3_GPIO_CLK_DISABLE() __HAL_RCC_GPIOG_CLK_DISABLE()

3 replies

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
December 21, 2024

Have you used commands to enable the VDDIO2 power to the GPIOG bank?

No code shown

HAL_PWREx_EnableVddIO2();

 

#define LED3_PIN GPIO_PIN_2
#define LED3_GPIO_PORT GPIOG
#define LED3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOG_CLK_ENABLE()
#define LED3_GPIO_CLK_DISABLE() __HAL_RCC_GPIOG_CLK_DISABLE()

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Associate
January 28, 2025

I had the same issue. Adding a call to HAL_PWREx_EnableVddIO2() fixed it. Thank you.

Andrew Neil
Super User
December 21, 2024

Welcome to the forum.

More details required - see: How to write your question to maximize your chances to find a solution

 


@Gopals0108 wrote:

RED LED which is connected GPIOG pin 2 is not toggling.


Have you checked (board User Manual & Schematics) that there's nothing else on the board occupying those pins?

 

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.