Skip to main content
Explorer II
April 24, 2025
Question

STM32H757I-EVAL LED Blinking Issue

  • April 24, 2025
  • 3 replies
  • 763 views

Hi, 
I am working on STM32H757I-EVAL. I am new to STM32 boards. I am using STM32 Cube IDE version 1.18.0. I started with the basic task - blinking led. I have written the code but it is not reflecting on the board. 
I have configured this task for four LEDs, I have set PK3, PK4, PK5, PK6 as GPIO Output. In pinout and configuration under system core, I have selected GPIO and configured every pins. Pin context assignment - ARM Cortex M7, GPIO Output level - Low, GPIO mode - output push and pull, GPIO Pull up / pull down - No pull up and no pull down, Max output speed - low. 
In RCC mode and configuration, HSE, LSE - Crystal/ ceramic resonator 
I have attached image of clock configuration.

Code: in while (1) block 

// Turn on PK3, turn off others

HAL_GPIO_WritePin(GPIOK, GPIO_PIN_3, GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_4, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_5, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_6, GPIO_PIN_RESET);
HAL_Delay(500);

// Turn on PK4, turn off others
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_3, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_4, GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_5, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_6, GPIO_PIN_RESET);
HAL_Delay(500);

// Turn on PK5, turn off others
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_3, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_4, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_5, GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_6, GPIO_PIN_RESET);
HAL_Delay(500);

// Turn on PK6, turn off others
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_3, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_4, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_5, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_6, GPIO_PIN_SET);
HAL_Delay(500);


I am not getting the desired output. out of 4 only 3 led is on and it is not blinking. I wanted to know if there is any mistake in the configuration and setup. 


I think I have made some mistake here in RCC and clock config, when HSE - bypass clock source, and in clock configuration input freq as 25 MHz. No LED is on for the above code


Thankyou. 

    This topic has been closed for replies.

    3 replies

    Technical Moderator
    April 24, 2025

    Hi @priya_12,

    Can you please tell me which pin is not blinking?

    And make sure that R202, R201, R200, and R199 for pins PK3, PK4, PK5, and PK6 are implemented and not removed.

    Thank you.

    ELABI.1

    priya_12Author
    Explorer II
    April 24, 2025

    LD3 is not turning on, LD1,LD2,LD4 are on but not blinking. 

    How do I check if resistors are implemented? It is internally connected already right?

    Technical Moderator
    April 24, 2025

    Hello @priya_12 ,

    First, please kindly use </> button to paste a code. See this post. I've edited your post.

    Second, to be efficient please attach your complete project including the ioc file.

    What @ELABI.1 said is to check these resistors as it could someone else unsolder them:

    mALLEm_0-1745524297468.png

    But since all LEDs are on except LD3 you need to check the availability of R200.

    priya_12Author
    Explorer II
    April 25, 2025

    Hi, 
    At different conditions, 3 out of 4 LEDs are on. Either LD3/LD2 is off. So, I don't think there is any issue with the resistors. 
    I have attached the project file and ioc file. 

    Thankyou. 

    Technical Moderator
    April 25, 2025

    You didn't attach you complete project. The complete project is not the  .project file but all the folder. Please attach your complete project.