UART2_FLEXIO_IRQHandler trap

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

UART2_FLEXIO_IRQHandler trap

2,581件の閲覧回数
arnogir
Senior Contributor II

Hello,

I'm using Kinetis MKL17Z32 and the SDK v2.8 with MCUExpresso.

I'm using the uart driver and uart_adapter module.

But the uart_adapter module define the IRQ handler named "UART2_RX_TX_IRQHandler" whereas the g_pfnVectors defined into startup_mkl17z644.c (generated by sdk) define the vector name to "UART2_FLEXIO_IRQHandler"...

Is it a bug or we can configure that?

Thank

 

0 件の賞賛
返信
4 返答(返信)

2,346件の閲覧回数
KATE_WANG
NXP Employee
NXP Employee

Hi

For this specific case that the FLEXIO instance and the UART2 instance share the same IRQ entry, we do not provide the IRQ handler for UART2 in uart adapter layer and in fsl_uart.c, we only provide the IRQ handler for FLEXIO in fsl_flexio.c, considering user may include both flexio driver and uart driver(&adapter) in application. If user wants to use the IRQ handler routine in fsl_uart.c, then it is suggested to add the definition in application level(since kl17 is deprecated in mcuxpresso sdk support, frdmk32l2b's uart_interrupt_transfer example can be refered):

void UART2_FLEXIO_IRQHandler(void)
{
UART_TransferHandleIRQ(UART2, &g_uartHandle);
}

If user wants to use the IRQ handler routine in adapter, it is suggested to directly modify the definition of UART2_RX_TX_IRQHandler to UART2_FLEXIO_IRQHandler.

Thanks!

BR
KATE
0 件の賞賛
返信

2,560件の閲覧回数
gusarambula
NXP TechSupport
NXP TechSupport

Hello Arnogir,

I was checking the uart_adapter module and indeed the definitions differ from the UART driver. Would you please provide more details as of why you included both the uart driver and the uart_adapter module? If you need to use the UART you may use the UART driver only and use the UART2_FLEXIO_IRQHandler and that should work for your application.

Regards,

0 件の賞賛
返信

2,550件の閲覧回数
arnogir
Senior Contributor II

Hello
 

The Uart is the Driver, the uart_adapter is an "higher level" componant.

Then the Uart_Adapter use (and need) the Uart driver.

If I use only the Uart Driver, I should make some management which are already done by the uart_adapter.
 

I try to recreate a dummy project, just with adding uart and uart_adapter.

Then the UART2_FLEXIO_IRQHandler is existing into startupt_mkl17z644.c file, which call

UART2_FLEXIO_DriverIRQHandler function => IntDefaultHandler => while(1)

Like this function has attribut "Weak" if declared in other place, this declaration not used.

But like UART2_FLEXIO_IRQHandler is not declared, but UART2_IRQHandler into uart_adapter.c, when interrupt occurs, it is the IntDefaultHandler which is called instead of  UART2_IRQHandler ...

0 件の賞賛
返信

1,699件の閲覧回数
davidab
Contributor I

Hi arnogir,

Did you solve this case?

I'm having similar issues using freertos and uart

David

タグ(1)
0 件の賞賛
返信