© Warren Gay 2018
Warren GayBeginning STM32https://doi.org/10.1007/978-1-4842-3624-6_17

17. PWM Input with Timer 4

Warren Gay1 
(1)
St. Catharines, Ontario, Canada
 

The small size of the STM32 makes it a natural application for remote control flying models. Using existing radio controllers, the STM32 could interface with receivers of RC servo signals and perform some special control features from your own imagination.

This chapter includes a demo program that uses Timer 4 to measure an incoming RC servo signal. Because the timer peripheral is doing all the work, the CPU is free to react to the servo readings with more computing power.

The Servo Signal

There is no standard for an RC servo signal, but most seem to use a pulse width of about 0.9 ms at one ...

Get Beginning STM32: Developing with FreeRTOS, libopencm3 and GCC now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.