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. ???
已解决! 转到解答。
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
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
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
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
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?