LIN_Stack Package for Kinetis

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

LIN_Stack Package for Kinetis

1,192 Views
hanisamara
Contributor III

Hello all,

i just installed the Lin_stack_package FSL_LIN_2.x_STACK_Package_4.5.9 and generate the code for my TRK Kinetis EA64. I can compile the code with codewarrior and flash the mcu. I built a CANoe Simulation to simulate the Master. I use the Lin connector on the TRK to connect with LIN/CANoe. My Master has a single frame with 2 signals. The Slave (TRK) has on Frame with 2 signals. I need just to turn the LEDs On and OFF with Lin. But my Slave is not responding!! The master plays the schedule table periodically. I can see the Master frame on the bus, and the master puts the Header of the Slave frame on the bus too, but the Slave do not answer!! 

LIN 2.0

Slave Mode

UART_LIN 0

speed 19.2 kbps

 

find attached the LDF and NPF files and the main.c file. In the main i just chek the two Lin Signals and switch the LEDs on or off according to the received signal. The application is toggle the LED0 every 125ms just to know that the applicaion is running.

Thank you

Hani

3 Replies

762 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Hani,

I am checking the same question with Case Number: 00142547.

Please check my reply with that case. Thanks.


Have a great day,
Mike

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

762 Views
jananisubraveti
Contributor II

I am facing similar problem, how can i find the question with Case Number: 00142547. It would be great if someone shares the link here.

0 Kudos
Reply

762 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Here is the case number: 00142547 comments:

First, it need to check the TRK-KEA64 board schematics version, the Rev B and below with the full LIN circuit, should works.
The Rev. C board and above had removed some resistors with LIN circuit, make the LIN couldn't work.

pastedImage_1.png

Then, it need to check the KEA64 clock setting, which is different with KEA128:
LIN bus baud rate is 9600
KEA128 setting:
<lin_hw_cfg.h> line55:
/* MCU bus frequency */
#define MCU_BUS_FREQ 20000000
<main.c> function Clk_Init() line 77
ICS_C3= 0x90; /* Reference clock frequency = 39.0625 KHz*/
KEA64 setting:
<lin_hw_cfg.h> line59:
/* MCU bus frequency */
#define MCU_BUS_FREQ 19500000
<main.c> function Clk_Init() line 77
ICS_C3= 0x50; /* Reference clock frequency = 39.0625 KHz*/
Third Hardware setting:
TRK-KEA64 J13 2-3 and power from P1 (12V)
Wish it helps.
best regards,
Mike