RT1024 UART eDMA DMA12_DMA28_IRQHandler is not called

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

RT1024 UART eDMA DMA12_DMA28_IRQHandler is not called

527件の閲覧回数
asarbs
Contributor II

I'n my project I use extensively eDMA (channels from 0 -> 13; i2c, i2s, 4x SPI and LPUART1) I have this issue that when I'm send data via LPUART1 System do not call DMA12_DMA28_IRQHandler and at the end I'm not handling upcoming data in LPUART1_LPUART_eDMA_Callback registered in 

const lpuart_config_t LPUART1_config = {.baudRate_Bps = 115200UL,

.parityMode = kLPUART_ParityDisabled,

.dataBitsCount = kLPUART_EightDataBits,

.isMsb = false,

.stopBitCount = kLPUART_OneStopBit,

.txFifoWatermark = 0U,

.rxFifoWatermark = 3U,

.enableRxRTS = false,

.enableTxCTS = false,

.txCtsSource = kLPUART_CtsSourcePin,

.txCtsConfig = kLPUART_CtsSampleAtStart,

.rxIdleType = kLPUART_IdleTypeStartBit,

.rxIdleConfig = kLPUART_IdleCharacter1,

.enableTx = true,

.enableRx = true};

edma_handle_t LPUART1_RX_Handle;

edma_handle_t LPUART1_TX_Handle;

lpuart_edma_handle_t LPUART1_LPUART_eDMA_Handle;

static void LPUART1_init(void) {

LPUART_Init(LPUART1_PERIPHERAL, &LPUART1_config, LPUART1_CLOCK_SOURCE);

/* Set the source kDmaRequestMuxLPUART1Rx request in the DMAMUX */

DMAMUX_SetSource(LPUART1_RX_DMAMUX_BASEADDR, LPUART1_RX_DMA_CHANNEL, LPUART1_RX_DMA_REQUEST);

/* Enable the channel 12 in the DMAMUX */

DMAMUX_EnableChannel(LPUART1_RX_DMAMUX_BASEADDR, LPUART1_RX_DMA_CHANNEL);

/* Set the source kDmaRequestMuxLPUART1Tx request in the DMAMUX */

DMAMUX_SetSource(LPUART1_TX_DMAMUX_BASEADDR, LPUART1_TX_DMA_CHANNEL, LPUART1_TX_DMA_REQUEST);

/* Enable the channel 13 in the DMAMUX */

DMAMUX_EnableChannel(LPUART1_TX_DMAMUX_BASEADDR, LPUART1_TX_DMA_CHANNEL);

/* Create the eDMA LPUART1_RX_Handle handle */

EDMA_CreateHandle(&LPUART1_RX_Handle, LPUART1_RX_DMA_BASEADDR, LPUART1_RX_DMA_CHANNEL);

/* Create the eDMA LPUART1_TX_Handle handle */

EDMA_CreateHandle(&LPUART1_TX_Handle, LPUART1_TX_DMA_BASEADDR, LPUART1_TX_DMA_CHANNEL);

/* Create the LPUART eDMA handle */

LPUART_TransferCreateHandleEDMA(LPUART1_PERIPHERAL, &LPUART1_LPUART_eDMA_Handle, LPUART1_LPUART_eDMA_Callback, NULL, &LPUART1_TX_Handle,

&LPUART1_RX_Handle);

}

I have the same LPUART configuration in second project that do not use other i2c, i2s, SPI and this implementation works perfect. 

 

In principle, both projects are to run on separate RT1024 and talk to each other

ラベル(1)
0 件の賞賛
返信
2 返答(返信)

414件の閲覧回数
asarbs
Contributor II

Thanks for replay, it was some initialization order issue. I have manage to fix it. 

448件の閲覧回数
RaRo
NXP TechSupport
NXP TechSupport

Hello @asarbs,

Could you please use the lpuart_edma_transfer SDK example as a guide for your development? You could download it here.

Comparing your code with the example there are missing code that might be necessary to add, for example, it seems that you do not initialize the EDMA module with EDMA_Init before using EDMA_CreateHandle.

Also, could you please tell us why are you using channels 12 and 28? In i.MX RT1024 Processor Reference Manual. Chapter 4. Interrupts, DMA Events, and XBAR Assignments. Section 4.4. DMA Mux. Table 4-3. DMA Mux Mapping., indicates that channel 12 and 28 are reserved. Could you please try using another channels?

Best regards, Raul.

0 件の賞賛
返信