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

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

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

Jump to solution
958 Views
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 Kudos
1 Solution
844 Views
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

View solution in original post

0 Kudos
5 Replies
845 Views
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 Kudos
844 Views
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 Kudos
844 Views
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 Kudos
844 Views
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 Kudos
844 Views
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 Kudos