DMA Interrupt in emlib

by <a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Hero Employee</font></font> </a> amenleung on ‎06-13-2017 09:32 PM

Question

How to handle DMA interrupt in emlib?

Answer

For EFM32 Series 0 (em_dma.c):

  • DMA_Init() enables the DMA interrupt by default
  • The file includes the DMA_IRQHandler() and custom DMA IRQ handler is not required
  • To implement a custom DMA IRQ handler or run without a DMA IRQ handler, the user can define EXCLUDE_DEFAULT_DMA_IRQ_HANDLER with a #define statement or with the compiler option -D

For EFM32 Series 1 (em_ldma.c):

  • LDMA_Init() enables the LDMA interrupt by default
  • A custom LDMA IRQ handler is required
  • The file includes the LDMA_IRQHandler() template, the user can define LDMA_IRQ_HANDLER_TEMPLATE with a #define statement or with the compiler option -D to use this template