问题
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