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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
2,254 次查看
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 解答
1,562 次查看
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,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!
-----------------------------------------------------------------------------------------------------------------------

1,562 次查看
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,562 次查看
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!
-----------------------------------------------------------------------------------------------------------------------