What is the difference between Event System and DMA ?

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What is the difference between Event System and DMA ?

If both works without CPU intervention. What is main difference basically ?

In which case, which one do we prefer ?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AIUI, "Events" - as the name suggests - are just events; ie, "something has happened"

 

So, a bit like interrupts.

 

https://www.microchip.com/en-us/products/microcontrollers-and-microprocessors/8-bit-mcus/core-independent-and-analog-peripherals/system-flexibility/event-system

 

For example, an Analog Comparator module could be configured to generate an event when the input signal rises above the compare threshold, which then triggers a Timer Counter module to capture the current count value for later use.
 

 

https://microchipdeveloper.com/32arm:samd21-evsys-overview

 

DMA is about transferring blocks of data.

 

https://microchipdeveloper.com/32arm:samd21-dmac-overview

 

cusaya wrote:
which one do we prefer ?

whichever one suits the task at hand.

 

Note that Events & DMA can work together: a DMA transfer can be triggered on an Event, and/or can generate an Event when it completes

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would say that DMA is like an "event system" where the only possible action ("event user") is a memory transfer.

Events expand the concept to include other actions.  An obvious example is periodically sampling an ADC - you have a (highly configurable) timer create an event that triggers the start of an ADC conversion, and the result of that is DMAed into memory, all without needing the CPU.  (I guess the timer could in turn be controlled by an input pin event or Analog comparator event, for even more flexibility.)

 

It seems like a useful alternative to making all of the peripherals "smarter" - you could build periodic sampling into the ADC, but it probably wouldn't be as flexible.  With events, you can tie relatively dumb peripherals together.