Good morning everybody!
I have a weird problem with my program on MSP430f6779.
The problem is that when I have an empty while loop in the main file:
while{
}
it all works as expected. DMASZ counts down to zero and runs interrupt.
Everything changes when I put an additional for loop in the while loop.
while{
for(i=0; i<3;i++){
//do nothing
}
}
Then the dma data transfer stops working.
Has anyone had a problem like this?
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Here you have my dma config:
DMACTL0 = DMA0TSEL__USCIA1RX; // set DMA0 trigger to UCA1RXIFG
__data20_write_long((uintptr_t) &DMA0SA, (uintptr_t) &UCA1RXBUF);
// Source block address
__data20_write_long((uintptr_t) &DMA0DA, (uintptr_t) &EXT_UART_buffer);
DMA0SZ = EXT_UART_BUFFER_MAX; //Ile danych ma przyjsc po uarcie
DMA0CTL = (0 << 12) | // 0: Single transfer, 4: Repeated single transfer ; Single transfer means the DMA will stop after filling the whole buffer
(3 << 10) | // Destination address is incremented
(0 << 8) | // Source address is unchanged
(1 << 7) | // Destination is byte
(1 << 6) | // Source is byte
(1 << 5) |
(0 << 4) | // DISABLE DMA // todo
(1 << 2) |
(1 << 0);