ADMA UART0 interrupt enable issue on lpuart_interrupt example (SDK_2.9.0_MIMX8QX5xxxFZ)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

ADMA UART0 interrupt enable issue on lpuart_interrupt example (SDK_2.9.0_MIMX8QX5xxxFZ)

2,244 次查看
emolina-ebers
Contributor II

Hello all,

This example by default uses CM4 UART, but I'm trying to modify code to work with ADMA UART0. So far, I have been hable to change code configuration to send and receive with blocking functions (lpuart_polling example).

Sadly I can't get the interrupt handle working in the example. 

I have attached the whole project for more information (it can be opened and compiled with MCUXpresso IDE).

I'm very confused about how it works, because definition "#define DEMO_LPUART_IRQHandler ADMA_UART0_INT_IRQHandler" seem to reference to the fsl_adapter_lpuart.c component, however I am not sure if it compiles because ifdef.

In the unmodified example with M4 UART, which is working fine for me, what I mention about fsl_adapter_lpuart.c looks similar.

In the example code only uses "LPUART_EnableInterrupts" and "EnableIRQ" to configure interrupt. There is no any mention to the handler except in a define.

If you could help me, it will be very appreciated.

 

0 项奖励
回复
2 回复数

2,142 次查看
emolina-ebers
Contributor II

Thank you for you response.

Sorry, I forgot this topic, I found the solution time ago. Since ADMA is in other subsystem different from CortexM4, it is needed to use IRQSteer API.

/* Enable interrupt in irqsteer */
IRQSTEER_Init(IRQSTEER);
IRQSTEER_EnableInterrupt(IRQSTEER, ADMA_UART0_INT_IRQn);

If someone is struggling with this, maybe this mention could help.

0 项奖励
回复

2,165 次查看
Juan-Rodarte
NXP Employee
NXP Employee

Hello.

If it works fine in the unmodified example you'd better use that one.
In the interrupt configuration you don't include the handler because you define it with the ADMA_UART0_INT_IRQHandler

0 项奖励
回复