Skip to main content
Associate
May 21, 2024
Solved

LED BLINKING in EMBEDDED C

  • May 21, 2024
  • 9 replies
  • 10050 views

I built a project in STM32F411E-DISC . project is built successfully and also  when we debugged no issue is found ,but after debugging only ORANGE LED is toggling rest 3 LED is not toggling . kindly help me to resolve this issue .kindly  find for code and microcontroller.WhatsApp Image 2024-05-21 at 11.16.40 AM.jpegCapture-3.PNGCapture-2.PNGCapture-1.PNGCapture.PNG 

    This topic has been closed for replies.
    Best answer by mƎALLEm

    Hello,

    Are you sure you’re configuring the right GPIOs?

    Enabled RCC clock for the GPIO ports?

    PS: please in next time either you put the source code in the comment using </> button or simply attach it.

    Please don't attach code screenshots.

    Thank you.

    9 replies

    mƎALLEm
    mƎALLEmBest answer
    ST Technical Moderator
    May 21, 2024

    Hello,

    Are you sure you’re configuring the right GPIOs?

    Enabled RCC clock for the GPIO ports?

    PS: please in next time either you put the source code in the comment using </> button or simply attach it.

    Please don't attach code screenshots.

    Thank you.

    To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
    arunodayAuthor
    Associate
    May 21, 2024

    where is RCC clock for the GPIO ports in CUBEIDE and how to enable this 

    mƎALLEm
    ST Technical Moderator
    May 21, 2024

    Hello,

    You need to use CubeMx (in CubeIDE) to configure the peripherals and generate the corresponding code.

    I've attached a project running on F411-DISCO board toggling the 4 LEDs. I didn't test it but should work.

    To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
    arunodayAuthor
    Associate
    May 22, 2024

    Your attached project running fine and all LED is toggling but , what is the issue in my code . can you please help me.

    Associate
    May 21, 2024

    Always use CubeMx to generate a code template.

    This does the necessary initialization of the GPIOs including the clock enabling.

     

    Thereafter, simply one line code to toggle LEDs.

     

     

    arunodayAuthor
    Associate
    May 24, 2024

    why  code generation section is blank . i build 2 project but still in both project code generation section is blink , how to resolve this issue Capture-4.PNG

    Associate
    May 24, 2024

     

    hayat_0-1716551077779.png

     

    refer to the snapshot, and Click the Right-Top Corner to generate the Code.

     

    The one you have circled up is to setup the parameters.

     

     

    Associate
    May 24, 2024

    Alternatively,

     

    Refer to the attached file, 

     

    follow the steps from page 38.