Can't receieve data on UART / ISR not firing for Rx

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

Can't receieve data on UART / ISR not firing for Rx

3,070件の閲覧回数
beng_
Contributor III

Try as I might I can't get the UART driver to receive data., it appears the the IRQ for the UART (UART2 in my case) isn't firing on a receive.

 

In a bit of test code running in the foreground, if I poll UART2->D then I'm receiving the data, so it isn't a board/hardware level issue.

 

I've based my code on the example at \SDK_2.0_MKL17Z256xxx4\boards\frdmkl43z\driver_examples\uart\interrupt_transfer

 

I'm using UART_TransferSendNonBlocking() and UART_TransferReceiveNonBlocking() to send and receive. Sending data over the UART works find and the IRQ UART_TransferHandleIRQ() fires when I'm sending data, however no matter how much data I transfer via UART the IRQ never fires when I'm attempting to receive.

 

Looking at a register level, all the bit's I'd expect to be set/clear are as I'd expect. I.e.

  • UART2->C2 - RIE (Receive Interrupt Enable) is set.
  • UART2->C2 - RE (Receive Enable) is set.
ラベル(1)
タグ(3)
0 件の賞賛
返信
3 返答(返信)

2,659件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi Ben Griffiths,

Thank you for your interest in NXP Semiconductor products and the opportunity to serve you.

I've already run the uart_interrupt_transfer demo on the FRDM-KL43 board, and it can enter the interrupt handler when receive the data (Seeing Fig 1), I'd highly recommend you to test again by referring to the readme introduction.

2017-01-17_12-12-23.jpg

Hope this is clear.
Have a great day,

Ping

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

0 件の賞賛
返信

2,659件の閲覧回数
beng_
Contributor III

jeremyzhou

The IRQ UART_TransferHandleIRQ() is being called on a send, but no matter how much data I send via a terminal on a PC the IRQ isn't being called when attempting to receive.

I can't see anything in the readme.txt that helps.

0 件の賞賛
返信

2,659件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi Ben Griffiths,

I've recorded the debugging operation of the interrupt_transfer, in the video, you can find that the UART2_FLEXIO_IRQHandler will be called when send some charter in the SComAssistant.

I've also illustrated the board setting before debugging and please checking it.

545096100782023165.jpg

Hope it helps.
Have a great day,
Ping

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

0 件の賞賛
返信