Macros | Functions
CANMCAN.h File Reference

Detailed Description

Common CAN functions for MCAN configuration.


#include <stdint.h>
#include <ti/drivers/CAN.h>
#include <third_party/mcan/MCAN.h>
Include dependency graph for CANMCAN.h:

Go to the source code of this file.

Macros

#define MCAN_INTR_SRC_RX_MASK
 

Functions

int_fast16_t CANMCAN_setBitTimingRaw (const CAN_BitRateTimingRaw *rawTiming)
 Sets the MCAN raw bit timing. More...
 
int_fast16_t CANMCAN_configMsgRAM (const CAN_MsgRAMConfig *config, uint32_t msgRAMSize, uint32_t enableCANFD)
 Configures the MCAN message RAM. More...
 
uint32_t CANMCAN_getInterruptMask (uint32_t eventMask)
 Returns the MCAN IRQ mask based on the CAN event mask. More...
 

Macro Definition Documentation

§ MCAN_INTR_SRC_RX_MASK

#define MCAN_INTR_SRC_RX_MASK
Value:
#define MCAN_INTR_SRC_RX_FIFO0_NEW_MSG
Definition: MCAN.h:259
#define MCAN_INTR_SRC_RX_FIFO1_NEW_MSG
Definition: MCAN.h:267
#define MCAN_INTR_SRC_DEDICATED_RX_BUFF_MSG
Definition: MCAN.h:297

Interrupt mask for all Rx sources (Rx FIFO 0, Rx FIFO 1, and dedicated Rx buffers).

Function Documentation

§ CANMCAN_setBitTimingRaw()

int_fast16_t CANMCAN_setBitTimingRaw ( const CAN_BitRateTimingRaw rawTiming)

Sets the MCAN raw bit timing.

Parameters
rawTimingA pointer to CAN_BitRateTimingRaw.
Return values
CAN_STATUS_SUCCESSif successful.
CAN_STATUS_ERRORif any timing values are invalid.

§ CANMCAN_configMsgRAM()

int_fast16_t CANMCAN_configMsgRAM ( const CAN_MsgRAMConfig config,
uint32_t  msgRAMSize,
uint32_t  enableCANFD 
)

Configures the MCAN message RAM.

Parameters
configA pointer to CAN_MsgRAMConfig.
msgRAMSizeSize of the message RAM in bytes.
enableCANFDSet to 1U if CAN FD is enabled, 0U otherwise.
Return values
CAN_STATUS_SUCCESSif successful.
CAN_STATUS_ERRORif the message RAM config is invalid.

§ CANMCAN_getInterruptMask()

uint32_t CANMCAN_getInterruptMask ( uint32_t  eventMask)

Returns the MCAN IRQ mask based on the CAN event mask.

Parameters
eventMaskCAN event mask.
Returns
MCAN IRQ mask
© Copyright 1995-2023, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale