Loading...
 

System Workbench for STM32


Blinky example for STM32 nucleo board

Hi Farsi,

Have you tried generating a project through CubeMX? It is quite easy to generate a empty project (plenty of guides on google), setting the desired LED’s GPIO as output and maybe labeling it as LED.
Then you can simply add the follwing two lines to your main while loop

HAL_GPIO_TogglePin(LED_GPIO_Port,LED_Pin);
osDelay(1000);

And it should work.

If you are looking for a already complete solution you can download the firmware examples from stm for the L0 series

https://my.st.com/content/my_st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubel0.htmlQuestion

I don’t have a L0 board to test with but if you go into the root folder of the firmware bundle then into Projects/STM32L053R8-Nucleo/Examples/GPIO/GPIO_IOToggle you will find a led toggle example.

To import the example into system workbench open system workbench then go File->Import->General->Existing Projects into Workspace->Browse

Then navigate to the Projects/STM32L053R8-Nucleo/Examples/GPIO folder and select the GPIO_IOToggle folder then click ok. There will be two projects to import, select the one with SW4STM32 in it’s name as thjis is the one for system workbench.

Finally click finish and the project should be imported. You can then press Crtl+B to build the project then navigate to Run->run to flash the project onto the board.

Hope this helps.