Skip to main content
Chaptra
Cover of Beginning STM32

Beginning STM32

Written by Warren Gay

Not rated yet — tap a star to review it

535 pages, about 11 hours of reading

Chaptra reads alongside you — AI insights, chapter breakdowns and reader discussions for every book. Join free

About this book

See how using FreeRTOS and libopencm3 instead of the Arduino software environment will help you develop multi-tasking applications that go beyond Arduino norms. This updated version includes expanded coverage of software setup for Windows 10 and 11, additional TM32 hardware capabilities, including clear explanations of "totem pole outputs" versus "open drain outputs," and a new section on project showcasing an interrupt-driven approach for processing USART data. 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, Second Edition provides the professional, student, or hobbyist a way to learn about ARM without costing an arm! What You'll Learn Initialize and use the libopencm3 drivers and handle interrupts Use DMA to drive a SPI based OLED displaying an analog meter Read PWM from an RC control using hardware timers Understand STM32 capabilities, including USB controller, RTC, DMA, CAN bus, and more Who This Book Is For Experienced embedded engineers, students, hobbyists and makers wishing to explore the ARM architecture, going beyond Arduino limits.

Read it with a club

Small groups reading the same books and talking as they go.

All clubs
A bright library atrium seen from above

News

  • 1 member
  • 1,813 discussions
  • Active 7h ago

Read Beginning STM32 alongside people who are reading it too.

Chaptra Prime — paid clubs, every club feature, and unlimited reading support, for $5 a month or $60 once.

See Prime

Reading guide

Themes, characters and key ideas in Beginning STM32, written by Chaptra AI.

  • about 60 hours
  • intermediate
  • instructive
  • challenging
  • informative

Beginning STM32, Second Edition is a comprehensive technical guide designed to transition embedded developers from the Arduino environment to the more powerful and flexible STM32 microcontroller family. It focuses on using FreeRTOS and libopencm3 with GCC for developing multi-tasking applications, providing deep insights into both software and hardware capabilities. The book covers essential topics from development environment setup on Windows 10/11 to advanced peripherals like USB, CAN bus, and DMA, including practical exercises to solidify understanding. It aims to empower professional, student, and hobbyist engineers to master ARM architecture without the limitations of higher-level abstractions.

See how using FreeRTOS and libopencm3 instead of the Arduino software environment will help you develop multi-tasking applications that go beyond Arduino norms.

Key themes

Multitasking and Real-Time Operating Systems (RTOS)
A core focus of the book is the introduction and practical application of FreeRTOS. This theme covers the principles of concurrent execution, task management, inter-task communication (queues), and resource protection (mutexes), which are fundamental for developing complex, responsive, and efficient embedded applications that need to handle multiple operations simultaneously.
Moving Beyond Abstraction
This central theme explores the transition from high-level, simplified development environments (like Arduino) to more direct, low-level control over microcontrollers. The book emphasizes understanding the underlying hardware and software mechanisms, providing the knowledge to overcome the limitations imposed by abstractions and unlock the full potential of ARM architecture.
Hardware-Software Co-Design and Interfacing
This theme explores the intimate relationship between software code and the physical hardware it controls. The book delves into initializing and utilizing various STM32 peripherals, demonstrating how software drivers interact with specific hardware features (GPIO, I2C, SPI, PWM, USB, CAN, DMA, RTC) to achieve desired functionalities. Understanding this co-design is key to effective embedded development.

Worth discussing

Compare and contrast the development philosophies of Arduino versus libopencm3/FreeRTOS for embedded systems.

Chapter-by-chapter breakdowns, character arcs and the full thematic analysis come with a free account.

Discussions

No one has started one yet

Join

Questions this book opens up

No discussions yet

Be the first to start a discussion about this book!

Sign up to start the discussion

Reviews

No reviews yet

Be the first to review this book!