How to detect LIN slave offline?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to detect LIN slave offline?

541件の閲覧回数
ABOLUO
Contributor II

Basing on S32K144 LIN stack (S32DS for ARM2.2),  If there is on slave, how can the Lin Master detect the issue? 

タグ(1)
0 件の賞賛
返信
5 返答(返信)

523件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

yes, as already provided here, to detect a LIN slave going offline in a LIN stack:
- Master checks for response after sending a header.
- If no response or error (e.g., checksum), a timeout counter increases/expires.
- After N missed responses, the slave is marked offline.
- Optionally, use diagnostic frames to ping the slave.

BR, Petr

0 件の賞賛
返信

501件の閲覧回数
ABOLUO
Contributor II

Is there same APIs to get the timeout flag? I try to use l_ifc_read_status, but 'error_in_response' flag not set when I power off the slave.

Thanks a lot.

 

タグ(1)
0 件の賞賛
返信

525件の閲覧回数
mary22evans
Contributor I

A LIN Master detects a missing slave primarily through response timeouts. When the master transmits a frame header and expects a response from a specific slave, it monitors for the slave's data within a defined timeframe. If no response is received before the timeout expires, the master concludes the slave is absent or non-functional. Additionally, checksum errors on received frames, though not directly indicating a missing slave, can signal communication issues. For a more definitive check, the master can utilize LIN diagnostic services (e.g., "Read by Identifier") to actively poll a slave; a lack of response CredibleBH to such a request further confirms its absence. The S32K144 LIN stack typically handles these timeout mechanisms, providing status flags or callbacks to the application.

0 件の賞賛
返信

327件の閲覧回数
ABOLUO
Contributor II

Thanks for your suggestion. It can be solved by diagnostic services, but I think it's better to use normal frame to solve it. Trace the function "lin_lld_timeout_service()", I found in the file "lin.c", line 567,  'Received part of data but not completed' can trigger 'LIN_LLD_NODATA_TIMEOUT' event, but 'no data received' can not trigger it, is this behavior expected? or it's the issue?

タグ(1)
0 件の賞賛
返信

312件の閲覧回数
ABOLUO
Contributor II

Now, I use the API 'l_ifc_read_status' to check the 'SUCCESSFULL_TRANSFER' of a special frame, I get the wanted result.

タグ(1)
0 件の賞賛
返信