NetBurner 3.5.6
PDF Version
MODM7AE70

Topics

 MCAN Driver Internals
 

Classes

class  mcanMODM7AE70::mcan_module
 MCAN Module Class. More...
 
class  mcanMODM7AE70::mcan_config
 MCAN configuration structure. More...
 
class  mcanMODM7AE70::CanRxMessage
 Class to hold received CAN messages. More...
 

MCAN Constants

const uint32_t mcanMODM7AE70::CONF_MCAN_RX_FIFO_0_NUM = 32
 Range: 1..64.
 
const uint32_t mcanMODM7AE70::CONF_MCAN_RX_FIFO_1_NUM = 1
 Range: 1..64.
 
const uint32_t mcanMODM7AE70::CONF_MCAN_RX_BUFFER_NUM = 1
 Range: 1..64.
 
const uint32_t mcanMODM7AE70::CONF_MCAN_TX_BUFFER_NUM = 8
 Range: 1..16.
 
const uint32_t mcanMODM7AE70::CONF_MCAN_TX_FIFO_QUEUE_NUM = 1
 Range: 1..16.
 
const uint32_t mcanMODM7AE70::CONF_MCAN_TX_EVENT_FIFO = 8
 Range: 1..32.
 
const uint32_t mcanMODM7AE70::CONF_MCAN_RX_STANDARD_ID_FILTER_NUM = 32
 Range: 1..128.
 
const uint32_t mcanMODM7AE70::CONF_MCAN_RX_EXTENDED_ID_FILTER_NUM = 32
 Range: 1..64.
 
#define CAN_DATA_STORE_SIZE   (512)
 Receive OS_FIFO Buffer Size.
 

Helper Macros

#define CAN_EXTENDED_ID_BIT   (0x20000000)
 The single bit used by this API to indicate an extended ID.
 
#define ExtToNbId(id)   (id | CAN_EXTENDED_ID_BIT)
 Convert an ID to an extended ID.
 
#define NormToNbId(id)   (id & 0x7ff)
 Convert a normal ID in the range of 0 to 2048 to the range of 0 to 1024.
 
#define IsNBIdExt(id)   ( (id & CAN_EXTENDED_ID_BIT)!=0)
 Check for an extened MCAN ID.
 
#define NbToExtId(id)   (id & 0x1FFFFFFF)
 Remove the API extended flage from the ID.
 
#define NbToNormId(id)   (id & 0x7FF)
 Shift a Normal ID so it has a value from 0 to 1023.
 

Detailed Description

#include< mcan.h>


Control Area Network (MCAN) Low Level Driver for MODM7AE70

The Controller Area Network (MCAN) performs communication according to ISO 11898-1:2015 and to Bosch CANFD specification. Additional transceiver hardware is required for connection to the physical layer. All functions concerning the handling of messages are implemented by the Rx Handler and the Tx Handler. The Rx Handler manages message acceptance filtering, the transfer of received messages from the CAN core to the Message RAM, as well as providing receive message status information. The Tx Handler is responsible for the transfer of transmit messages from the Message RAM to the CAN core, as well as providing transmit status information.

Acceptance filtering is implemented by a combination of up to 128 filter elements, where each element can be configured as a range, as a bit mask, or as a dedicated ID filter.

There are two types of CAN identifiers that define different formats of the message frame, with the main difference being the identifier length. The two CAN protocol versions are:

Note
Detailed information on the MCAN operation and features is located in the Microchip SAME70 Family Data Sheet located in your \nburn\docs\Microchip folder, chapter 49.

Macro Definition Documentation

◆ IsNBIdExt

#define IsNBIdExt ( id)    ( (id & CAN_EXTENDED_ID_BIT)!=0)

#include <mcan.h>

Check for an extened MCAN ID.

Returns non zero if the ID is an extended ID

◆ NbToNormId

#define NbToNormId ( id)    (id & 0x7FF)

#include <mcan.h>

Shift a Normal ID so it has a value from 0 to 1023.

Some CAN systems will treat normal ID's as an integer from 0 to 2048. Other systems may treat normal ID's as 28 bit values where the bottom 17 bits are zero. This macro will convert the NetBurner normal ID format to the 0 to 2048 format.