Hi .
i transfered data from memory to peripheral UART by eDMA failed and used uart interrupt successed ,here's what i tired and i want to know the reason why used DMA failed
step 1.successed (used uart interrupt sent)
config the transfer type interrupt
here's the test code
this function was succesed and serial port can print correct data :
step 2 . failed (used uart DMA sent)
config the transfer type DMA of UART
and DMA config :
here's the test code :
Type_uByte ubSrcData[100] = {0} ;
Type_uByte ubDesData[100] = {0} ;
void wvdTuner_Init(void)
{
wvdDrv_UART_Init(UART_INSTANCE_1);//UART_INSTANCE_1 = 1
EDMA_DRV_Init(&dmaController1_State, &dmaController1_InitConfig0, edmaChnStateArray, edmaChnConfigArray, EDMA_CONFIGURED_CHANNELS_COUNT);
}
void wvdUartSendByDMA(void)
{
wvdFW_SetMemory(ubSrcData,0xFE,sizeof(ubSrcData));
LPUART_DRV_SendData(UART_INSTANCE_1, ubSrcData,100);
}
this function was failes and serial port can not print data.
this is the SDK code:
best wishes .
EDMA_DRV_Init(&dmaController1_State, &dmaController1_InitConfig0, edmaChnStateArray, edmaChnConfigArray, EDMA_CONFIGURED_CHANNELS_COUNT);
EDMA_DRV_ChannelInit(&dmaController1Chn0_State, &dmaController1Chn0_Config); /* LPUART0 RX */
EDMA_DRV_ChannelInit(&dmaController1Chn1_State, &dmaController1Chn1_Config); /* LPUART0 TX */
Hello,
Did you use LPUART instance 1 ? If so you should set DMA request to LPUART1_RX/TX
Best regards,
Linh