Using UART in KIT912J637EVME

cancel
Showing results for 
Search instead for 
Did you mean: 

Using UART in KIT912J637EVME

231 Views
jorge_guzman
Contributor I

Hello,

I am using KIT912J637EVME. I would like to know if it is
possible to use UART commutication with this kit.

I saw the chip has serial communication interface (SCI) registers,
but in the example i have, it uses for LIN communication.

If it is possible, is there any example I could use?

Thank you in advance,

Jorge Guzman

Tags (2)
0 Kudos
1 Reply

106 Views
RadekS
NXP Employee
NXP Employee

Hi Jorge,

The SCI is serial interface like UART.

In fact, the LIN module is just PHY and LIN messages are handled by SCI module.

When you will change routing by GPIO_CTL, GPIO_Inx, GPIO_OUTy registers, the port B pins may be used for SCI RX and TX signals directly.

 

Unfortunately, I don’t have SCI example code directly for MM912J637.

However, the SCI is quite simple module and using that should not be difficult.

You need configure baud rate and set control registers. When you want send byte, you should check TDRE bit and write into SCI data register only when TDRE=1. When module receive data, RDRF flag will be set. RDRF flag is cleared by read SCIS1 with RDRF = 1 and then read the SCI data register (SCID).

Note: Be aware, that this reading and flag clearing may happen also by BDM debugger when you halt a code (e.g. breakpoint). Therefore, we should store SCIS1 register content into variable prior breakpoint and start debugging SCI interrupt routine.

 

As inspiration, you may use attached example code for S12XEP100, but keep in mind that the MM912J637 use slightly different version of SCI module placed on Analog die. There may be differences in byte, bit name convention, clock source and some features, but the basic principle remains the same.

I hope it helps you.

Have a great day,
Radek

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