I'm currently using S32K311 with NXP MBDT on Simulink (R2024a), S32CT.
I have followed the examples of LIN provided on the MBDT, configured S32K311 as LIN Slave on LIN_Channel0 using S32CT. I need help implementing LIN Sleep and Wakeup functionality.
Here's what I have so far -
I have created a sample LDF and a sample test configuration on Vector CANoe. Created just 2 frames - command frame (Frame ID 0x00, PID 0x80) and Status frame (Frame ID 0x01, PID 0xC1). I am able to send Sleep request(0x3C 00 FF FF FF FF FF FF FF) using the same Config and observed that the Slave stops responding as soon as the Sleep request is sent. This is a snippet of LIN Trace.
beginner100_1-1760536318548.png
Now from the Simulink model perspective, here is the implementation I followed.
Following the example, within 'Initialize' subsystem, I have LIN_WakeupInternal added.
beginner100_4-1760536649915.png
Using LINIf_HeaderIndication, checking for Channel as LIN_Channel0 and PID as 0x3C for GoToSleep request as shown below
beginner100_2-1760536367940.png
beginner100_3-1760536417895.png
Inside, 0x3C Request subsystem
beginner100_0-1760536213660.png
I have also added 'Lin_CheckWakeup' function and I monitored the checkWakeupStatus data store block (iniitalized to 1) on FreeMaster which always returns 0.
I have also read the Documentation on Lin and LinIf supported functionalities which talks about 'EcuM_WakeupSourceType' Is it something to do with enabling this option on S32CT?
beginner100_5-1760536929758.png
beginner100_6-1760537248910.png
beginner100_7-1760537763628.png
Now, at this point, I don't know how to implement WakeUp functionality and resume the LIN Trace activity. I couldn't find any resources on this and I need help. Please let me know how to proceed.