LPUART12 eDMA does not work on RT1176 CM7.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPUART12 eDMA does not work on RT1176 CM7.

Jump to solution
1,216 Views
Gyosun
Contributor III

Hello,

 

I am using RT1176 custom board.

We are using only CM7 single core.

I created evkbmimxrt1170_lpuart_edma_transfer_cm7 example project using MCUXpresso IDE and tested eDMA of lpuart1 well.

lpuart12 rx interrupt and tx are confirmed to work well.

However, lpuart12 also needs eDMA, so I am testing it by referring to the example, but I am having difficulty.

Q1) Is it impossible to use lpuart12 eDMA on CM7?
Q2) Is there any reference example or modification method?

Any advice would be appreciated.


Thank you.
Best Regards.
Gyosun.

0 Kudos
Reply
1 Solution
1,138 Views
mayliu1
NXP Employee
NXP Employee

Hi @Gyosun ,

 

Thanks for your updated information.

I checked your code,  some code configuration are not correct.

In IMXRT1170RM reference manual, It describe that "EDMA is in
CM7 domain and co-works with CM7, EDMA_LPSR is in CM4 domain and co-works
with CM4. "

Picture1.png

 

Your code is in CM7, so please modify your code  DMAMUX1  to  DMAMUX0,  DMA1 to DMA0.

I did a test, LPUART_UserCallback() can successfully called.

Picture2.png

 

Wish it helps you.
If you still have question about it, please kindly let me know.

Best Regards

MayLiu

View solution in original post

0 Kudos
Reply
5 Replies
1,194 Views
mayliu1
NXP Employee
NXP Employee

Hi @Gyosun,

 

Thank you so much for your interest in our products and for using our community.

Q1) Is it impossible to use lpuart12 eDMA on CM7?

Answer: It is possible to use LPUART12 eDMA in CM7.
Q2) Is there any reference example or modification method?

Answer: SDK demo about LPUART eDAM is based on LPUART1.

But you still can refer to this SDK demo "evkbmimxrt1170_lpuart_edma_transfer_cm7"

and modify LPUART1 to LPUART12.

Please double check channel and source set when call DMAMUX_SetSource function.

 

Wish it helps you.
If you still have question about it, please kindly let me know.

Best Regards

MayLiu

0 Kudos
Reply
1,177 Views
Gyosun
Contributor III

Hi MayLiu,


I set it as follows and confirmed that data is transmitted with LPUART12_Send_eDMA().

However, LPUART_UserCallback() is not called after transmission is completed.

When I check DMA1->INT, LPUART12_TX_DMA_CHANNEL bit is set to 1 and not cleared.

Q) Why is LPUART_UserCallback() not called?

MIMXRT1176_cm7.h
/* DMAMUX - Peripheral instance base addresses */
/** Peripheral DMAMUX0 base address */
#define DMAMUX0_BASE                             (0x40074000u)
#define DMAMUX1_BASE                             (0x40C18000u)
/** Peripheral DMAMUX0 base pointer */
#define DMAMUX0                                  ((DMAMUX_Type *)DMAMUX0_BASE)
#define DMAMUX1                                  ((DMAMUX_Type *)DMAMUX1_BASE)
/** Array initializer of DMAMUX peripheral base addresses */
#define DMAMUX_BASE_ADDRS                        { DMAMUX0_BASE, DMAMUX1_BASE }
/** Array initializer of DMAMUX peripheral base pointers */
#define DMAMUX_BASE_PTRS                         { DMAMUX0, DMAMUX1 }
 
