Hi,
I´m trying to send a 240bytes Buffer via UART using DMA, and i have some problems that i dont understand, if i set the DMA for sending just "one block" the serial port on PC doesn´t recognize any data like nothing was sended, the DMA was configured like this:
DMACTL0 = DMA0TSEL_0; // Software Trigger
DMA0SA = (unsigned int)Buffer1; // Source block address
DMA0DA = UCA0TX; // Dest single address
DMA0SZ = 240; // Block size
DMA0CTL = DMADT_1 + DMASRCINCR_3 + DMASBDB + DMALEVEL; // inc src, enable
In other try i set a continuous block sending, and in this case i recieved data at serial port but with a lot of loses using this settings: (in both cases i set the trigger by software periodically)
DMACTL0 = DMA0TSEL_0; // Software Trigger
DMA0SA = (unsigned int)Buffer1; // Source block address
DMA0DA = UCA0TX; // Dest single address
DMA0SZ = 240; // Block size
DMA0CTL = DMADT_5 + DMASRCINCR_3 + DMASBDB + DMALEVEL; // inc src, enable
Finally the UART was configured at 230400 Baud, and i sended the same buffer and recived it correctly in the PC, by sending byte by byte with the instrucction:
for...
UCA0TXBUF=Buffer[i];
... (wich is what i want to change by DMA sending in order to let CPU avaible)
So i undernstand that serial com was working fine, and the problem is in the DMA config, if anyone has an idea os what is working bab it´ll be really helpfull.
Thanks