1.4 CAN-TP interaction with the CAN/CAN-FD driver
CAN/CAN-FD Driver Configuration Settings
CAN-TP can select either CAN-FD or CAN as a dependent module and specifies the configurations it requires. This is selected under Peripheral Bus Type within CAN-TP's Easy View pane.
CAN-TP configures the CAN/CAN-FD drivers with a default payload size of 8 bytes.
When using CAN-FD driver version 1.2.1 or lower, Data Bit Rate Settings (Bit Rate Switch) will need to be manually enabled to achieve full CAN-FD speed.
FIFO settings enabled and used by CAN-TP
-
FIFO Rx: selected programmatically to be FIFO 1 by CAN-TP to receive CAN/CAN-FD packets.
-
FIFO Tx: selected programmatically to be FIFO TXQ by CAN-TP to transmit CAN/CAN-FD packets. Within the CAN-FD FIFO settings the user can select a custom Payload size which will be used by the CAN-TP module. For CAN the FIFO payload size cannot be altered and is set to a default of 8-bytes. This will be defined as the CAN_TP_TRANSMISSION_DATA_LENGTH_MAX in the can_tp_config.h file.
Message IDs for RX FIFO1 settings are handled by the user
-
The user can add either an Extended ID or Standard ID in the Rx Filter to specify the device IDs CAN/CAN-FD will read in.
Generated Code
-
can_tp.h
-
Interface that defines the methods to implement.
-
-
can_tp.c
-
Implementation of the CAN transport protocol.
-
The adaptor is used to send frames over CAN/CAN-FD Classic.
-
-
can_tp_phy_adaptor.h, can_tp_phy_adaptor.c
-
Adaptor is a middle layer between CAN-TP and the CAN/CAN-FD driver files to allow for decoupling between the layers.
-
-
can_tp_config.h (Not shown in diagram)
-
CAN-TP files use the configurations set in this file.
-