[JN-AN-1218][JN5169] Uart0 RX interrupt not triggered?

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

[JN-AN-1218][JN5169] Uart0 RX interrupt not triggered?

跳至解决方案
961 次查看
alan5_lin
Contributor III

Dear Sirs,

Ref: https://community.nxp.com/message/1000625?commentID=1000625#comment-1000625 

To add the interrupts for UART0, as below:

DBG_vUartInit(DBG_E_UART_0, DBG_E_UART_BAUD_RATE_115200);

vAHI_Uart0RegisterCallback(vUart0ISR);

vAHI_UartSetInterrupt(E_AHI_UART_0, FALSE, FALSE, TRUE, TRUE, E_AHI_UART_FIFO_LEVEL_1);

PUBLIC void vUart0ISR(uint32 u32DeviceId, uint32 u32ItemBitmap);

Of course, the priorities have set to irq_JN516x.S.  

The TX interrupt is fine.

But the RX interrupt is not triggered. ???

0 项奖励
1 解答
847 次查看
alan5_lin
Contributor III

Hi Mario,

This problem is solved.

 

Finally, I found the "DBG_vUartInit()" is called twice in the sample code of [JN-AN-1218].

It works if Uart0 interrupt is enabled in APP_vInitialise().

Thanks

在原帖中查看解决方案

0 项奖励
5 回复数
848 次查看
alan5_lin
Contributor III

Hi Mario,

This problem is solved.

 

Finally, I found the "DBG_vUartInit()" is called twice in the sample code of [JN-AN-1218].

It works if Uart0 interrupt is enabled in APP_vInitialise().

Thanks

0 项奖励
847 次查看
liliana252
Contributor I

Hello,. I am trying to get the RX interrupt to trigger on the PCA10001 board using the segger debugger as my serial terminal.

0 项奖励
847 次查看
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Liliana,

Please look at the JN-AN-1217, the common folder provides the UART driver.

The app_start provides all the UART initialization in the vAppMain, also it has to be managed with the OS, so look at the APP_taskAtSerial.

Regards,

Mario

0 项奖励
847 次查看
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Alan,

Did you add to the PIC_SwVectTable?

for example

PIC_SwVectTable:
    .word vUnclaimedInterrupt               # 0
    .word vUnclaimedInterrupt               # 1
    .word vUnclaimedInterrupt               # 2
    .word vUnclaimedInterrupt               # 3
    .word vUnclaimedInterrupt               # 4
    .word APP_isrUart                       # 5
    .word vUnclaimedInterrupt               # 6

Regards,

Mario

0 项奖励
847 次查看
alan5_lin
Contributor III

Hi Mario,

Yes. PIC_SwVectTable is added. (Thus, TX interrupt is triggered fine)

The TX and RX interrupts are both enabled. as below.

vAHI_UartSetInterrupt(E_AHI_UART_0, FALSE, FALSE, TRUE, TRUE, E_AHI_UART_FIFO_LEVEL_1);

And the TX interrupt is fine. The procedure can run to ISR callback function.

But, RX interrupt is not triggered?

0 项奖励