May 2020
Intermediate to advanced
496 pages
13h 54m
English
So, how does this DMA stream buffer implementation compare to the ISR-based queue implementation? Well, on one hand, there is no comparison... the ISR based implementation doesn't work at 256,400 baud. At this baud rate, a new character is received every 39 uS. With the ISR taking around 18 us to execute, we simply don't have enough time to also run printUartTask() reliably without dropping data:

Notice that there is absolutely no time spent on the Idle task—the CPU is completely consumed by attempting to keep up with the incoming data from UART2.
As you can see in the following screenshot, data is occasionally dropped ...