![]() |
![]() |
Common CAN functions for MCAN configuration.

Go to the source code of this file.
Macros | |
| #define | MCAN_INT_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, bool enableCANFD) |
| Configures the MCAN message RAM. More... | |
| uint32_t | CANMCAN_getInterruptMask (uint32_t eventMask) |
| Returns the MCAN interrupt mask based on the CAN event mask. More... | |
| #define MCAN_INT_SRC_RX_MASK |
Interrupt mask for all Rx sources (Rx FIFO 0, Rx FIFO 1, and dedicated Rx buffers).
| int_fast16_t CANMCAN_setBitTimingRaw | ( | const CAN_BitRateTimingRaw * | rawTiming | ) |
Sets the MCAN raw bit timing.
| rawTiming | A pointer to CAN_BitRateTimingRaw. |
| CAN_STATUS_SUCCESS | if successful. |
| CAN_STATUS_ERROR | if any timing values are invalid. |
| int_fast16_t CANMCAN_configMsgRam | ( | const CAN_MsgRamConfig * | config, |
| uint32_t | msgRamSize, | ||
| bool | enableCANFD | ||
| ) |
Configures the MCAN message RAM.
Configures the MCAN message RAM. If CAN FD is enabled, buffers are configured to support a max payload size of 64-bytes. Otherwise, the buffers are configured to support a max payload size of 8-bytes for classic CAN.
| config | A pointer to CAN_MsgRamConfig. |
| msgRamSize | Size of the message RAM in bytes. |
| enableCANFD | Set to true if CAN FD is enabled, false otherwise. |
| CAN_STATUS_SUCCESS | if successful. |
| CAN_STATUS_ERROR | if the message RAM config is invalid. |
| uint32_t CANMCAN_getInterruptMask | ( | uint32_t | eventMask | ) |
Returns the MCAN interrupt mask based on the CAN event mask.
| eventMask | CAN event mask. |