Facing Difficulties in Data Transfer over UART with DMA on MSP430

心已入冬 提交于 2019-12-12 03:57:18

问题


I am collecting 2.4KB(600 bytes * 4) of data from sensors over my MSP430 Controller. And I am using dma to transfer that data over UART to my Linux Processor.Transfer Happens at every 100ms Timer.

My DMA setting is as below.

DMACTL0 = DMA0TSEL__UCA0TXIFG;
DMA0SA  = &buff;
DMA0DA  = &UCA0TXBUF; 
DMA0SZ  = 600;                      // Block size in bytes
DMA0CTL = DMADT_4 | DMASBDB| DMASRCINCR_3 | DMAIE| DMALEVEL_L; // Rpt, inc
DMA0CTL|= DMAEN;

and my ISR for DMA is as below,

 __interrupt void DMA_VECTOR_ISR(void)
 {
     DMA0CTL &= ~DMAIFG;
     DMA_Doneflag = 1;
 }

When I initiate transfer, at first I get to receive 600 bytes( I use breakpoint in my IDE to check about size at every DMA trigger). And It comes 600 bytes if I do repeatedly with break point. When I remove break point and Keep transfer in long run, I have noticed(From the log file on Linux machine) data does not comes 600 bytes everytime. Manytimes it's less than size defined.

来源:https://stackoverflow.com/questions/35384704/facing-difficulties-in-data-transfer-over-uart-with-dma-on-msp430

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!