S32G3 LLCE LIN Master missing Rx response when "Disable Frame Timeout" is unchecked

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

S32G3 LLCE LIN Master missing Rx response when "Disable Frame Timeout" is unchecked

109 Views
cjq
Contributor I

Hi NXP Experts,

I am currently working on the LIN implementation using the LLCE component on S32G3 (running as a LIN Master). We are using S32G_LLCE_1_0_10.

We have encountered a strange behavior regarding the Frame Timeout configuration in the LLCE LIN firmware, and I would like to seek some internal details or clarifications about the firmware's black-box logic.

Problem Description:
When configuring the LIN channel with "Disable Frame Timeout" UNCHECKED (meaning timeout detection is enabled) and setting the Response Timeout value to 14:

The LLCE LIN Master successfully transmits the Header (Break + Sync + PID) to the bus.

The Slave node receives the Header and responds with the correct Data + Checksum immediately.

However, the LLCE LIN Master randomly or constantly fails to capture/receive the data. It behaves as if the data is lost or dropped by the LLCE firmware.

Workaround Found:
If we simply CHECK "Disable Frame Timeout" (disabling the firmware's internal timeout logic) in the configuration tool while keeping all other hardware and physical bus environments exactly the same:

The Master never drops any data and successfully receives every single response from the Slave.

Our Questions:
Since the LLCE_firmware_user_guide.pdf provides very limited information about the internal state machine, we are confused by this behavior:

How is the timeout value "14" precisely calculated inside the LLCE firmware? Does a value of 14 represent absolute microseconds, bit times, or cycles related to a specific GPT/timer clock source?

Why does the Master fail to grab the response even when the Slave replies immediately? Is it possible that the timeout counter starts too early (e.g., before the Header finishes transmitting), or is "14" too small a threshold due to some internal hardware/firmware execution latency?

What is the recommended way to properly calculate and set this timeout value if we do want to keep the Frame Timeout protection active without dropping valid responses?

Any documentation, application notes, or insights into the LLCE LIN firmware's internal timing logic would be highly appreciated.

Thanks in advance!

Best regards,
cjq

Tags (1)
0 Kudos
Reply
5 Replies

85 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @cjq 

Thanks for the post.

1. May I know if you are working with a S32G3 based custom board or reference board from NXP?

2. Is the issue found in your custom implementation or from any samples provisioned by NXP?

 

BR

Chenyin

0 Kudos
Reply

67 Views
cjq
Contributor I

Hi Chenyin,

Thank you for your quick response. Here are the clarifications to your questions, along with a correction regarding the firmware version:

  1. Hardware: We are using a custom board based on S32G3, not the official NXP reference board.

  2. Implementation: We are not running the official example directly. It is our custom implementation, but it is closely referenced and developed based on the official NXP sample code.

Correction on Firmware Version: I realized I made a mistake regarding the version in my initial post. We are actually using S32G_LLCE_1_0_09, not S32G_LLCE_1_0_10.

Could you please help check if there are any known bugs related to the LIN response timeout in version 1.0.09, or how the timeout value "14" is interpreted by this specific firmware version?

Best regards, cjq

Tags (1)
0 Kudos
Reply

55 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @cjq 

Thanks for your clarification.

1. If DisableFrameTimeout box is checked, then Lin driver will accept the frame that is longer than Maximal Frame Length.

2. For "LinResponseTimeout", the reset value is 0Eh = 14, corresponding to T_Response_Maximum = 1.4 x T_Response_Nominal. This is the response timeout duration (in bit time) for 1 byte.

 

BR

Chenyin

 

 

0 Kudos
Reply

31 Views
cjq
Contributor I

Hi Chenyin,

Thank you for the clarification. Since we have decided to keep DisableFrameTimeout checked for our application, the specific timeout calculation is no longer an issue for us.

However, I would like to confirm one specific behavior regarding the firmware's state machine when DisableFrameTimeout is enabled:

When the LIN Master transmits a Header and the Slave fails to reply, calling Lin_GetStatus() shows that the channel remains permanently stuck in the LIN_TX_BUSY state.

Is this permanent LIN_TX_BUSY state the expected and normal behavior of the LLCE firmware under this configuration?

I assume that because the frame timeout logic is entirely disabled, the internal state machine will wait indefinitely for the response data and will never automatically transition out of the busy state. I just want to verify if my understanding aligns with the official design.

Best regards, cjq

Tags (1)
0 Kudos
Reply

2 Views
chenyin_h
NXP Employee
NXP Employee

Hello, @cjq 

Thanks for your reply.

With frame timeout disabled and no slave response, since LLCE_LIN state machine receives neither a response-complete event nor a timeout event, there would be issues, so If no-response detection is required, keep frame timeout enabled or implement an application-level timeout that aborts/reinitializes the LIN channel.

 

BR

Chenyin

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2394154%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32G3%20LLCE%20LIN%20Master%20missing%20Rx%20response%20when%20%22Disable%20Frame%20Timeout%22%20is%20unchecked%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2394154%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20NXP%20Experts%2C%3C%2FP%3E%3CP%3EI%20am%20currently%20working%20on%20the%20LIN%20implementation%20using%20the%20LLCE%20component%20on%20S32G3%20(running%20as%20a%20LIN%20Master).%20We%20are%20using%20S32G_LLCE_1_0_10.%3C%2FP%3E%3CP%3EWe%20have%20encountered%20a%20strange%20behavior%20regarding%20the%20Frame%20Timeout%20configuration%20in%20the%20LLCE%20LIN%20firmware%2C%20and%20I%20would%20like%20to%20seek%20some%20internal%20details%20or%20clarifications%20about%20the%20firmware's%20black-box%20logic.%3C%2FP%3E%3CP%3EProblem%20Description%3A%3CBR%20%2F%3EWhen%20configuring%20the%20LIN%20channel%20with%20%22Disable%20Frame%20Timeout%22%20UNCHECKED%20(meaning%20timeout%20detection%20is%20enabled)%20and%20setting%20the%20Response%20Timeout%20value%20to%2014%3A%3C%2FP%3E%3CP%3EThe%20LLCE%20LIN%20Master%20successfully%20transmits%20the%20Header%20(Break%20%2B%20Sync%20%2B%20PID)%20to%20the%20bus.%3C%2FP%3E%3CP%3EThe%20Slave%20node%20receives%20the%20Header%20and%20responds%20with%20the%20correct%20Data%20%2B%20Checksum%20immediately.%3C%2FP%3E%3CP%3EHowever%2C%20the%20LLCE%20LIN%20Master%20randomly%20or%20constantly%20fails%20to%20capture%2Freceive%20the%20data.%20It%20behaves%20as%20if%20the%20data%20is%20lost%20or%20dropped%20by%20the%20LLCE%20firmware.%3C%2FP%3E%3CP%3EWorkaround%20Found%3A%3CBR%20%2F%3EIf%20we%20simply%20CHECK%20%22Disable%20Frame%20Timeout%22%20(disabling%20the%20firmware's%20internal%20timeout%20logic)%20in%20the%20configuration%20tool%20while%20keeping%20all%20other%20hardware%20and%20physical%20bus%20environments%20exactly%20the%20same%3A%3C%2FP%3E%3CP%3EThe%20Master%20never%20drops%20any%20data%20and%20successfully%20receives%20every%20single%20response%20from%20the%20Slave.%3C%2FP%3E%3CP%3EOur%20Questions%3A%3CBR%20%2F%3ESince%20the%20LLCE_firmware_user_guide.pdf%20provides%20very%20limited%20information%20about%20the%20internal%20state%20machine%2C%20we%20are%20confused%20by%20this%20behavior%3A%3C%2FP%3E%3CP%3EHow%20is%20the%20timeout%20value%20%2214%22%20precisely%20calculated%20inside%20the%20LLCE%20firmware%3F%20Does%20a%20value%20of%2014%20represent%20absolute%20microseconds%2C%20bit%20times%2C%20or%20cycles%20related%20to%20a%20specific%20GPT%2Ftimer%20clock%20source%3F%3C%2FP%3E%3CP%3EWhy%20does%20the%20Master%20fail%20to%20grab%20the%20response%20even%20when%20the%20Slave%20replies%20immediately%3F%20Is%20it%20possible%20that%20the%20timeout%20counter%20starts%20too%20early%20(e.g.%2C%20before%20the%20Header%20finishes%20transmitting)%2C%20or%20is%20%2214%22%20too%20small%20a%20threshold%20due%20to%20some%20internal%20hardware%2Ffirmware%20execution%20latency%3F%3C%2FP%3E%3CP%3EWhat%20is%20the%20recommended%20way%20to%20properly%20calculate%20and%20set%20this%20timeout%20value%20if%20we%20do%20want%20to%20keep%20the%20Frame%20Timeout%20protection%20active%20without%20dropping%20valid%20responses%3F%3C%2FP%3E%3CP%3EAny%20documentation%2C%20application%20notes%2C%20or%20insights%20into%20the%20LLCE%20LIN%20firmware's%20internal%20timing%20logic%20would%20be%20highly%20appreciated.%3C%2FP%3E%3CP%3EThanks%20in%20advance!%3C%2FP%3E%3CP%3EBest%20regards%2C%3CBR%20%2F%3Ecjq%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2394617%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32G3%20LLCE%20LIN%20Master%20missing%20Rx%20response%20when%20%22Disable%20Frame%20Timeout%22%20is%20unchecked%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2394617%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F264646%22%20target%3D%22_blank%22%3E%40cjq%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20for%20your%20clarification.%3C%2FP%3E%0A%3CP%3E1.%20If%20DisableFrameTimeout%20box%20is%20checked%2C%20then%20Lin%20driver%20will%20accept%20the%20frame%20that%20is%20longer%20than%20Maximal%20Frame%20Length.%3C%2FP%3E%0A%3CP%3E2.%20For%20%22LinResponseTimeout%22%2C%20t%3CSPAN%20class%3D%22fontstyle0%22%3Ehe%20reset%20value%20is%200Eh%20%3D%2014%2C%20corresponding%20to%20T_Response_Maximum%20%3D%201.4%20x%20T_Response_Nominal.%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22fontstyle0%22%3EThis%20is%20the%20response%20timeout%20duration%20(in%20bit%20time)%20for%201%20byte.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%20class%3D%22fontstyle0%22%3EBR%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22fontstyle0%22%3EChenyin%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CLI-WRAPPER%3E%26nbsp%3B%3C%2FLI-WRAPPER%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2394375%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32G3%20LLCE%20LIN%20Master%20missing%20Rx%20response%20when%20%22Disable%20Frame%20Timeout%22%20is%20unchecked%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2394375%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Chenyin%2C%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20quick%20response.%20Here%20are%20the%20clarifications%20to%20your%20questions%2C%20along%20with%20a%20correction%20regarding%20the%20firmware%20version%3A%3C%2FP%3E%3COL%3E%3CLI%3E%3CP%3E%3CSTRONG%3EHardware%3A%3C%2FSTRONG%3E%20We%20are%20using%20a%20%3CSTRONG%3Ecustom%20board%3C%2FSTRONG%3E%20based%20on%20S32G3%2C%20not%20the%20official%20NXP%20reference%20board.%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3E%3CSTRONG%3EImplementation%3A%3C%2FSTRONG%3E%20We%20are%20%3CSTRONG%3Enot%3C%2FSTRONG%3E%20running%20the%20official%20example%20directly.%20It%20is%20our%20custom%20implementation%2C%20but%20it%20is%20closely%20referenced%20and%20developed%20based%20on%20the%20official%20NXP%20sample%20code.%3C%2FP%3E%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%3CSTRONG%3ECorrection%20on%20Firmware%20Version%3A%3C%2FSTRONG%3E%20I%20realized%20I%20made%20a%20mistake%20regarding%20the%20version%20in%20my%20initial%20post.%20We%20are%20actually%20using%20%3CSTRONG%3ES32G_LLCE_1_0_09%3C%2FSTRONG%3E%2C%20%3CI%3Enot%3C%2FI%3E%20S32G_LLCE_1_0_10.%3C%2FP%3E%3CP%3ECould%20you%20please%20help%20check%20if%20there%20are%20any%20known%20bugs%20related%20to%20the%20LIN%20response%20timeout%20in%20version%201.0.09%2C%20or%20how%20the%20timeout%20value%20%2214%22%20is%20interpreted%20by%20this%20specific%20firmware%20version%3F%3C%2FP%3E%3CP%3EBest%20regards%2C%20cjq%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2394191%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32G3%20LLCE%20LIN%20Master%20missing%20Rx%20response%20when%20%22Disable%20Frame%20Timeout%22%20is%20unchecked%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2394191%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F264646%22%20target%3D%22_blank%22%3E%40cjq%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20for%20the%20post.%3C%2FP%3E%0A%3CP%3E1.%20May%20I%20know%20if%20you%20are%20working%20with%20a%20S32G3%20based%20custom%20board%20or%20reference%20board%20from%20NXP%3F%3C%2FP%3E%0A%3CP%3E2.%20Is%20the%20issue%20found%20in%20your%20custom%20implementation%20or%20from%20any%20samples%20provisioned%20by%20NXP%3F%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EChenyin%3C%2FP%3E%3C%2FLINGO-BODY%3E