Hello all community members,
I am using DMA0 channel with edge-sensitive external trigger in my project with MSP430F5529. I have faced problem with repeated block transfer mode. I used the following piece of code to setup DMA0 module :
//************************************************************************************************
unsigned char TX_DATA=0 ;
__data16_write_addr((unsigned short) &DMA0SA,(unsigned long) &TX_DATA); // source addr
__data16_write_addr((unsigned short) &DMA0DA,(unsigned long) &UCB1TXBUF); // destination addr
DMACTL0 = DMA0TSEL_31;
DMA0SZ = 27; // block size , number of transforms
DMA0CTL = DMASRCINCR_3 + DMADT_5 + DMAEN ; // increment source addr, repeated BT mode, DMA0 enable
__bis_SR_register(GIE); // enable general interrupts
//***********************************************************************************************
According to the code, it is expected that each rising external trigger , performs a complete block of data transform (27 bytes or 27*8= 216 spi clock cycles).
But the number of transferred bytes is not equal to 27.
Please see the following figure ; one wrong block transform after an external trigger captured from oscilloscope.The green wave form belongs to external trigger and the pink wave belongs to SPI clock.
Thank you for your help , in advance !!
-Mohammad
