Simple UART Interrupt Routine

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

Simple UART Interrupt Routine

Jump to solution
2,266 Views
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

Labels (1)
1 Solution
923 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
4 Replies
924 Views
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 Kudos
923 Views
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

923 Views
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 Kudos
923 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Phil,

Welcome !

BR

Alice

0 Kudos