FSL_LIN_2.X_STACK_Package_4.5.9: How to clear the Error_in_response bit returned of l_ifc_read_status function

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

FSL_LIN_2.X_STACK_Package_4.5.9: How to clear the Error_in_response bit returned of l_ifc_read_status function

1,398 Views
jeffcharles
Contributor III

Hi,

As a master, the header is transmitted but I can't receive the response in a 15ms frame_slot  from slave. So I want to check the lin-bus status to know the cause of failure. It may be lost of slave node or response error. I call the l_ifc_read_status and it returns the status of the previous communication. I use CANoe to simulate the slave node and try to interfere the data field in response. The test result is that:

pastedImage_1.png

pastedImage_2.png

pastedImage_3.png

CANoe invert bit 0(0->1) in the data byte 0 about MSG2 to result in response error and the debugger window shows the Error in response bit returned of l_ifc_read_status function is set to '1'. That is good. But after the next message is transmitted successfully, this bit can't be cleared to ‘0’. Why is that?

Please help me to solve the problem, thanks!  

0 Kudos
4 Replies

985 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hi jeffcharles ,

Let me apologize for the delay. This issue will be fixed in the new version of LIN stack 4.6.0.

It should be available soon on the website.

Best regards,

Diana

0 Kudos

985 Views
jeffcharles
Contributor III

Hi Diana,

Thank you for the reply. Besides, I find a new problem about the LIN stack 4.5.9:

After I call the ld_read_by_id, I wait for the returned value of ld_is_ready. But if the response is disturbed, the returned value is uncertain.

Case 1: Data byte 0-7 bit x is inverted, the returned value of ld_is_ready is LD_REQUEST_FINISHED

pastedImage_5.png

Case 2: Checksum bit x is inverted, the returned value of ld_is_ready is LD_SERVICE_ERROR

pastedImage_6.png

I think it does not follow the LIN 2.1, and I hope the new version will solve the above problems.

pastedImage_4.png

pastedImage_1.png

0 Kudos

985 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hi Jeff,

I asked the LIN stack team for their advice and the answer you can see below.

I think it is not a problem with the LIN stack 4.5.9 because:

  1. With case 2: Checksum bit x is inverted, the returned value of ld_is_ready is LD_SERVICE_ERROR, it is normal behavior.
  2. With case 1: Data byte 0-7 bit x is inverted, the returned value of ld_is_ready is LD_REQUEST_FINISHED because:
  • After first send the master request (read by identifier) successfully the return value of ld_is_ready() is LD_REQUEST_FINISHED
  • Because the response is disturbed of data byte 0-7 (just wrong data and not framing error), so the master node will wait until timeout of frame happened to set LD_SERVICE_ERROR but because the time slot for slave response frame quite short so another frame start before timeout of no-data happened and this slave response frame will be discarded (As chapter 2.3.1.2 When a break/sync field sequence happens, the transfer in progress shall be aborted and processing of the new frame shall commence.   S12Z have this feature.). So, if you increase time slot of slave response frame to make no-data timeout happen ld_is_ready will return LD_SERVICE_ERROR(please see attached file for more information).

I hope it helps you.

Best regards,

Diana

0 Kudos

985 Views
jeffcharles
Contributor III

Hi Diana,

I've got it. So, how long will make no-data timeout? The time slot for slave response is 15ms and it is unable to change. Can the timeout value be changed?

0 Kudos