Dear all,
i'm using the S32K3X4EVB-T172 Evaluation Board (S32K344) and the LINSTACK for S32K3 version 2.0.5.
My setup is as follows.
The MCU (S32K344) acts as a LIN Master. Inside ldf file three frames are declared (0x27, 0x28, 0x29), each frame hast the same structure ( getting values from temperaturre sensors)
This works fine, please see following screenshot (right now no slave is responding to the frames)
As soon as the slaves are responding to the Frames, i see a strange behaviour.
If only one slave is active (doesn't matter which one), everything is fine. The data are refreshed periodically inside the MCU. I observe the g_lin_frame_data_buffer and also the application variables.
If slave1 and slave2 are active, slave1 is behaving fine, slave2 does not refresh data. Remember, running each slave alone does work fine.
if all three slaves are active, no slave does refresh data.
But, using an oscilloscope and decoding the frames with it, shows that the data on the physical LIN BUS seems to be fine.
Can you please tell me what i'm doing wrong.
Your help is very appreciated.
Best Regards
Dirk
已解决! 转到解答。
Dear Daniel,
i have found the issue.
l_sch_tick() was called periodically every 10ms ( time base is also 10ms within ldf file ).
But lin_dat_timeout_service() was also called every 10ms. After changing the periodicity of lin_dat_timeout_service() to 1ms, everything has been fine.
Now im able to receive all three frames fro the slaves.
Thanks a lot for your support !!!
Best Regards
Dirk
Dear Daniel,
i have found the issue.
l_sch_tick() was called periodically every 10ms ( time base is also 10ms within ldf file ).
But lin_dat_timeout_service() was also called every 10ms. After changing the periodicity of lin_dat_timeout_service() to 1ms, everything has been fine.
Now im able to receive all three frames fro the slaves.
Thanks a lot for your support !!!
Best Regards
Dirk
Hello Daniel,
thanks for your fast response.
I have checked the CRC data of all three farmes, it is correct.
See Oszi screenshot and results from "online LIN CRC calculator".
The Lin Signal looks also ok to me, here is a screenshot with onyl 0x27 active.
and also a "zoom screenshot" to frame 0x27 only.
The behaviour is still the same.
Best Regards
Dirk
Hello Daniel,
i just placed the function call, l_ifc_read_status(), directly inside the "LinTick Task", the same task which calls:
The value, returned by function l_ifc_read_status() is:
0x27 only active, yellow marker:
59152 (0b1110011100010000) for 40ms
43024 (0b1010100000010000) for 80 ms
0x27 and 0x28 are active, green marker:
59152 (0b1110011100010000) for 80ms
59664 (0b1110100100010000) for 40ms
0x27, 0x28 and 0x29 are active, blue marker:
59152 all the time.
Remember, my ldf is configured to send every 40ms a frame (0x27, 0x28, 0x29) and then repeat.
Best Regards
Dirk