Data Structures | Typedefs | Enumerations
CANFD Driver External Data Structures

The section has a list of all the data structures which are exposed to the application. More...

Data Structures

struct  CANFD_MCANLoopbackCfgParams_t
 Data structure defines the MCAN Loopback parameters. More...
 
struct  CANFD_MCANBitTimingParams_t
 Data structure defines the parameters for bit timing calculation. Bit timing related to data phase will be valid only in case where MCAN is put in CANFD mode and will be '0' otherwise. More...
 
struct  CANFD_MCANTdcConfig_t
 Data structure defines the MCAN Transmitter Delay Compensation parameters. More...
 
struct  CANFD_MCANGlobalFiltConfig_t
 Data structure defines the MCAN Global Filter Configuration parameters. More...
 
struct  CANFD_MCANMsgRAMCfgParams_t
 Data structure defines the MCAN Message RAM Configuration Parameters. Message RAM can contain following sections: Standard ID filters, Extended ID filters, TX FIFO(or TX Q), TX Buffers, TX EventFIFO, RX FIFO0, RX FIFO1, RX Buffer. Note: If particular section in the RAM is not used then it's size should be initialized to '0' (Number of buffers in case of Tx/Rx buffer). More...
 
struct  CANFD_MCANECCConfigParams_t
 Data structure defines the MCAN ECC configuration parameters. More...
 
struct  CANFD_MCANErrCntStatus_t
 Data structure defines the MCAN error logging counters status. More...
 
struct  CANFD_MCANProtocolStatus_t
 Data structure defines the MCAN protocol status. More...
 
struct  CANFD_MCANECCErrForceParams_t
 Data structure defines the ECC Error forcing. More...
 
struct  CANFD_MCANECCErrStatus_t
 Data structure defines the ECC Error Status. More...
 
struct  CANFD_ErrStatusResp_t
 Response structure definition for Error and status information. More...
 
struct  CANFD_MCANInitParams_t
 Data structure defines the MCAN initialization parameters. More...
 
struct  CAN_MCANMsgObjCfgParams_t
 Parameters used to configure the receive and transmit message objects. More...
 
struct  CAN_MCANRxMsgObjRangeCfgParams_t
 Parameters used to configure a receive message objects for a range of message identifiers. More...
 
struct  CANFD_MCANMsgObjectStats_t
 Data structure defines the software maintained message object statistics. More...
 
struct  CANFD_OptionTLV_t
 Options TLV data structure. More...
 

Typedefs

typedef void * CANFD_Handle
 CANFD module handle returned by the CANFD_init() API call.
 
typedef void * CANFD_MsgObjHandle
 CANFD message object handle returned by the CANFD_createMsgObject() API call.
 
typedef enum CANFD_MCANOperationMode_t CANFD_MCANOperationMode
 Enumerates the values used to represent the MCAN mode of operation.
 
typedef enum CANFD_Direction_t CANFD_Direction
 This enumeration defines the values used to set the direction of message object.
 
typedef enum CANFD_MCANXidType_t CANFD_MCANXidType
 This enumeration defines the values used to represent the CAN Identifier Type.
 
typedef enum CANFD_MCANFrameType_t CANFD_MCANFrameType
 This enumeration defines the CAN frame type.
 
typedef enum CANFD_MCANTimeOutSelect_t CANFD_MCANTimeOutSelect
 This enumeration defines the MCAN timeout counter configuration.
 
typedef enum CANFD_MCANECCErrType_t CANFD_MCANECCErrType
 This enumeration defines the MCAN ECC Error Types.
 
typedef enum CANFD_MCANLoopBackMode_t CANFD_MCANLoopBackMode
 This enumeration defines the MCAN Loopback mode.
 
typedef enum CANFD_MCANCommState_t CANFD_MCANCommState
 This enumeration defines the MCAN's communication state.
 
typedef enum CANFD_MCANErrCode_t CANFD_MCANErrCode
 This enumeration defines the MCAN's Error Code.
 
typedef enum CANFD_Reason_t CANFD_Reason
 This enumeration describes a list of all the reasons for which the driver will invoke application callback functions.
 
typedef enum CANFD_Option_t CANFD_Option
 This enumeration defines the values used to represent the GET/SET options. More...
 
typedef struct CANFD_MCANLoopbackCfgParams_t CANFD_MCANLoopbackCfgParams
 Data structure defines the MCAN Loopback parameters.
 
typedef struct CANFD_MCANBitTimingParams_t CANFD_MCANBitTimingParams
 Data structure defines the parameters for bit timing calculation. Bit timing related to data phase will be valid only in case where MCAN is put in CANFD mode and will be '0' otherwise.
 
typedef struct CANFD_MCANTdcConfig_t CANFD_MCANTdcConfig
 Data structure defines the MCAN Transmitter Delay Compensation parameters.
 
typedef struct CANFD_MCANGlobalFiltConfig_t CANFD_MCANGlobalFiltConfig
 Data structure defines the MCAN Global Filter Configuration parameters.
 
