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:
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!
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
Case 2: Checksum bit x is inverted, the returned value of ld_is_ready is LD_SERVICE_ERROR
I think it does not follow the LIN 2.1, and I hope the new version will solve the above problems.
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:
I hope it helps you.