S32K146 Uart send By eDMA failed

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K146 Uart send By eDMA failed

904 Views
mrsong
Contributor II

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

pastedImage_2.png

here's the test code 

pastedImage_3.png

this function was succesed and serial port can print correct data :

pastedImage_4.png

step 2 . failed (used uart DMA sent)

      config the transfer type DMA of UART 

pastedImage_5.png

and DMA config :

pastedImage_8.png

pastedImage_6.png

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:

pastedImage_15.png

best wishes .

Labels (1)
0 Kudos
2 Replies

736 Views
wjandsq
Contributor IV

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 */

0 Kudos

736 Views
linhnguyenhoang
NXP Employee
NXP Employee

Hello,

Did you use LPUART instance 1 ? If so you should set DMA request to LPUART1_RX/TX

pastedImage_6.png

Best regards,

Linh

0 Kudos