Performance analysis

Let's take a look at the performance of the DMA-based implementation compared to the interrupt-driven approach:

This time around, we can make the following observations about the overall system behavior:

  1. The (DMA) ISR is now consuming < 0.1% of CPU cycles at 9,600 baud.
  2. The Scheduler CPU's consumption is still very low.
  3. The frequency of the ISR has been reduced to only 60 Hz (from 960 Hz). This is because, rather than creating an interrupt for every byte, there is only an interrupt generated at the end of the transfer of 16 bytes. The Idle task is being context-switched significantly less often as well. Although it seems ...

Get Hands-On RTOS with Microcontrollers 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.