-1

As part of CanTp protocol related tests, I have been trying to test N_As and N_Ar timeout errors, where N_AsMax = 1000ms and N_ArMax = 1000ms.

Is it possible to create the N_As and N_Ar timeouts with CANalyzer and/or using CAPL? It would be great help, if you can share a possible way to test these timing parameters using CANalyzer or CANoe.

Daemon Painter
  • 3,208
  • 3
  • 29
  • 44
Partha
  • 31
  • 1
  • 3

1 Answers1

1

CanTP is a protocol to extendend the maximum data length (in bytes) of any given CAN data frame over the traditional 8 bytes, please refer to ISO 15765-2. Here you can have Single Frames, or Multi-Frames, which are trains of related frames each one carrying a portion of the overall PDU. A flow control frame is sent, usually by the receiver, to address and instruct the transmitter on the protocol to be used for frame splitting.

According to docs,

N_Ar [is the] Time for transmission of the CAN frame (any N-PDU) on the receiver side (see ISO 15765-2)

N_As [is the] Time for transmission of the CAN frame (any N-PDU) on the sender side (see ISO 15765-2).

In addition, the following requirements are relevant:

[SWS_CanTp_00075] ⌈If the transmit confirmation is not received after a maximum time (equal to N_As), the CanTp module shall act as if it had received an unsuccessful transmission confirmation and any late confirmation shall be ignored. The CanTp module shall cancel (internally) the failed transmission. ⌋ ( )

[SWS_CanTp_00311] ⌈In case of N_Ar timeout occurrence (no confirmation from CAN driver for any of the FC frame sent) the CanTp module shall abort reception and notify the upper layer of this failure by calling the indication function PduR_CanTpRxIndication() with the result E_NOT_OK. ⌋ ( )

Coming back to your question:

Is it possible to create the N_As and N_Ar timeouts with CANalyzer and/or using CAPL?

Yes, by means of the osek_tp.dll file that you should have in your local CANoe install (I'm using CANoe v10.0). Examples on how to use it are well documented in the help document AN-IND-1-012_CAPL_Callback_Interface.pdf, again it should be distributed in your CANoe install folder.

According to that document,

Basically, the OSEK_TP.DLL implements fault injection functionality that has to be enabled explicitly in order to prevent unintentional usage. Once activated, it is possible to setup a specific fault on a connection that is executed during the next data transfer.

I'd urge to give it a read, and refer to linked documentation as well. I hope this is pointing you in the rigth direction.

Additional info:

Daemon Painter
  • 3,208
  • 3
  • 29
  • 44