Skip to content

Latest commit

 

History

History

dspic33e-dma-trap

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

image

DMA TRAP

Description:

DMA generates trap error in the following conditions.

DMA Write collision:
DMA write collision occurs when both DMA module and CPU tries to write to the same DMA RAM memory location.

Peripheral Write Collision:
Peripheral write collision occurs when both DMA module and CPU tries to write to the same peripheral SFR.

In this code example, UART is configured to continuously transmit/receive data in loop-back mode. In the back-ground loop, CPU tries to write to DMA RAM or peripheral SFR to create DMA trap condition.

Select the required condition using the following macro in main.c function to generate DMA trap.

// Source Selection for Trap Creation
#define PER_WRITE_COL 1
#define DMA_WRITE_COL 0

Hardware Used

Software Used