DMA的中断:数据传送过程中,DMAxSZ寄存器值减为0时,DMA置位DMAIFG,DMA的中断和DAC12模块共享中断向量,使用中断时需要软件判断具体是那个中断。中断响应后DMAIFG不会自动复位,使用时必须软件清零DMAIFG位。
DMA的寄存器如下:
Register Short Form Register Type Address Initial State
DMA control 0 DMACTL0 Read/write 0122h Reset with POR
DMA control 1 DMACTL1 Read/write 0124h Reset with POR
DMA channel 0 control DMA0CTL Read/write 01E0h Reset with POR
DMA channel 0 source address DMA0SA Read/write 01E2h Unchanged
DMA channel 0 destination address DMA0DA Read/write 01E4h Unchanged
DMA channel 0 transfer size DMA0SZ Read/write 01E6h Unchanged
DMA channel 1 control DMA1CTL Read/write 01E8h Reset with POR
DMA channel 1 source address DMA1SA Read/write 01EAh Unchanged
DMA channel 1 destination address DMA1DA Read/write 01ECh Unchanged
DMA channel 1 transfer size DMA1SZ Read/write 01EEh Unchanged
DMA channel 2 control DMA2CTL Read/write 01F0h Reset with POR
DMA channel 2 source address DMA2SA Read/write 01F2h Unchanged
DMA channel 2 destination address DMA2DA Read/write 01F4h Unchanged
DMA channel 2 transfer size DMA2SZ Read/write 01F6h Unchanged