S32K1 LIN stack - diagnostic slave response

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

S32K1 LIN stack - diagnostic slave response

1,585件の閲覧回数
Francesco_Solito
Contributor II

Good morning

I'm making a slave device and I'm using LIN stack.

How can I check that a slave response has been phisically sent on LIN bus?

For instance, when I receive a reset diagnostic frame (11 01), I parse it with ld_receive_message() and I prepare the response with ld_send_message(); then I have to really reset the microprocessor, but only after I'm sure that the slave response was really sent on bus. How can I check that the response was sent on bus? ld_send_message() only prepares the response, but this does not mean that it was phisically sent on bus.

As regards normal frames (not diagnostic), what is the way to ensure the same thing? (I mean, be sure that the response to a frame was really sent on bus).

Thank you in advance and kind regards,

Francesco Solito

0 件の賞賛
返信
2 返答(返信)

1,535件の閲覧回数
DanNguyenDuy
NXP Employee
NXP Employee

Hi @Francesco_Solito,

For instance, when I receive a reset diagnostic frame (11 01), I parse it with ld_receive_message() and I prepare the response with ld_send_message(); then I havesss to really reset the microprocessor, but only after I'm sure that the slave response was really sent on bus. How can I check that the response was sent on bus? ld_send_message() only prepares the response, but this does not mean that it was phisically sent on bus.
=> As far as I know, you can use ld_raw_tx_status() function to check the status of tx_queue.
tx_queue will be updated with data after you call ld_send_message() and will be cleaned after it is transmitted.
Please refer the chapter 7.4.3.3 of LIN_Specification_Package_2.2A.pdf to more detail.
      nxf78987_0-1688653316065.png

 

 
As regards normal frames (not diagnostic), what is the way to ensure the same thing? (I mean, be sure that the response to a frame was really sent on bus).
=> For Unconditional frame, you can use l_flg_tst() to check status. The flag will be set when the frame is successfully transmitted from the node.
Please refer the chapter 7.2.3 of LIN_Specification_Package_2.2A.pdf to more detail
      nxf78987_1-1688653316067.png

 

      nxf78987_2-1688653316068.png

Best regards,

Dan

0 件の賞賛
返信

1,502件の閲覧回数
Francesco_Solito
Contributor II

Thank you very much. I'll try both suggestiones.

Kind regards,

Francesco