UART Receive Interrupt in K53n512

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

UART Receive Interrupt in K53n512

1,070 Views
kanimozhiraju
Contributor I

Hi  ,

     I try to interface fingerprint module with k53.when i send commands to the module and try to read back from the data register.i couldnot get anything when i put the condition for receive read flag(RDRF)in status its not all satisfying the condition.Can anyone say the uart interrupt for both receive and send clearly.thank in advance

0 Kudos
7 Replies

848 Views
kanimozhiraju
Contributor I

tats fine...I try to finish it off.Thank you

0 Kudos

848 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi kanimozhi Raju,

   You are welcome!

   Any updated question about the kinetis for this topic, just let me know!


Have a great day,
Kerry

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

0 Kudos

848 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi kanimozhi Raju,

   Did you use the CommAssistant tool to test your fingerprint before? For example hypertrm.

   You must make sure your fingerprint can work at first.

   About the uart interrupt for receive and send.

   Actually, after you initialize the TIE and RIE in the UARTx_C2, and enable the according IRQ, add the ISR function. You can get the according interrupt work.

  Take TWR-K53N512 board sample code as an example.

pastedImage_1.png

  After enable the RIE, when the UART receive the UART data, it will enter the UART0_isr interrupt. Then send the received data back.

  I have attached my test code for your reference. The baud rate is 115200. Test board is TWR-K53N512.

Wish it helps you!


 


Have a great day,
Kerry

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


 

848 Views
kanimozhiraju
Contributor I

Thank you Kerry for the reply.Initially i have tested fingerprint module using sfgdemo software just taking 2 finger prints so i am sure about module working.But ,when i try in real term like sending  commands from real term send as numbers it does not transmit.So,can you say about how to test in realterm whether my commands are transmitting or not.Even if i send commands my module is not responding i.e led in module is not blinking.Thanks in advance.

0 Kudos

848 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Kanimozhi Raju,

   From your document, we can see that when K53 send data, your realTerm can receive it.

   Now, your problem is when use real term send data, you don't know whether it is really send.

   Actually, many ways can check it.

1. Loop back.

   real term is the PC software, you can connect TX and RX together in your COM-USB tool which connect to the PC, then check, when realTerm send data, whether itself can receive it or not.

2. check wave with oscilloscope in the PC TX pin.

When realTerm send data, whether the oscilloscope can get the according UART data in the TX bus of PC, it also the RX bus for MCU.

Please check the send data at first.

Wish it helps you!


Have a great day,
Kerry

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

0 Kudos

848 Views
kanimozhiraju
Contributor I

ok will try that.do you have sample code of fingerprint interface with kinetis controller.

0 Kudos

848 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi kanimozhi Raju,

   No, I don't have the fingerprint interface code, this is the detail application, normally customer need to finish it by themselves.

  But if it just use the UART to communicate with the Kinetis, it won't very difficult, you need to send the data meet your fingerprint datasheet, after the fingerprint send out the data, you need to use kinetis receive it, and process it with the code.

Wish it helps you!


Have a great day,
Kerry

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

0 Kudos