/* DMA - Peripheral instance base addresses */
/** Peripheral DMA0 base address */
#define DMA0_BASE                                (0x40070000u)
#define DMA1_BASE                                (0x40C14000u)
/** Peripheral DMA0 base pointer */
#define DMA0                                     ((DMA_Type *)DMA0_BASE)
#define DMA1                                     ((DMA_Type *)DMA1_BASE)
/** Array initializer of DMA peripheral base addresses */
#define DMA_BASE_ADDRS                           { DMA0_BASE, DMA1_BASE }
/** Array initializer of DMA peripheral base pointers */
#define DMA_BASE_PTRS                            { DMA0, DMA1 }
/** Interrupt vectors for the DMA peripheral type */
#define DMA_CHN_IRQS                             { { DMA0_DMA16_IRQn, DMA1_DMA17_IRQn, DMA2_DMA18_IRQn, DMA3_DMA19_IRQn, DMA4_DMA20_IRQn, DMA5_DMA21_IRQn, DMA6_DMA22_IRQn, DMA7_DMA23_IRQn, DMA8_DMA24_IRQn, DMA9_DMA25_IRQn, DMA10_DMA26_IRQn, DMA11_DMA27_IRQn, DMA12_DMA28_IRQn, DMA13_DMA29_IRQn, DMA14_DMA30_IRQn, DMA15_DMA31_IRQn, DMA0_DMA16_IRQn, DMA1_DMA17_IRQn, DMA2_DMA18_IRQn, DMA3_DMA19_IRQn, DMA4_DMA20_IRQn, DMA5_DMA21_IRQn, DMA6_DMA22_IRQn, DMA7_DMA23_IRQn, DMA8_DMA24_IRQn, DMA9_DMA25_IRQn, DMA10_DMA26_IRQn, DMA11_DMA27_IRQn, DMA12_DMA28_IRQn, DMA13_DMA29_IRQn, DMA14_DMA30_IRQn, DMA15_DMA31_IRQn } }
#define DMA_ERROR_IRQS                           { DMA_ERROR_IRQn }
 
------------------------------------------------------------------
#define LPUART12_TX_DMA_CHANNEL          2U
#define LPUART12_TX_DMA_REQUEST          kDmaRequestMuxLPUART12Tx
lpuart_edma_handle_t g_lpuartEdmaHandle12;
edma_handle_t g_lpuartTxEdmaHandle12;
volatile bool txOnGoing;
 
void BOARD_InitUartDma(void)
{
    edma_config_t config;
    DMAMUX_Init(DMAMUX1);
    DMAMUX_SetSource(DMAMUX1, LPUART12_TX_DMA_CHANNEL, LPUART12_TX_DMA_REQUEST);
    DMAMUX_EnableChannel(DMAMUX1, LPUART12_TX_DMA_CHANNEL);
    EDMA_GetDefaultConfig(&config);
    EDMA_Init(DMA1, &config);
    EDMA_CreateHandle(&g_lpuartTxEdmaHandle12, DMA1, LPUART12_TX_DMA_CHANNEL);
    LPUART_TransferCreateHandleEDMA(LPUART12, &g_lpuartEdmaHandle12, LPUART_UserCallback, NULL,
    &g_lpuartTxEdmaHandle12, NULL);
    txOnGoing = true;
}
 
void LPUART_UserCallback(LPUART_Type *base, lpuart_edma_handle_t *handle, status_t status, void *userData)
{
PRINTF("Callback\r\n");
if (((uint32_t)base & 0xFFFF0000) == DMA1_BASE)
{
if (kStatus_LPUART_TxIdle == status)
{
txOnGoing = false;
}
}
}
 
void LPUART12_Send_eDMA(uint8_t *buf, size_t size)
{
lpuart_transfer_t xfer;
xfer.data = buf;
xfer.dataSize = size;
LPUART_SendEDMA(LPUART12, &g_lpuartEdmaHandle12, &xfer);
}
 
Thank you,
Best Regards,
Gyosun.
0 Kudos
Reply
1,139 Views
mayliu1
NXP Employee
NXP Employee

Hi @Gyosun ,

 

Thanks for your updated information.

I checked your code,  some code configuration are not correct.

In IMXRT1170RM reference manual, It describe that "EDMA is in
CM7 domain and co-works with CM7, EDMA_LPSR is in CM4 domain and co-works
with CM4. "

