我现在正在阅读TMS320F28335的DMA文档,其中的mode寄存器中有ONESHOT 和CHINTMODE 两位,我一直没看明白。
ONESHOT :One Shot Mode Bit
If this bit is set to 1, then subsequent burst transfers occur without additional event triggers after the first event trigger.
If this bit is 0 then only one burst transferis performed per event trigger.
上述的意思应该是
若ONESHOT =1,则一次外围事件触发,则DMA可以传输transfer_size中的所有帧数 TRANSFER_SIZE*BURST_SIZE个字);
若ONESHOT =0,则一次外围事件触发,DMA只能传输BURST_SIZE个words。
CHINTMODE
Channel Interrupt Generation Mode Bit: This bit specifies when the respective DMA channel interrupt should be generated to the CPU (via the PIE). 0 :Generate interrupt at beginning of new transfer; 1: Generate interrupt at end of transfer.
上述的意思应该是:CHINTMODE =0,则在外围事件发生后,DMA刚开始传输时产生DMA中断;
CHINTMODE =1,则在外围事件发生后,DMA传输完TRANSFER_SIZE*BURST_SIZE个words后产生DMA中断。
这样的话,如果DMA中断使能,CHINTMODE =1时,若ONESHOT =1,则外围事件发生后,DMA传输完 TRANSFER_SIZE*BURST_SIZE个words后产生DMA中断。
但是我在28335-A的例程中设置ONESHOT =0,结果外围事件发生后,DMA也是传输完
TRANSFER_SIZE*BURST_SIZE个words后产生DMA中断,这是怎么回事,是不是
CHINTMODE =1时,ONESHOT =0无意义啊? |