K21 UART4 RX with DMA problem

cancel
Showing results for 
Search instead for 
Did you mean: 

K21 UART4 RX with DMA problem

335 Views
Contributor II


Hi,

 

I meet a problem on UART4 Rx with DMA. I tried to modify and build driver_examples\uart\edma_transfer in KSDK2.0.

The modifications as following:

pin_mux.c

CLOCK_EnableClock(kCLOCK_PortC);

PORT_SetPinMux(PORTC, 14U, kPORT_MuxAlt3);

PORT_SetPinMux(PORTC, 15U, kPORT_MuxAlt3);

uart_edma_transfer.c

#define DEMO_UART UART4

#define DEMO_UART_CLKSRC kCLOCK_BusClk

#define UART_TX_DMA_CHANNEL 6U

#define UART_RX_DMA_CHANNEL 7U

#define UART_TX_DMA_REQUEST kDmaRequestMux0UART4

#define UART_RX_DMA_REQUEST kDmaRequestMux0UART4

#define ECHO_BUFFER_LENGTH 8

 

The test result is: TX is OK, but RX always get same data, g_rxBuffer full fill with the first byte.

I found that when enter DMA IRQ handler first time, UART4 S1[RDRF] is set to 1, then DMA IRQ handler will be called endlessly and RDRF is keep 0.

 

I also test UART3, it is normal.

Any additional configs are needed for UART4?

 

Thanks!

 

Jim Yang

Labels (1)
3 Replies

19 Views
Contributor I

Ok, I found the answer. It's not possible.

https://community.nxp.com/thread/475893 

0 Kudos

19 Views
Contributor I

I have the same problem. Removing the transmitter configuration allows the receiver to work fine, so I assume it is something to do with the shared Mux for transmit and receive.

Jim, did you find a solution?

0 Kudos

19 Views
Contributor II

Hi NXP experts,

Any body help to check this problem?

Thanks!

0 Kudos