Picture1.png

 

Your code is in CM7, so please modify your code  DMAMUX1  to  DMAMUX0,  DMA1 to DMA0.

I did a test, LPUART_UserCallback() can successfully called.

Picture2.png

 

Wish it helps you.
If you still have question about it, please kindly let me know.

Best Regards

MayLiu

0 Kudos
Reply
1,128 Views
Gyosun
Contributor III
Hi MayLiu,
Oh! This is incredible!
Thank you for your help.
Gyosun.
0 Kudos
Reply
1,122 Views
mayliu1
NXP Employee
NXP Employee

You are welcome!

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2046302%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ELPUART12%20eDMA%20does%20not%20work%20on%20RT1176%20CM7.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2046302%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI%20am%20using%20RT1176%20custom%20board.%3C%2FP%3E%3CP%3EWe%20are%20using%20only%20CM7%20single%20core.%3C%2FP%3E%3CP%3EI%20created%20evkbmimxrt1170_lpuart_edma_transfer_cm7%20example%20project%20using%20MCUXpresso%20IDE%20and%20tested%20eDMA%20of%20lpuart1%20well.%3C%2FP%3E%3CP%3Elpuart12%20rx%20interrupt%20and%20tx%20are%20confirmed%20to%20work%20well.%3C%2FP%3E%3CP%3EHowever%2C%20lpuart12%20also%20needs%20eDMA%2C%20so%20I%20am%20testing%20it%20by%20referring%20to%20the%20example%2C%20but%20I%20am%20having%20difficulty.%3C%2FP%3E%3CP%3EQ1)%20Is%20it%20impossible%20to%20use%20lpuart12%20eDMA%20on%20CM7%3F%3CBR%20%2F%3EQ2)%20Is%20there%20any%20reference%20example%20or%20modification%20method%3F%3C%2FP%3E%3CP%3EAny%20advice%20would%20be%20appreciated.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EThank%20you.%3CBR%20%2F%3EBest%20Regards.%3CBR%20%2F%3EGyosun.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2050367%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LPUART12%20eDMA%20does%20not%20work%20on%20RT1176%20CM7.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2050367%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EYou%20are%20welcome!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2050309%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LPUART12%20eDMA%20does%20not%20work%20on%20RT1176%20CM7.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2050309%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHi%20MayLiu%2C%3CBR%20%2F%3EOh!%20This%20is%20incredible!%3CBR%20%2F%3EThank%20you%20for%20your%20help.%3CBR%20%2F%3EGyosun.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2049538%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LPUART12%20eDMA%20does%20not%20work%20on%20RT1176%20CM7.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2049538%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F179917%22%20target%3D%22_blank%22%3E%40Gyosun%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThanks%20for%20your%20updated%20information.%3C%2FP%3E%0A%3CP%3EI%20checked%20your%20code%2C%26nbsp%3B%20some%20code%20configuration%20are%20not%20correct.%3C%2FP%3E%0A%3CP%3EIn%20IMXRT1170RM%20reference%20manual%2C%20It%20describe%20that%20%22EDMA%20is%20in%3CBR%20%2F%3ECM7%20domain%20and%20co-works%20with%20CM7%2C%20EDMA_LPSR%20is%20in%20CM4%20domain%20and%20co-works%3CBR%20%2F%3Ewith%20CM4.%20%22%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Picture1.png%22%20style%3D%22width%3A%20829px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Picture1.png%22%20style%3D%22width%3A%20829px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F325262i1F611FD348CB8B7B%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Picture1.png%22%20alt%3D%22Picture1.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditormayliu1_0%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3EYour%20code%20is%20in%20CM7%2C%20so%20please%20modify%20your%20code%26nbsp%3B%3CSPAN%3E%26nbsp%3BDMAMUX1%26nbsp%3B%20to%26nbsp%3B%26nbsp%3BDMAMUX0%2C%26nbsp%3B%26nbsp%3BDMA1%20to%26nbsp%3BDMA0.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EI%20did%20a%20test%2C%20LPUART_UserCallback()%20can%20successfully%20called.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Picture2.png%22%20style%3D%22width%3A%20992px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Picture2.png%22%20style%3D%22width%3A%20992px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F325263i7AD7F3A4B4044FD6%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Picture2.png%22%20alt%3D%22Picture2.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EWish%20it%20helps%20you.%3CBR%20%2F%3EIf%20you%20still%20have%20question%20about%20it%2C%20please%20kindly%20let%20me%20know.%3C%2FP%3E%0A%3CP%3EBest%20Regards%3C%2FP%3E%0A%3CP%3EMayLiu%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2048685%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LPUART12%20eDMA%20does%20not%20work%20on%20RT1176%20CM7.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2048685%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20MayLiu%2C%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EI%20set%20it%20as%20follows%20and%20confirmed%20that%20data%20is%20transmitted%20with%20LPUART12_Send_eDMA().%3C%2FP%3E%3CP%3EHowever%2C%20LPUART_UserCallback()%20is%20not%20called%20after%20transmission%20is%20completed.%3C%2FP%3E%3CP%3EWhen%20I%20check%20DMA1-%26gt%3BINT%2C%20LPUART12_TX_DMA_CHANNEL%20bit%20is%20set%20to%201%20and%20not%20cleared.%3C%2FP%3E%3CP%3EQ)%20Why%20is%20LPUART_UserCallback()%20not%20called%3F%3C%2FP%3E%3CDIV%3EMIMXRT1176_cm7.h%3C%2FDIV%3E%3CDIV%3E%2F*%20DMAMUX%20-%20Peripheral%20instance%20base%20addresses%20*%2F%3C%2FDIV%3E%3CDIV%3E%2F**%20Peripheral%20DMAMUX0%20base%20address%20*%2F%3C%2FDIV%3E%3CDIV%3E%23define%20DMAMUX0_BASE%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B(0x40074000u)%3C%2FDIV%3E%3CDIV%3E%23define%20DMAMUX1_BASE%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B(0x40C18000u)%3C%2FDIV%3E%3CDIV%3E%2F**%20Peripheral%20DMAMUX0%20base%20pointer%20*%2F%3C%2FDIV%3E%3CDIV%3E%23define%20DMAMUX0%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20((DMAMUX_Type%20*)DMAMUX0_BASE)%3C%2FDIV%3E%3CDIV%3E%23define%20DMAMUX1%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20((DMAMUX_Type%20*)DMAMUX1_BASE)%3C%2FDIV%3E%3CDIV%3E%2F**%20Array%20initializer%20of%20DMAMUX%20peripheral%20base%20addresses%20*%2F%3C%2FDIV%3E%3CDIV%3E%23define%20DMAMUX_BASE_ADDRS%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%7B%20DMAMUX0_BASE%2C%20DMAMUX1_BASE%20%7D%3C%2FDIV%3E%3CDIV%3E%2F**%20Array%20initializer%20of%20DMAMUX%20peripheral%20base%20pointers%20*%2F%3C%2FDIV%3E%3CDIV%3E%23define%20DMAMUX_BASE_PTRS%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%7B%20DMAMUX0%2C%20DMAMUX1%20%7D%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%2F*%20DMA%20-%20Peripheral%20instance%20base%20addresses%20*%2F%3C%2FDIV%3E%3CDIV%3E%2F**%20Peripheral%20DMA0%20base%20address%20*%2F%3C%2FDIV%3E%3CDIV%3E%23define%20DMA0_BASE%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20(0x40070000u)%3C%2FDIV%3E%3CDIV%3E%23define%20DMA1_BASE%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20(0x40C14000u)%3C%2FDIV%3E%3CDIV%3E%2F**%20Peripheral%20DMA0%20base%20pointer%20*%2F%3C%2FDIV%3E%3CDIV%3E%23define%20DMA0%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B((DMA_Type%20*)DMA0_BASE)%3C%2FDIV%3E%3CDIV%3E%23define%20DMA1%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B((DMA_Type%20*)DMA1_BASE)%3C%2FDIV%3E%3CDIV%3E%2F**%20Array%20initializer%20of%20DMA%20peripheral%20base%20addresses%20*%2F%3C%2FDIV%3E%3CDIV%3E%23define%20DMA_BASE_ADDRS%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%7B%20DMA0_BASE%2C%20DMA1_BASE%20%7D%3C%2FDIV%3E%3CDIV%3E%2F**%20Array%20initializer%20of%20DMA%20peripheral%20base%20pointers%20*%2F%3C%2FDIV%3E%3CDIV%3E%23define%20DMA_BASE_PTRS%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%7B%20DMA0%2C%20DMA1%20%7D%3C%2FDIV%3E%3CDIV%3E%2F**%20Interrupt%20vectors%20for%20the%20DMA%20peripheral%20type%20*%2F%3C%2FDIV%3E%3CDIV%3E%23define%20DMA_CHN_IRQS%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%7B%20%7B%20DMA0_DMA16_IRQn%2C%20DMA1_DMA17_IRQn%2C%20DMA2_DMA18_IRQn%2C%20DMA3_DMA19_IRQn%2C%20DMA4_DMA20_IRQn%2C%20DMA5_DMA21_IRQn%2C%20DMA6_DMA22_IRQn%2C%20DMA7_DMA23_IRQn%2C%20DMA8_DMA24_IRQn%2C%20DMA9_DMA25_IRQn%2C%20DMA10_DMA26_IRQn%2C%20DMA11_DMA27_IRQn%2C%20DMA12_DMA28_IRQn%2C%20DMA13_DMA29_IRQn%2C%20DMA14_DMA30_IRQn%2C%20DMA15_DMA31_IRQn%2C%20DMA0_DMA16_IRQn%2C%20DMA1_DMA17_IRQn%2C%20DMA2_DMA18_IRQn%2C%20DMA3_DMA19_IRQn%2C%20DMA4_DMA20_IRQn%2C%20DMA5_DMA21_IRQn%2C%20DMA6_DMA22_IRQn%2C%20DMA7_DMA23_IRQn%2C%20DMA8_DMA24_IRQn%2C%20DMA9_DMA25_IRQn%2C%20DMA10_DMA26_IRQn%2C%20DMA11_DMA27_IRQn%2C%20DMA12_DMA28_IRQn%2C%20DMA13_DMA29_IRQn%2C%20DMA14_DMA30_IRQn%2C%20DMA15_DMA31_IRQn%20%7D%20%7D%3C%2FDIV%3E%3CDIV%3E%23define%20DMA_ERROR_IRQS%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%7B%20DMA_ERROR_IRQn%20%7D%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E------------------------------------------------------------------%3C%2FDIV%3E%3CDIV%3E%23define%20LPUART12_TX_DMA_CHANNEL%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%202U%3C%2FDIV%3E%3CDIV%3E%23define%20LPUART12_TX_DMA_REQUEST%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20kDmaRequestMuxLPUART12Tx%3C%2FDIV%3E%3CDIV%3Elpuart_edma_handle_t%20g_lpuartEdmaHandle12%3B%3C%2FDIV%3E%3CDIV%3Eedma_handle_t%20g_lpuartTxEdmaHandle12%3B%3C%2FDIV%3E%3CDIV%3Evolatile%20bool%20txOnGoing%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3Evoid%20BOARD_InitUartDma(void)%3C%2FDIV%3E%3CDIV%3E%7B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20edma_config_t%20config%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20DMAMUX_Init(DMAMUX1)%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20DMAMUX_SetSource(DMAMUX1%2C%20LPUART12_TX_DMA_CHANNEL%2C%20LPUART12_TX_DMA_REQUEST)%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20DMAMUX_EnableChannel(DMAMUX1%2C%20LPUART12_TX_DMA_CHANNEL)%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20EDMA_GetDefaultConfig(%26amp%3Bconfig)%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20EDMA_Init(DMA1%2C%20%26amp%3Bconfig)%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20EDMA_CreateHandle(%26amp%3Bg_lpuartTxEdmaHandle12%2C%20DMA1%2C%20LPUART12_TX_DMA_CHANNEL)%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20LPUART_TransferCreateHandleEDMA(LPUART12%2C%20%26amp%3Bg_lpuartEdmaHandle12%2C%20LPUART_UserCallback%2C%20NULL%2C%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20%26amp%3Bg_lpuartTxEdmaHandle12%2C%20NULL)%3B%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%20%26nbsp%3B%20txOnGoing%20%3D%20true%3B%3C%2FDIV%3E%3CDIV%3E%7D%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3Evoid%20LPUART_UserCallback(LPUART_Type%20*base%2C%20lpuart_edma_handle_t%20*handle%2C%20status_t%20status%2C%20void%20*userData)%3C%2FDIV%3E%3CDIV%3E%7B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EPRINTF(%22Callback%5Cr%5Cn%22)%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Eif%20(((uint32_t)base%20%26amp%3B%200xFFFF0000)%20%3D%3D%20DMA1_BASE)%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Eif%20(kStatus_LPUART_TxIdle%20%3D%3D%20status)%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EtxOnGoing%20%3D%20false%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%20%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%7D%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3Evoid%20LPUART12_Send_eDMA(uint8_t%20*buf%2C%20size_t%20size)%3C%2FDIV%3E%3CDIV%3E%7B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Elpuart_transfer_t%20xfer%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Exfer.data%20%3D%20buf%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Exfer.dataSize%20%3D%20size%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3ELPUART_SendEDMA(LPUART12%2C%20%26amp%3Bg_lpuartEdmaHandle12%2C%20%26amp%3Bxfer)%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%7D%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EThank%20you%2C%3C%2FDIV%3E%3CDIV%3EBest%20Regards%2C%3C%2FDIV%3E%3CDIV%3EGyosun.%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2047715%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LPUART12%20eDMA%20does%20not%20work%20on%20RT1176%20CM7.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2047715%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F179917%22%20target%3D%22_blank%22%3E%40Gyosun%3C%2FA%3E%2C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThank%20you%20so%20much%20for%20your%20interest%20in%20our%20products%20and%20for%20using%20our%20community.%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EQ1)%20Is%20it%20impossible%20to%20use%20lpuart12%20eDMA%20on%20CM7%3F%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EAnswer%3A%20It%20is%20possible%20to%20use%20LPUART12%20eDMA%20in%20CM7.%3CBR%20%2F%3E%3CSPAN%3EQ2)%20Is%20there%20any%20reference%20example%20or%20modification%20method%3F%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EAnswer%3A%20SDK%20demo%20about%20LPUART%20eDAM%20is%20based%20on%20LPUART1.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EBut%20you%20still%20can%20refer%20to%20this%20SDK%20demo%20%22evkbmimxrt1170_lpuart_edma_transfer_cm7%22%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3Eand%20modify%20LPUART1%20to%20LPUART12.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EPlease%20double%20check%20channel%20and%20source%20set%20when%20call%26nbsp%3BDMAMUX_SetSource%20function.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditormayliu1_1%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3EWish%20it%20helps%20you.%3CBR%20%2F%3EIf%20you%20still%20have%20question%20about%20it%2C%20please%20kindly%20let%20me%20know.%3C%2FP%3E%0A%3CP%3EBest%20Regards%3C%2FP%3E%0A%3CP%3EMayLiu%3C%2FP%3E%3C%2FLINGO-BODY%3E