typedef struct CANFD_MCANMsgRAMCfgParams_t CANFD_MCANMsgRAMCfgParams
 Data structure defines the MCAN Message RAM Configuration Parameters. Message RAM can contain following sections: Standard ID filters, Extended ID filters, TX FIFO(or TX Q), TX Buffers, TX EventFIFO, RX FIFO0, RX FIFO1, RX Buffer. Note: If particular section in the RAM is not used then it's size should be initialized to '0' (Number of buffers in case of Tx/Rx buffer).
 
typedef struct CANFD_MCANECCConfigParams_t CANFD_MCANECCConfigParams
 Data structure defines the MCAN ECC configuration parameters.
 
typedef struct CANFD_MCANErrCntStatus_t CANFD_MCANErrCntStatus
 Data structure defines the MCAN error logging counters status.
 
typedef struct CANFD_MCANProtocolStatus_t CANFD_MCANProtocolStatus
 Data structure defines the MCAN protocol status.
 
typedef struct CANFD_MCANECCErrForceParams_t CANFD_MCANECCErrForceParams
 Data structure defines the ECC Error forcing.
 
typedef struct CANFD_MCANECCErrStatus_t CANFD_MCANECCErrStatus
 Data structure defines the ECC Error Status.
 
typedef struct CANFD_ErrStatusResp_t CANFD_ErrStatusResp
 Response structure definition for Error and status information.
 
typedef void(* CANFD_DataAppCallBack) (CANFD_MsgObjHandle handle, CANFD_Reason reason)
 Application specified callback function which is invoked by the CANFD driver once transmit is complete or data has been received for the specified message object. More...
 
typedef void(* CANFD_ErrStatusAppCallBack) (CANFD_Handle handle, CANFD_Reason reason, CANFD_ErrStatusResp *errStatusResp)
 Application specified callback function which is invoked by the CANFD driver on error or status change. More...
 
typedef struct CANFD_MCANInitParams_t CANFD_MCANInitParams
 Data structure defines the MCAN initialization parameters.
 
typedef struct CAN_MCANMsgObjCfgParams_t CANFD_MCANMsgObjCfgParams
 Parameters used to configure the receive and transmit message objects.
 
typedef struct CAN_MCANRxMsgObjRangeCfgParams_t CANFD_MCANRxMsgObjRangeCfgParams
 Parameters used to configure a receive message objects for a range of message identifiers.
 
typedef struct CANFD_MCANMsgObjectStats_t CANFD_MCANMsgObjectStats
 Data structure defines the software maintained message object statistics.
 
typedef struct CANFD_OptionTLV_t CANFD_OptionTLV
 Options TLV data structure. More...
 

Enumerations

Detailed Description

The section has a list of all the data structures which are exposed to the application.

Typedef Documentation

typedef void(* CANFD_DataAppCallBack) (CANFD_MsgObjHandle handle, CANFD_Reason reason)

Application specified callback function which is invoked by the CANFD driver once transmit is complete or data has been received for the specified message object.

Parameters
[in]handleMessage object handle for which the callback function is invoked.
[in]reasonCause of the interrupt which prompted the callback.
Return values
Notapplicable
typedef void(* CANFD_ErrStatusAppCallBack) (CANFD_Handle handle, CANFD_Reason reason, CANFD_ErrStatusResp *errStatusResp)

Application specified callback function which is invoked by the CANFD driver on error or status change.

Parameters
[in]handleHandle to the CANFD Driver
[in]reasonCause of the interrupt which prompted the callback.
[in]errStatusRespResponse structure populated with the value of the fields that caused the error or status interrupt. Processing of this structure is dependent on the callback reason.
Return values
Notapplicable

This enumeration defines the values used to represent the GET/SET options.

See also
CANFD_OptionTLV

Options TLV data structure.

Specifies the option type, length, value.

Enumeration Type Documentation

This enumeration defines the values used to set the direction of message object.

Enumerator
CANFD_Direction_RX 

Message object used to receive data

CANFD_Direction_TX 

Message object used to transmit data

This enumeration defines the MCAN's communication state.

Enumerator
CANFD_MCANCommState_SYNCHRONIZING 

MCAN is synchronizing on CANFD communication

CANFD_MCANCommState_IDLE 

MCAN is neither receiver nor transmitter

CANFD_MCANCommState_RECEIVER 

MCAN is operating as receiver

CANFD_MCANCommState_TRANSMITTER 

MCAN is operating as transmitter

This enumeration defines the MCAN ECC Error Types.

Enumerator
CANFD_MCANECCErrType_SEC 

ECC Single Error Correction

CANFD_MCANECCErrType_DED 

ECC Single Error Detection

This enumeration defines the MCAN's Error Code.

Enumerator
CANFD_MCANErrCode_NO_ERROR 

No error occurred since LEC has been reset by successful reception or transmission.

CANFD_MCANErrCode_STUFF_ERROR 

More than 5 equal bits in a sequence have occurred in a part of a received message where this is not allowed.

CANFD_MCANErrCode_FORM_ERROR 

A fixed format part of a received frame has the wrong format.

CANFD_MCANErrCode_ACK_ERROR 

The message transmitted by the MCAN was not acknowledged by another node.

