[CanTp] Vehicle Diagnostic Communication Part 32 [Simulation 20]

[CanTp] Vehicle Diagnostic Communication Part 32 [Simulation 20] 車両診断通信
[CanTp] Vehicle Diagnostic Communication Part 32 [Simulation 20]

Click here for back issues.
https://www.simulationroom999.com/blog/diagnostic-communication-en-back-issue/

Introduction.

Let’s simulate ISO-TP. series.
Starting from this issue, we will check the structure surrounding CanTp, etc.

Identifying the interface of AUTOSAR CanTp

In the last issue, we pulled CanTp out of A-COMSTACK.
And to make it work, we need to figure out CanTp’s interface.

To do…
Just hang in there and read the AUTOSAR-CanTp docs!

AUTOSAR_SWS_CANTransportLayer r4.3

(Well, many may despair here.)

AUTOSAR CanTp interface specification overview

For those who don’t want to bother reading the specification, I have picked up the minimum necessary information on me.

Requirement No. Requirement Summary
[SWS_CanTp_00212]

Service name: CanTp_Transmit

This service is used to request the transfer of segmented data.

Transmission start instruction (segment type only. Non-segment is realized by other than CanTp.)
[SWS_CanTp_00213]

Service name: CanTp_MainFunction

The main function for scheduling the CAN TP.

Main function. Must be called at the drive cycle specified in the configuration. (Because timer-related processing is also included.)
[SWS_CanTp_00214]

Service name: CanTp_RxIndication

The CanIf module shall call this function after a successful reception of a Rx CAN L-PDU.

For receiving interrupt notification.
[SWS_CanTp_00215]

Service name: CanTp_TxConfirmation

The CanIf module shall call the function CanTp_TxConfirmation after the TP related CAN Frame (SF, FF, CF, FC) has been transmitted through the CAN network.

Transmission completion interrupt notification.
[SWS_CanTp_00216]

API function: CanIf_Transmit

This service initiates a request for transmission of the CAN L-PDU specified by the CanTxSduId and CAN related data in the L-SDU structure.

Request for transmission to the data link layer (CAN: ISO11898-1).

API function: PduR_CanTpCopyRxData

This function is called to provide the received data of an I-PDU segment (N-PDU) to the upper layer.

Copying received data to the specified buffer (including notification of remaining buffer size).

API function: PduR_CanTpCopyTxData

This function is called to acquire the transmit data of an I-PDU segment (N-PDU).

Copying transmitted data from the specified buffer.

API function: PduR_CanTpRxIndication

Called after an I-PDU has been received via the TP API, the result indicates whether the transmission was successful or not.

Notification of completion of diagnostic message reception (including error completion).

API function: PduR_CanTpStartOfReception

This function is called at the start of receiving an N-SDU.

Notification of the start of diagnostic message reception.

API function: PduR_CanTpTxConfirmation

This function is called after the I-PDU has been transmitted on its network, the result indicates whether the transmission was successful or not.

Notification of completion of diagnostic message transmission (including error completion).

This may still be enough to make you feel hopeless….

I will add a few imaginative explanations.
The first word is the key point.

It will be the following image.
CanTp_: Notification to CanTp
CanIf_: Notification from CanTp to CanIf
PduR_: Notification from CanTp to upper layer

This may still not be enough to understand.
Therefore, I will think about whether it can be figured out before the next time.

Conclusion

  • The AUTOSAR CanTp specification is published in AUTOSAR_SWS_CANTransportLayer.
  • The minimum interfaces that need to be grasped are the following.
    • CanTp_Transmit.
    • CanTp_MainFunction.
    • CanTp_RxIndication.
    • CanTp_TxConfirmation.
    • CanIf_Transmit.
    • PduR_CanTpCopyRxData.
    • PduR_CanTpCopyTxData.
    • PduR_CanTpRxIndication.
    • PduR_CanTpStartOfReception.
    • PduR_CanTpTxConfirmation.

Click here for back issues.

コメント

タイトルとURLをコピーしました