Merging different projects and initializing multiple sources for multiple UART ports for DMAMUX

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

Merging different projects and initializing multiple sources for multiple UART ports for DMAMUX

ソリューションへジャンプ
620件の閲覧回数
VolcanicCheese
Contributor III

Question1

I am currently working on implementing LPUART on top of the the powermode switch example code. From what I understand, transferring code from different project does not work because of the Freertos configuration/setting the project is defined as. How do I check if the configuration of the Freertos in the powermode switch example code would work in corresponding with the code written LPUART edma example code.

Question 2

If I want to initialize three LPUARTS ports, I was not sure how the DMA channels were selected. I was not able to find any documentation and understand how the value are being selected for TX and RX DMA channel. Also, how do I make sure that the channel I set for UART corresponds to the pins that I want to use on the DEV board for UART communication. This is the part of the example code I am not sure about. How to set the LPUART_TX_DMA_CHANNEL? I am assuming that all the LPUART would be set under one DMAMUX and is that a safe assumption.

/* Set channel for LPUART */
DMAMUX_SetSource(DMAMUX, LPUART_TX_DMA_CHANNEL, kDmaRequestMuxLPUART1Tx);
DMAMUX_SetSource(DMAMUX, LPUART_RX_DMA_CHANNEL, kDmaRequestMuxLPUART1Rx);
DMAMUX_SetSource(DMAMUX, LPUART_TX_DMA_CHANNEL, kDmaRequestMuxLPUART2Tx);
DMAMUX_SetSource(DMAMUX, LPUART_RX_DMA_CHANNEL, kDmaRequestMuxLPUART2Rx);
DMAMUX_SetSource(DMAMUX, LPUART_TX_DMA_CHANNEL, kDmaRequestMuxLPUART3Tx);
DMAMUX_SetSource(DMAMUX, LPUART_RX_DMA_CHANNEL, kDmaRequestMuxLPUART3Rx);

0 件の賞賛
1 解決策
614件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi @VolcanicCheese ,

1. There is no settings or restrictions for use  LPUART in freertos.

2. Please refer to the DMA mux chapter in reference manual. Each DMA channel can only be used once. So, at least you should 

DMAMUX_SetSource(DMAMUX, 1, kDmaRequestMuxLPUART1Tx);
DMAMUX_SetSource(DMAMUX, 2, kDmaRequestMuxLPUART1Rx);
DMAMUX_SetSource(DMAMUX, 3, kDmaRequestMuxLPUART2Tx);
DMAMUX_SetSource(DMAMUX, 4, kDmaRequestMuxLPUART2Rx);
DMAMUX_SetSource(DMAMUX, 5, kDmaRequestMuxLPUART3Tx);
DMAMUX_SetSource(DMAMUX, 6, kDmaRequestMuxLPUART3Rx);

 

Regards,

Jing

元の投稿で解決策を見る

1 返信
615件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi @VolcanicCheese ,

1. There is no settings or restrictions for use  LPUART in freertos.

2. Please refer to the DMA mux chapter in reference manual. Each DMA channel can only be used once. So, at least you should 

DMAMUX_SetSource(DMAMUX, 1, kDmaRequestMuxLPUART1Tx);
DMAMUX_SetSource(DMAMUX, 2, kDmaRequestMuxLPUART1Rx);
DMAMUX_SetSource(DMAMUX, 3, kDmaRequestMuxLPUART2Tx);
DMAMUX_SetSource(DMAMUX, 4, kDmaRequestMuxLPUART2Rx);
DMAMUX_SetSource(DMAMUX, 5, kDmaRequestMuxLPUART3Tx);
DMAMUX_SetSource(DMAMUX, 6, kDmaRequestMuxLPUART3Rx);

 

Regards,

Jing