Hi all
i posted before this problem. now im posting with some improvement.
My Source is Memory and Destination is peripheral. I have configured the DMA as - 32bit wide Source and 32bit Destination. - 8-byts source burst - 8-byte Destination burst - Transfer size as 8 bytes
GPDMA_CH0_CTRL =0x85492008; // 32 bit wide 8byte
I’m filling the memory with bytes and sending to the Peripheral (HSUART2TX).
Tx_Buffer_485[0]=0x37; Tx_Buffer_485[1]=0x36; Tx_Buffer_485[2]=0x35; Tx_Buffer_485[3]=0x34; Tx_Buffer_485[4]=0x33; Tx_Buffer_485[5]=0x32; Tx_Buffer_485[6]=0x31; Tx_Buffer_485[7]=0x30;
I’m getting data as 4spaces and 4 characters. ( 3210) I tried all the way but unable to get the bytes. My aim is to transfer t 8 bytes when I enable DMA Channel. (76543210).
here i'm attaching my main file also
int main(void) { unsigned long pt; init_HSUART2(); Init_DMA0(); while(1) { Tx_Buffer_485[0]=0x37; Tx_Buffer_485[1]=0x36; Tx_Buffer_485[2]=0x35; Tx_Buffer_485[3]=0x34; Tx_Buffer_485[4]=0x33; Tx_Buffer_485[5]=0x32; Tx_Buffer_485[6]=0x31; Tx_Buffer_485[7]=0x30; /************************* arranged key to enable dma after filled the busser*************/ /**************************for testing only***********************************************/ P2_MUX_SET=P2_MUX_SET|0x08; P2_DIR_CLR=0x00000040; // Making GPIO_05 as input pin while((P2_INP_STATE&0x00000040)==0x00000040); while((P2_INP_STATE&0xFFFFFFBF)==0xFFFFFFBF); /*****************************************************************************************/ GPDMA_SOFT_BREQ |=0x00000080; // HSUART 2 TX Selected } }
Here is the DMA Initialization
void Init_DMA0(void) { DMACLK_CTRL |=0x00000001; // enable all DMA Clocks GPDMA_CH0_SRC =(unsigned long)&Tx_Buffer_485[0]; GPDMA_CH0_DEST =0x40018000; GPDMA_CH0_LLI =0x00000000; GPDMA_CH0_CTRL =0x85492008; // 32 bit wide 8byte GPDMA_CONFIG |=0x00000001; // Enable DMA Controller GPDMA_CH0_CFG |=0x000009C1; // memory to Peripheraltrnasaction }
Please help me with this. Its very urgent
Thanks Eswar