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,246件の閲覧回数
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,144件の閲覧回数
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,167件の閲覧回数
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 件の賞賛
返信