Simple UART Interrupt Routine

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

Simple UART Interrupt Routine

跳至解决方案
2,340 次查看
philhale
Contributor IV

I am working on a very simple project that interacts with a UART port using interrupts. My plan is to use the Peripheral Driver, "fsl_uart", and the RX/TX callback routines.

119687_119687.jpgScreenHunter_113 Dec. 23 15.51.jpg

At one point, I thought I got it to enter UART_DRV_IRQHandler but haven't been able to get it to work again. Either way, it never got to uartCom0_RxCallback when I entered a keystroke on the UART port. I have been able to get the UART_DRV_SendData and UART_DRV_ReceiveData in a polling kind of mode. My preference, at least on the receive side, is to always use the interrupt routine to process these inputs from the UART port.

 

Any ideas what is going on?

 

Thanks.

 

Phil

标签 (1)
1 解答
997 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Phil.

There i a bug on the function of "UART_DRV_IRQHandler" , please add the two line to the

receive interrupt and send interrupt :

pastedImage_0.png

you can also refer to here :

The usage of UART callback function install

After fixed here , if your project still can not work well , please send you project to me .


Have a great day,
Alice Yang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
4 回复数
998 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Phil.

There i a bug on the function of "UART_DRV_IRQHandler" , please add the two line to the

receive interrupt and send interrupt :

pastedImage_0.png

you can also refer to here :

The usage of UART callback function install

After fixed here , if your project still can not work well , please send you project to me .


Have a great day,
Alice Yang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
997 次查看
philhale
Contributor IV

Alice,

Thank you. I was not successful until I added a RX buffer. The modifications you suggested were required. Nothing worked without these changes so I thank you.

Thank you!

Phil

997 次查看
fanbowo
Contributor I

Thanks for your methode to solve this problem, I have been searching for the right way for about 6 hours tils I seeing your adding a RX buffer.

0 项奖励
997 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Phil,

Welcome !

BR

Alice

0 项奖励