Cortex M4 eDMA UART communication

Hello everyone,

I am running an Apalis IMX8 mounted on an Apalis Evaluation board.

I am testing eDMA UART communication from the M4 cortex and the NXP examples are running fine using pins 6,8 ( UART0_RTS_B, UART0_CTS_B) and set to ALT 2 functionality (DMA.UART2) in the pinmux.

Now I am trying to set this up to use UART3 pins 134,136 ( UART0_TX/RX respectively) however I am bit confused with the naming here. as it is named UART3 in the Ixora datasheet but UART0 in the apalis datasheet.

I have did the following changes the code but nothing happened:
just changed the pin name in Board_initpins_name/ID macros

/* UART0_RTS_B (number AU45), BB_UART2_RX/J20A[28] */
/* Routed pin properties */
#define BOARD_INITPINS_BB_UART2_RX_PERIPHERAL                         DMA__UART2   /*!< Peripheral name */
#define BOARD_INITPINS_BB_UART2_RX_SIGNAL                                uart_rx   /*!< Signal name */
#define BOARD_INITPINS_BB_UART2_RX_PIN_NAME                          UART0_RX   /*!< Routed pin name */
#define BOARD_INITPINS_BB_UART2_RX_PIN_FUNCTION_ID              SC_P_UART0_RX   /*!< Pin function id */
#define BOARD_INITPINS_BB_UART2_RX_LABEL                  "BB_UART2_RX/J20A[28]"   /*!< Label */
#define BOARD_INITPINS_BB_UART2_RX_NAME                            "BB_UART2_RX"   /*!< Identifier */

/* UART0_CTS_B (number AW49), BB_UART2_TX/J20A[29] */
/* Routed pin properties */
#define BOARD_INITPINS_BB_UART2_TX_PERIPHERAL                         DMA__UART2   /*!< Peripheral name */
#define BOARD_INITPINS_BB_UART2_TX_SIGNAL                                uart_tx   /*!< Signal name */
#define BOARD_INITPINS_BB_UART2_TX_PIN_NAME                          UART0_TX   /*!< Routed pin name */
#define BOARD_INITPINS_BB_UART2_TX_PIN_FUNCTION_ID              SC_P_UART0_TX   /*!< Pin function id */
#define BOARD_INITPINS_BB_UART2_TX_LABEL                  "BB_UART2_TX/J20A[29]"   /*!< Label */
#define BOARD_INITPINS_BB_UART2_TX_NAME                            "BB_UART2_TX"   /*!< Identifier */

changed the ALT function to 0 to use DMA.UART0 functionality

void BOARD_InitPins(sc_ipc_t ipc)                          /*!< Function assigned for the core: Cortex-M4F[cm4_core1] */
  sc_err_t err = SC_ERR_NONE;

  err = sc_pad_set_all(ipc, BOARD_INITPINS_BB_UART2_TX_PIN_FUNCTION_ID, 0U, SC_PAD_CONFIG_NORMAL, SC_PAD_ISO_OFF, 0x0 ,SC_PAD_WAKEUP_OFF);/* IOMUXD_UART0_CTS_B register modification value */
  if (SC_ERR_NONE != err)
  err = sc_pad_set_all(ipc, BOARD_INITPINS_BB_UART2_RX_PIN_FUNCTION_ID, 0U, SC_PAD_CONFIG_NORMAL, SC_PAD_ISO_OFF, 0x0 ,SC_PAD_WAKEUP_OFF);/* IOMUXD_UART0_RTS_B register modification value */
  if (SC_ERR_NONE != err)

now in the main.c
I tried changing the following defines to 3 or 0

#define DEMO_LPUART          DMA__LPUART2

#define LPUART_TX_DMA_CHANNEL       17U
#define LPUART_RX_DMA_CHANNEL       16U

but I didn’t change the DMA channels as I am not sure what 17U and 16U represents here.

The main question here is should I change these define to (ex. DMA_LPUART0 or DMA_LPUART3) ? I am guessing is I need to use 0 here.
the side question is what does the 17U and 16U in the DMA channels defines refer to ?
as I am also guessing that could be the main issue here.

Thank you

Small update:
Updating all UART2 to UART0 in the code and changing the pins in pinmux.c/.h worked perfectly with lpuart_interrupt example, but not with the edma example.

any advice would be appreciated, thanks

Another update:
I was looking in the wrong place in the reference manual, I found the DMA channels and realized that UART0 is associated with channels 12 and 13 while UART2 16,17
this is found in the DMA subsystem overview (chapter 17) and not in the eDMA section in ch14

this solved my issue, I am gonna leave this here in case anyone else got confused with the ref. manual