Optimizing to increase performance

Sometimes, there are tight timing requirements that need a low amount of jitter. Other times, a peripheral requiring a large amount of throughput may need to be used. While it may be possible to meet these timing requirements by polling inside a high priority task, it is often more reliable (and more efficient) to implement the necessary functionality inside an ISR. It may also be possible to not involve the processor at all by using DMA. Both of these options prevent tasks from expending worthless CPU cycles on polling loops and allow them to spend more time on useful work.

Take a look at the Introducing DMA section in Chapter 2, Understanding RTOS Tasks, for a refresher on DMA. Interrupts are also covered.

Because interrupts and DMA can operate completely below the RTOS (not requiring any kernel intervention), they can have a dramatically positive effect on creating a deterministic system. We'll look at how to write these types of drivers in detail in Chapter 10, Drivers and ISRs.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.8.42