Simple UART Interrupt Routine

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Simple UART Interrupt Routine

ソリューションへジャンプ
2,310件の閲覧回数
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 解決策
967件の閲覧回数
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 返答(返信)
968件の閲覧回数
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 件の賞賛
967件の閲覧回数
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

967件の閲覧回数
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 件の賞賛
967件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Phil,

Welcome !

BR

Alice

0 件の賞賛