Lecture 15 - DMA (Direct Memory Access), RTC (Real Time Clock)

Today we'll look at:

What is Direct Memory Access (DMA)?

Essentially, you can say "after 10 bytes of data, send an interrupt to the processor and do something with it". This is typically done for things like monitors where I/O data needs to be very "live" and real-time.

Used in many other computing applications:

DMA Delegation

Some tidbits on DMA is that:

So if you have two DMA channels (ie: two devices) then they either use the same DMA engine. Or if there's two engines, these channels can work in parallel on different engines.

STM32

There's two DMAs on the STM32, each with 7 channels each

Here the DMA is essentially a FIFO, where once its full the CPU core gets and interrupt and does something with it.

Registers

Real Time Clock (RTC)

Essentially an RTC is an alarm clock. An RTC clock can account for LEAP days among other things.

RTC Circuit

There's a lower-speed oscillator to drive this clock:

But as a bonus we get date/time

These 32khz crystal may have offset and drift: