LIN Incomplete Frame Reception - Header without response

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

LIN Incomplete Frame Reception - Header without response

1,905 Views
gabr
Contributor II

Hello guys, any idea why the 3rd test failed?

gabr_0-1662631803444.png

The spec is saying: 

gabr_1-1662631868762.jpeg

But in the nxp source code I found:

gabr_2-1662631936766.png

 

Is this correct?

Tags (2)
0 Kudos
12 Replies

1,880 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

could you please specify documents and code/driver version you are referring to?

BR, Petr

0 Kudos

1,876 Views
gabr
Contributor II

Hello Petr, 

Thank you for the reply.

First picture is a description of the test.

Second picture is from LIN 2.1 Standard

Third picture is from lin_common_proto.c, version S32SDK_S32K1XX_RTM_4.0.2

BR, Gabr

0 Kudos

1,865 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

this is a feedback I got from SDK team...

Following the LIN 2.1 Standard specification, the Error_in_response bit shall not be set in case master no response. 

Anyway, I have checked the issue on my side based on your information. However, it seems I cannot reproduce your issue. The Error_in_response was not set after master sent header only. 

  • The header that was sent by Master. 

  PetrS_0-1663070510972.png

 

  • Check the driver code lin.c: 

PetrS_1-1663070511017.png

We only have LIN_LLD_NODATA_TIMEOUT when slave node has received the header and at least one byte of data. 

From my point of view, maybe we have other error on the bus(LIN_LLD_FRAME_ERR, LIN_LLD_READBACK_ERR…) not NODATA_TIMEOUT. You can set a break point on the lin_handle_error() function to know the exact error on the bus.

So please recheck the test case on your side and make sure that master node has sent header successfully and no response after that. 

If the issue is still not resolved, please let me know how I can reproduce it (send me your test case if possible). 

 

BR, Petr

1,862 Views
gabr
Contributor II

Hello Petr,

Thank you again for the reply, good to see that for you it's working. 

Here is the actual test:

gabr_0-1663072031405.png

The test was done by a 3rd party company and I can not reproduce it on my system because I can't manage to send only the header using CANoe in order to debug it.

BR, Gabr

0 Kudos

1,851 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

see feedback I got for this...

Following you information, I would like to share with you my example and CANoe script that I have used to test(Attachments).

  • Hardware: S32K144
  • Software: SDK K1XX RTM 4.0.2
  • You can open CanoeTest.cfg by CANoe to run script.

These are the frames on the bus that I have tried to test:

 

PetrS_0-1663147723868.png

BR, Petr

1,790 Views
gabr
Contributor II

Hello Petr, 

Thanks alot for the feedback.

Unfortunately for the test case 11.3 the Response Error bit is set 523 from 760 attempts:

gabr_0-1664429532188.jpeg

And in addition to that with these settings:

gabr_1-1664429704038.png

we see sporadic missing responses for the below tests:

[11.1] Send only the break field

gabr_2-1664429770100.png

[11.2] Send only BREAK and SYNC

gabr_3-1664429832906.png

[11.3] Send just the header of the Device Specific Receive Frame

gabr_4-1664429866727.png

Any idea where the problems could be?

BR, Gabr.

0 Kudos

1,734 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

please see below a feedback I got...

BR, Petr

According to your information, I tried to reproduce the issue (PT CT-11.3) with more than 1000 tries from my side. However, it seems impossible, you can see my report to more detail(Attachment).

Regarding the customer's problem, from my point of view the cause could be due to timing and interrupt handling.

So, please recheck the test case to make sure that:

  • Response_Error bit has been cleaned and node state is Idle before starting each test.
  • Timer Interrupt Handler(lin_lld_timeout_service) is called correctly and corresponds to your configuration. 
  • For example: 500us for each time.
  • Timer and LPUART interrupts are always handled.
  • In the test case, please ensure distance to the next header. The node enough time to return to Idle state after received an incomplete frame.

 

 In case the problem is still not resolved. If possible, please share with me some information:

  • Full of your test log. 
  • Hardware and software information.
  • Your configuration/the ldf file that you are using to test.
0 Kudos

1,574 Views
gabr
Contributor II

Hello Petr,

I see in your test that after you send only the header you wait 100ms and then check for the status:

gabr_1-1670577539936.png

But in the ISO 17987-6 standard it's saying that the wait should be frame max. time. and that is 9ms (8 byte frame the delay of T_Frame_Max = 173 Bit = 9 ms at 19200 Baud.)

gabr_0-1670577410613.png

On our side it's working also with more than 20ms, but that's not correct.

BR, Gabr.

0 Kudos

1,518 Views
gabr
Contributor II

PetrS did you have the chance to check this internally?

BR, Gabr.

0 Kudos

1,477 Views
gabr
Contributor II

PetrS did you have the chance to check this internally?

BR, Gabr.

0 Kudos

1,277 Views
nxf78987
NXP Employee
NXP Employee

Hi @gabr,

I am again with this topic. Please see the atached zip with the following info:
canoe_test where I modified the .can file for our project and for my tests I also added our LDF
commErr.png is the responce_error bit
event_id.png is the event id from lin_handle_error() when the error_in_response bit is set
report_10ms_wait is the report for when the timeout (see timeout.png) for the " testStep("Execution", "CANoe send a header of frame without response");" test is 10 ms
report_20ms_wait is the report for when the timeout (see timeout.png) for the " testStep("Execution", "CANoe send a header of frame without response");" test is 20 ms
As you can see from the reports, all tests are passed when the timeout is 20ms, but with 10ms the test fails everytime. Do you have any idea what should I check, what could be wrong?
Our colleagues together with NXP collegues are working on an NDA now and I will be able to also share the full ldf and project details. 
[Diep] From my point of view, the cause of the problem could be that the lin_lld_timeout_service() function was called incorrectly.
CANoe sends a header of frame without response and then the header of next frame is sent after 10ms, the frame timeout is always occurred. The frame without response will be ignored and the error_in_response bit is not set.
 
This is my example:
nxf78987_0-1680254523305.png

 

Channel_0: LIN signals
Channel_1: It is the time when lin_lld_timeout_service() function was called(each 500us)
The time between the header of frame without response and the header of next frame is 10ms. The frame timeout has occurred during this time.
 
So, please recheck the test case to make sure that:
  • Response_Error bit has been cleaned and node state is Idle before starting each test.
  • Timer Interrupt Handler(lin_lld_timeout_service) is called correctly and corresponds to your configuration. 
    For example: 500us for each time.
  • Timer and LPUART interrupts are always handled.
  • In the test case, please ensure distance to the next header. The node enough time to return to Idle state after received an incomplete frame.

Best regards,

Dan

0 Kudos

1,023 Views
Vojtech
Contributor II
Hello,
I am facing to issue with PT-CT 11.3 as well in my slave implementation. I have found, based on the last comment from Dan, that I do not call "lin_dal_timeout_service(..)" anyhow. I need to call it, I got it now. Could you pls specify in which document is this described? I would like to read it to prevent any other possible implementation issues.

Best Regards,
Vojtech
0 Kudos