Beginning STM32

Developing with FreeRTOS, libopencm3 and GCC

  • Warren Gay

Table of contents

  1. Front Matter
    Pages i-xxi
  2. Warren Gay
    Pages 1-16
  3. Warren Gay
    Pages 17-25
  4. Warren Gay
    Pages 27-38
  5. Warren Gay
    Pages 39-58
  6. Warren Gay
    Pages 59-72
  7. Warren Gay
    Pages 73-96
  8. Warren Gay
    Pages 97-114
  9. Warren Gay
    Pages 115-145
  10. Warren Gay
    Pages 147-174
  11. Warren Gay
    Pages 175-193
  12. I2C
    Warren Gay
    Pages 195-221
  13. Warren Gay
    Pages 223-240
  14. Warren Gay
    Pages 241-259
  15. Warren Gay
    Pages 261-272
  16. Warren Gay
    Pages 273-291
  17. Warren Gay
    Pages 293-304
  18. Warren Gay
    Pages 305-315
  19. Warren Gay
    Pages 317-331
  20. Warren Gay
    Pages 333-346
  21. Warren Gay
    Pages 347-359
  22. Warren Gay
    Pages 361-377
  23. Warren Gay
    Pages 379-392
  24. Warren Gay
    Pages 393-400
  25. Back Matter
    Pages 401-409

About this book


Using FreeRTOS and libopencm3 instead of the Arduino software environment, this book will help you develop multi-tasking applications that go beyond Arduino norms. In addition to the usual peripherals found in the typical Arduino device, the STM32 device includes a USB controller, RTC (Real Time Clock), DMA (Direct Memory Access controller), CAN bus and more. 

Each chapter contains clear explanations of the STM32 hardware capabilities to help get you started with the device, including GPIO and several other ST Microelectronics peripherals like USB and CAN bus controller. You’ll learn how to download and set up the libopencm3 + FreeRTOS development environment, using GCC. With everything set up, you’ll leverage FreeRTOS to create tasks, queues, and mutexes. You’ll also learn to work with the I2C bus to add GPIO using the PCF8574 chip. And how to create PWM output for RC control using hardware timers.

You'll be introduced to new concepts that are necessary to master the STM32, such as how to extend code with GCC overlays using an external Winbond ​W25Q32 flash chip. Your knowledge is tested at the end of each chapter with exercises. Upon completing this book, you’ll be ready to work with any of the devices in the STM32 family. 

Beginning STM32 provides the professional, student, or hobbyist a way to learn about ARM without costing an arm!


STM32 STM32F103 STM32F103C8T6 ARM ARM Cortex Cortex-M3 Blue Pill Red Pill Black Pill STMicroelectronics GCC libopencm3 FreeRTOS USB CAN bus Arduino

Authors and affiliations

  • Warren Gay
    • 1
  1. 1.St. CatharinesCanada

Bibliographic information