CANFD_MCANErrCode_BIT1_ERROR 

During the transmission of a message (with the exception of the arbitration field), the device wanted to send a recessive level (bit of logical value 1), but the monitored bus value was dominant.

CANFD_MCANErrCode_BIT0_ERROR 

During the transmission of a message (or acknowledge bit, or active error flag, or overload flag), the device wanted to send a dominant level (data or identifier bit logical value 0), but the monitored bus value was recessive. During Bus_Off recovery this status is set each time a sequence of 11 recessive bits has been monitored. This enables the CPU to monitor the proceeding of the Bus_Off recovery sequence (indicating the bus is not stuck at dominant or continuously disturbed).

CANFD_MCANErrCode_CRC_ERROR 

The CRC check sum of a received message was incorrect. The CRC of an incoming message does not match with the CRC calculated from the received data.

CANFD_MCANErrCode_NO_CHANGE 

Any read access to the Protocol Status Register re-initializes the LEC to 7. When the LEC shows the value 7, no CANFD bus event was detected since the last CPU read access to the Protocol Status Register.

This enumeration defines the CAN frame type.

Enumerator
CANFD_MCANFrameType_CLASSIC 

Classic Frame

CANFD_MCANFrameType_FD 

FD Frame

This enumeration defines the MCAN Loopback mode.

Enumerator
CANFD_MCANLoopBackMode_INTERNAL 

This mode can be used for hot self-test and this mode will not affect bus state.

CANFD_MCANLoopBackMode_EXTERNAL 

In this mode, MCAN the MCAN treats its own transmitted messages as received messages and stores them (if they pass acceptance filtering) into an Rx Buffer or an Rx FIFO. This mode will affect bus state.

Enumerates the values used to represent the MCAN mode of operation.

Enumerator
CANFD_MCANOperationMode_NORMAL 

MCAN normal mode

CANFD_MCANOperationMode_SW_INIT 

MCAN SW initialization mode

This enumeration defines the MCAN timeout counter configuration.

Enumerator
CANFD_MCANTimeOutSelect_CONT 

Continuous operation Mode

CANFD_MCANTimeOutSelect_TX_EVENT_FIFO 

Timeout controlled by Tx Event FIFO

CANFD_MCANTimeOutSelect_RX_FIFO0 

Timeout controlled by Rx FIFO 0

CANFD_MCANTimeOutSelect_RX_FIFO1 

Timeout controlled by Rx FIFO 1

This enumeration defines the values used to represent the CAN Identifier Type.

Enumerator
CANFD_MCANXidType_11_BIT 

11bit MCAN Identifier

CANFD_MCANXidType_29_BIT 

29bit MCAN Identifier

This enumeration defines the values used to represent the GET/SET options.

See also
CANFD_OptionTLV
Enumerator
CANFD_Option_MCAN_ERROR_COUNTER 

Used to get the MCAN Tx and Rx error counters

See also
CANFD_getOptions

NOTE: The length in the TLV should be sizeof(CANFD_MCANErrCntStatus) for this option.

CANFD_Option_MCAN_PROTOCOL_STATUS 

Used to get the MCAN protocol status

See also
CANFD_getOptions

NOTE: The length in the TLV should be sizeof(CANFD_MCANProtocolStatus) for this option.

CANFD_Option_MCAN_MSG_OBJECT_STATS 

Used to get the MCAN message object software maintained statistics

See also
CANFD_getOptions

NOTE: The length in the TLV should be sizeof(CANFD_MCANMsgObjectStats) for this option. Application must fill in the message object handle for which the statistics is requested.

CANFD_Option_MCAN_MODE 

Used to put the MCAN module in init or operational state

See also
CANFD_setOptions

NOTE: The length in the TLV should be 1 byte for this option. Valid values: Refer to (CANFD_MCANOperationMode)

CANFD_Option_MCAN_LOOPBACK 

Used to enable or disable internal/external loopback mode

See also
CANFD_setOptions

NOTE: The length in the TLV should be sizeof(CANFD_MCANLoopbackCfgParams) for this option.

CANFD_Option_MCAN_POWER_DOWN 

Used to request a local power down or wakeup from a local power down

See also
CANFD_setOptions

NOTE: The length in the TLV should be 1 byte for this option. Valid values are 1 - MCAN Sleep 0 - MCAN Wakeup

This enumeration describes a list of all the reasons for which the driver will invoke application callback functions.

Enumerator
CANFD_Reason_RX 

Data has been received and the application is required to read and process the data.

CANFD_Reason_TX_COMPLETION 

Data has been succesfully transmitted.

CANFD_Reason_TX_CANCELED 

Data transmission is succesfully canceled.

CANFD_Reason_ECC_ERROR 

Data has been succesfully transmitted.

CANFD_Reason_BUSOFF 

Bus Off condition detected.

CANFD_Reason_PROTOCOL_ERR_DATA_PHASE 

Protocol error in data phase detected.

CANFD_Reason_PROTOCOL_ERR_ARB_PHASE 

Protocol error in arbitration phase detected.


Copyright 2020, Texas Instruments Incorporated