Skip to main content
jeffry159
Associate
August 23, 2018
Solved

Beginner problem with NUCLEO-L4R5ZI and blinking LED

  • August 23, 2018
  • 3 replies
  • 1918 views

Hi,

I'm realy new to this and I'm using NUCLEO-L4R5ZI with Ac6 System Workbench for STM32. I've found the board and initialized all peripherals with their default settings inside STM32CubeMX. Then I've generated the code for System Workbench and imported it inside.

Inside the main while loop I've written just two lines of code for toggling the LED which I assume are correct.

while (1)
 {
 
 /* USER CODE END WHILE */
 
 /* USER CODE BEGIN 3 */
	 HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_7);
	 HAL_Delay(500);
 
 }
 /* USER CODE END 3 */

I try to flash the file nothing happens (not blinking on any of the User LEDs). Project builds itself without any errors. Only error I get is while flashing, but its finishes successfully. Below is the whole log from programing.

Another thing is when I try to program my board with default example everything works just fine and the log is still the same (even with that error).

Any help would be appreciated!

    This topic has been closed for replies.
    Best answer by Khouloud GARSI

    Hi @jeffry159​ ,

    You're using the HSE oscillator as a clock source. However, on the Nucleo 144 board, the crystal is not provided.

    You may use the HSI or MSI instead.

    Khouloud.

    3 replies

    Khouloud GARSI
    Technical Moderator
    August 24, 2018

    Hi @jeffry159​ ,

    Pay attention to the clock configuration. I suspect that's the cause of the issue.

    You're using STM32CubeMX, you may share a screenshot of the "clock configuration" window.

    Khouloud.

    jeffry159
    jeffry159Author
    Associate
    August 24, 2018

    Here is my clock configuration window.0690X000006Bw1wQAC.png

    It seems there are some differences, not sure what is each branch means yet. So should I try modifing the clock setting inside STM32CubeMX with working code as guide or is there any other way to set it "right" ?

    Khouloud GARSI
    Khouloud GARSIBest answer
    Technical Moderator
    August 27, 2018

    Hi @jeffry159​ ,

    You're using the HSE oscillator as a clock source. However, on the Nucleo 144 board, the crystal is not provided.

    You may use the HSI or MSI instead.

    Khouloud.