- Add a CAN port, and define the Name and XNET database.
- In the configuration tab on the right, you can see Automatic Frame Processing, click to select this tab to enter the AFP configuration interface.
- In the drop-down box, you can see the AFP methods in VeriStand, and by default, there are only None(no AFP), NI VeriStand 2011_CRC8, and NI VeriStand 2011_CRC16. It is assumed here that after selecting fwTxPreprocess_AddCFI3v, there are still some parameters to be configurated on this page, just keep the default.
- After selecting the AFP method, you can add a frame under cyclic.
- Right-click the added frame, you can see the Add Automatic Processing Data option in the menu bar, click to add.
- After adding, you will see Automatic Frame Processing Data under the frame. There are two items in total, namely CRC and Counter.
- Click CRC, and the CRC configuration interface will appear on the right. First included byte, Last included byte, and Storage offset byte respectively represent the start byte, the last byte, and the storage byte of the Checksum. If Use alternate channel is not checked, Checksum will be performed by default. you can additionally configure the channel that triggers the Checksum calculation If it is checked. If the channel value is 0, the Checksum calculation will not be performed. If it is non-zero, the Checksum calculation will be performed. This feature can be used for Checksum fault injection.
- Click Counter, and the Counter configuration interface will appear on the right. Width [bit], Storage offset [byte], Bit offset [bit], and Initial value respectively represent the Counter width, the location of the Counter(Byte offset and Bit offset), and the initial value. If Use alternate channel is not checked, the Counter will be performed by default. you can additionally configure the channel that triggers Counter If it is checked. If the channel value is 0, the Counter will not be performed. If it is non-zero, the Counter will be performed. This feature can be used for Counter fault injection.
- For example, In the message 0x165, the Checksum byte is byte 7, and the Rolling Counter is in the first four bits of byte 6.
Then the configuration information of CRC and Counter is as follows:
CRC:
Counter:
Note: Starting from VeriStand 2023 Q3, the VeriStand XNET supports AFP implementation for CAN FD.