How to blink LED on STM32?
Devices
- LED
- B-L072Z-LRWAN1
STEP - 1
- Run STM32CubeIDE
- Create New project - ( File -> New -> STM32 Project )
- From the Board selector section, select B-L072Z-LRWAN1
STEP - 2
- Give a project name
- Targeted Language: C
- Targeted Binary Type: Executable
- Targeted Project Type: STM32Cube
- Click Finish
STEP - 3
- Initialize all peripherals with their default Mode? NO
- Clear Pinouts
- Set PA10 pin as Output
- Save
STEP - 4
- Inside your project folder
- Go to the file (Src -> main.c)
- You can find a while loop there; give the below codes inside the while loop.
HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_10);
HAL_Delay(1000);
STEP - 5
- Build
- Debug
- Run
B-L072Z-LRWAN1 Pin Reference
Comments
Post a Comment