-
Book Overview & Buying
-
Table Of Contents
Hands-On RTOS with Microcontrollers - Second Edition
By :
Interacting with MCU peripherals is extremely important in many applications. In this chapter, we’ll discuss several ways of implementing drivers for MCU peripherals. Up to this point, we’ve been using blinking LEDs as a means of interacting with our dev-board. This is about to change. We’ll now focus on creating drivers for UARTs (universal asynchronous receiver/transmitter). UARTs are a widely-used communication peripheral.
We’ll start by exploring a UART peripheral on our MCU, and we’ll implement an extremely simple driver for it inside a task. The driver uses polling, and it is receive-only. After taking a look at the driver’s performance limitations, we’ll look at interrupt service routines (ISRs) and the different ways ISRs can interact with the RTOS kernel. The driver will then be implemented using interrupts and an ISR. Throughout this chapter, we’ll use SystemView to keep a close eye on system performance...