Micro-controllers, wireless transmission and database
This project assumes you have already installed STM32CubeIDE. You need to have previously done a basic blink sketch with blue-pill using STM32CubeIDE. I have made a complete video from installing STM32CubeIDE to LED blink program. You can watch it by clicking this link. https://www.youtube.com/watch?v=kXg467nVd_A
Click SYS → Timebase Source → Select any timers (TIM3)
Click RCC → High Speed Clock (HSE) to Crystal/Ceramic Resonator
Click Clock Configuration tab → HCLK (MHz) to 72
Click Pinout and Configuration tab
Click Middelware → Click FREERTOS → Select Interface to CMSIS_V1
Configuration → Advanced Settings → USE_NEWLIB_REENTRANT (Enabled)
Configuration → Tasks and Queues
Rename the DefaultTask to RedLED
Create two more tasks named GreenLED and BlueLED
Change Priority to osPriorityNormal for all tasks
Set PA2, PA3 and PA4 GPIO_Output
void StartRedLED(void const * argument) { /* USER CODE BEGIN 5 */ /* Infinite loop */ for(;;) { HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_2); osDelay(200); } /* USER CODE END 5 */ } void StartGreenLED(void const * argument) { /* USER CODE BEGIN StartGreenLED */ /* Infinite loop */ for(;;) { HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_3); osDelay(300); } /* USER CODE END StartGreenLED */ } void StartBlueLED(void const * argument) { /* USER CODE BEGIN StartBlueLED */ /* Infinite loop */ for(;;) { HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_4); osDelay(700); } /* USER CODE END StartBlueLED */ }