LIN master stops transmission when no respose

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

LIN master stops transmission when no respose

1,445 Views
xiaoyang
Contributor I

Dear, 

I am trying use KEAZN64 as LIN master node and I used FSL_LIN_2.x_STACK_Package_4.5.9 to generate LIN code.

The communication was correct when slave node responded rx frame. But if a rx frame sent by master has no response, the master node will stop transmission and no more frame header will be sent ( Although the frame is scheduled in correct time as break field can be sent ).

I tried three ways out to result in the problem:

1. Disconnect LIN bus of slave node.

2. Slave node stop LIN function but LIN bus connect.

3. Master send a frame but there is no related slave node response.( In this case, the first frames that have responses were sent correctly) 

I haven't found any related explain or how to set master node in LIN spec and LIN stack user manual. 

Thanks

Labels (1)
0 Kudos
6 Replies

1,214 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Xiao Yang,

    Do you mean, if you disconnect the LIN wire between the master node and the  slave node, then connect the LIN wire again, the LIN communication will be stopped?

   Do you tried the NXP TRK-KEA64 board with the FSL_LIN_2.x_STACK_Package_4.5.9  sample code directly?

   I have tested it on my side, after I disconnect the LIN wire between the LIN master and the LIN slave, the LIN communication will be stopped, but after I connect the LIN wire again, after a moment, the LIN communication will be work again.

   Please check my attached test result, master: TRK-KEA64 board, the on board chip is SKEAZN64MLH2, the slave node is the TRK-KEA128 board.

   You can find when I disconnect the LIN wire, then the D6,D8 won't blink, but after I connect the LIN wire again, then the D6,D8 on both the master and slave works.

    So, I think you can try the official board and the official sample code directly on your side.

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

1,214 Views
xiaoyang
Contributor I

Dear Kerry,

Thank you for your responce. My chip is S9KEAZN64AMLC, and FSL_LIN_2.x_STACK_Package_4.5.9.

I tried re-connect LIN wire but master still stop sending frame.

In my case , master node will stop sending frame when a rx frame header was sent but no responce ( for example slave disconnected ). However, break field can be sent at correct scheduled time as oscilloscope showed (attached video). 

I suppose master node send next frame header after slave responce timeout, but my software didn't work. Maybe I have wrong schedule setting in my code. l_sch_set_LI0() is called at initialization to set schedule table and l_sch_tick_LI0() is called periodically as time base.

I will check my code later.

Thanks!

0 Kudos

1,214 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Xiao yang,

    Thank you for your updated information.

     Do you have test the KEAZN64 sample code in the following code directly:

C:\nxp\FSL_LIN_2.x_STACK_Package_4.5.9\Examples\Kinetis\KEA64

  Without any modification, whether it works OK on your side or not? We just to make sure it is not the stack porting problem. From my side test result with official examples, the master won't stop work.


Have a great day,
Kerry

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

0 Kudos

1,214 Views
xiaoyang
Contributor I

Hi Kerry,

I have found the problem.

In sample l_sch_tick() is called every 15ms ( with time base 5ms in LDF ). But I called l_sch_tick() every 5ms. 

I modifed the period and LIN communication correctly( 1. can recover after re-connect LIN bus.  2. keep sending when no responce)

Now the question is how to calculate the period of l_sch_tick().

I just found explanation in LIN 2.2A Specification that l_sch_tick() should be called periodically according to time base. Why it is called every 15ms while time base is 5ms ? 

Thanks!

0 Kudos

1,214 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Xiao Yang,

    Please check the LIN_User_Manual.pdf in the LIN stack folder:

C:\nxp\FSL_LIN_2.x_STACK_Package_4.5.9\Documentation
Chapter 4.6.3 Timer for LIN schedule execution.

The 15ms is used for every LIN frame transmission.

Wish it helps you!
Have a great day,
Kerry

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

1,214 Views
xiaoyang
Contributor I

Hi Kerry,

   In the documentation "the API function for schedule-table execution must be called at or multiple of the corresponding time-base interval".  

I wonder if the peroid is fixed for all cases. What if time-base is 10ms in another LDF ?

0 Kudos