I would like to revive this thread; I too am having a lot of difficulty using UART DMA mode on a S32K1xx device (S32K148).
I found that although configuration succeeds and the return values look good for all driver functions, the TX callback function is never called and nothing is transmitted. I have configured the eDMA in advance, very similar to all the examples I can find for SPI/DMA, but clearly something is missing. I have uart1 working with interrupt mode and I am trying to add uart2 in DMA mode (using uart1 to debug). I have also tried going straight to uart1 being in DMA mode but see nothing coming out and lose my debugging statements/assertions that way.
The basics are the following (edited for brevity):
```
CLOCK_DRV_Init(...)
PINS_DRV_Init(...)
edma_user_config_t user_config = {
.chnArbitration = EDMA_ARBITRATION_FIXED_PRIORITY,
.haltOnError = false
};
EDMA_DRV_Init(...)
edma_channel_config_t tx_dma_ch_config = {
.channelPriority = EDMA_CHN_DEFAULT_PRIORITY,
.virtChnConfig = edma_tx_ch_,
.source = get_tx_dma_source(uart_ch_),
.callback = NULL,
.callbackParam = NULL,
.enableTrigger = true,
};
...
EDMA_DRV_ChannelInit(...);
EDMA_DRV_ConfigureInterrupt(edma_tx_ch_, EDMA_CHN_MAJOR_LOOP_INT, true);
EDMA_DRV_ConfigureInterrupt(edma_tx_ch_, EDMA_CHN_ERR_INT, true);
lpuart_user_config_t lpuart_config = {
.baudRate = baud,
.parityMode = LPUART_PARITY_DISABLED,
.stopBitCount = LPUART_ONE_STOP_BIT,
.bitCountPerChar = LPUART_8_BITS_PER_CHAR,
.transferType = LPUART_USING_DMA,
.rxDMAChannel = edma_rx_ch_,
.txDMAChannel = edma_tx_ch_};
LPUART_DRV_Init(...);
...
LPUART_DRV_InstallTxCallback(
uart_ch_, &someFunction, someParams);
...
LPUART_DRV_SendData(uart_ch_, buf_, num_bytes_);
```
Basically, someFunction() never gets called, as far as I can tell. I'm capturing all the status_t return values of the configuration functions (although it is omitted above), and they are all STATUS_SUCCESS. I also tried LPUART_DRV_SendDataBlocking() and still using DMA mode, since that appears to be a supported combination, and it results in timeouts. So clearly something is wrong with the DMA UART driver or my [mis]use of it.