use LIN pin as a SCI(UART) of s12zvl micro

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

use LIN pin as a SCI(UART) of s12zvl micro

ソリューションへジャンプ
2,255件の閲覧回数
charudattaingal
Contributor IV

Dear Team,

 

I want to know is there any way to use LIN pin as a SCI of s12zvl micro?

Basically I want to use LIN pin of s12zvl controller as a SCI (UART).

If it is possible good to have if i get example code for it.

Requesting assistance for the same .

Thanks & Regards,

Charudatta

ラベル(1)
1 解決策
1,563件の閲覧回数
RadekS
NXP Employee
NXP Employee

Hi Charudatta,

In fact, LINPHY is routed directly to SCI0 module by default. See Figure 1-1. MC9S12ZVL-Family Block Diagram in RM.

When we want send or receive any LIN message, SCI0 peripheral is typically used for transmitting/receiving that signal.

Official LIN stack:

http://www.nxp.com/files/microcontrollers/software/device_drivers/FSL_LIN_2.X_STACK.zip


I hope it helps you.

Have a great day,
RadekS

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

元の投稿で解決策を見る

3 返答(返信)
1,564件の閲覧回数
RadekS
NXP Employee
NXP Employee

Hi Charudatta,

In fact, LINPHY is routed directly to SCI0 module by default. See Figure 1-1. MC9S12ZVL-Family Block Diagram in RM.

When we want send or receive any LIN message, SCI0 peripheral is typically used for transmitting/receiving that signal.

Official LIN stack:

http://www.nxp.com/files/microcontrollers/software/device_drivers/FSL_LIN_2.X_STACK.zip


I hope it helps you.

Have a great day,
RadekS

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

1,563件の閲覧回数
charudattaingal
Contributor IV

Dear team,

I want to use sci through LIN pin,my SCI frame data i want to Receive/Transmit  through LIN pin.

(half duplex UART)

what will be the configuration for that.?

pastedImage_1.png

First i will configure the  SOLORR[2:0] = 000 so Lin pin internally routed to SCI want to confirm.

After that  I can use UART functionality(UART RX/TX Interrupt)  as it is through LIN /or some more configuration require for LIN?

0 件の賞賛
返信
1,563件の閲覧回数
RadekS
NXP Employee
NXP Employee

Hi Charudatta,

If you will use SCI0 and LIN PHY, please use S0L0RR[2:0] = 0b000 or 0b100.

In that case, the command will be MODRR0=0x00; . Since this is default value after reset, this command is not necessary, but we should use it to be sure.

You need also configure LIN PHY and SCI module.

Very simple example for LIN could be found here:

https://community.freescale.com/docs/DOC-93792

Note: This example code is for S12G family and CW5.1. Therefore, the project cannot be used directly. It is just rather for inspiration. The C code should be compatible with exceptions in SCI baud rate, SCI interrupt vector and external LIN PHY.


I hope it helps you.

Have a great day,
RadekS

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