Here's how to adapt the FreeRTOS STM32 example (LED blink + UART print + ADC read) for different STM32 chips, including pinout hints and differences you may need to watch for.
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Target Options
You can apply this example to any STM32 with:
- FreeRTOS support
- GPIO output
- ADC peripheral
- UART peripheral
Below are versions for popular STM32 chips:
STM32F103C8T6 (Blue Pill)
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Notes:
- Use USART1 (PA9/PA10) since it's default and easier for USB-UART
- Supply 3.3V (NOT 5V) to peripherals
- You can use printf via HAL_UART_Transmit
STM32L432KC (Nucleo-L432KC)
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Notes:
- Use Low Power modes if needed (FreeRTOS handles idle)
- Cortex-M4 with FPU; optimize math in ADC task
STM32H743ZI (Nucleo-H743ZI2)
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Notes:
- Enable DCache & ICache carefully in FreeRTOS projects
- STM32H7 uses separate DTCM and AXI SRAM — configure stack carefully
- More performance headroom; can use vTaskDelayUntil for precise timing
How to Adapt in STM32CubeIDE
Step-by-Step:
- Create a new STM32 project for your target chip
- Open the .ioc file and:
- Enable GPIO (for LED)
- Enable UART (e.g., USART1 or 2)
- Enable ADC1 on available pin
- Enable FreeRTOS → CMSIS v2
- Add 3 tasks:
- blinkLED
- uartTask
- adcTask
- Implement code same as in the STM32F4 example, adjusting pin names if needed
- Compile and flash the board
Summary Table for Popular Targets
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →