The Controller Area Network (CAN) is a serial communications protocol that efficiently supports distributed real time control with a high level of security.
The MCAN module supports both Classic CAN and CAN FD (CAN with flexible data-rate) specifications. The CAN FD feature allows high throughput and increased payload per data frame. The Classic CAN and CAN FD devices can coexist on the same network without any conflict.
Select the CAN type. CAN type can either be Classic CAN or
CAN-FD.
Displays the MCAN module clock frequency (=connectivity manager (ARM Cortex-M) clock) in MHz.
Displays the MCAN bit clock frequency (MCAN module clock freq/4) in MHz.
Nominal Bit Rate Prescaler(NBRP). The value by which the oscillator frequency is divided for generating the bit time quanta. The bit time is built up from a multiple of this quanta. Valid values for the bit rate prescaler are 1 to 512.
Nominal Time Segment(NTGEG) before sample point. Valid values are 2 to 256.
Nominal Time Segment(NTSEG) after sample point. Valid values are 2 to 128.
Closest achievable MCAN baud rate calculated based on parameters and given formula.
Nominal Resynchronization Jump Width (NSJW). Valid values are 1 to 128.
Enables bit rate switching between nominal bit rate and data bit rate.
This parameter is available only for CAN-FD protocol mode.
Data Bit Rate Prescaler (DBRP). The value by which the oscillator frequency is divided for generating the bit time quanta. The bit time is built up from a multiple of this quanta. Valid values for the bit rate prescaler are 1 to 32.
This parameter is available only for CAN-FD protocol mode and if Enable bit rate switching parameter is enabled.
Data Time Segment (DTSEG1) before sample point . Valid values are 1 to 32.
This parameter is available only for CAN-FD protocol mode and if Enable bit rate switching parameter is enabled.
Data Time Segment (DTSEG2) after sample point (DTSEG2). Valid values are 1 to 16.
This parameter is available only for CAN-FD protocol mode and if Enable bit rate switching parameter is enabled.
Closest achievable MCAN data baud rate calculated based on data parameters and given formula.
This parameter is available only for CAN-FD protocol mode and if Enable bit rate switching parameter is enabled.
Data Resynchronization Jump Width (DSJW). Valid values are 1 to 16.
This parameter is available only for CAN-FD protocol mode and if Enable bit rate switching parameter is enabled.
Select the operating mode for MCAN. Mode can be Normal,
Internal loopback or Bus
monitoring.
Select a GPIO pin for the MCAN data transmission.
Select a GPIO pin for the MCAN data reception.
Select the mode of transmission. Transmission mode can either be
FIFO or Queue.
Enable blocking mode for FIFO 0 data reception.
Enable blocking mode for FIFO 1 data reception.
Enable this parameter to update standard and extended filter IDs.
Rejects all remote frames with 11-bit standard IDs when enabled else the remote frames will be filtered as per the settings from Update standard filter elements.
Rejects all remote frames with 29-bit extended IDs when enabled else the remote frames will be filtered as per the settings from Update extended filter elements.
Defines how received messages with 11-bit standard IDs that do not match any element from Update standard filter elements are treated. Non-matching frames standard can be:
Accept in Rx FIFO 0
Accept in Rx FIFO 1
Reject
Defines how received messages with 29-bit extended IDs that do not match any element fromUpdate extended filter elements are treated. Non-matching frames extended can be:
Accept in Rx FIFO 0
Accept in Rx FIFO 1
Reject
Enable this parameter to update the standard 11bit ID filter elements parameters. Up to 128 filter elements can be configured for 11-bit standard IDs.
Select the standard filter element number. Filter number ranges between 0 to 127.
All enabled filter elements are used for acceptance filtering of standard frames. Acceptance filtering stops at the first matching enabled filter element or when the end of the filter list is reached.
Select one of the following parameter for the standard filter element selected using Select standard filter parameter.
Disable filter element
Store in Rx FIFO 0 if filter matches
Store in Rx FIFO 1 if filter matches
Reject ID if filter matches
Set priority if filter matches
Set priority and store in FIFO 0 if filter matches
Set priority and store in FIFO 1 if filter matches
Store into Rx Buffer
Select one of the following parameter for the standard filter type selected using Select standard filter parameter.
Range filter (from ID1 to ID2) - For range filter the ID2 >= ID1
Dual filter - Two dedicated message IDs is provided. To filter one specific message ID, the ID2 = ID1
Classic ID and mask filter (ID1 = filter, ID2 = mask) - A 0 bit at the filter mask (SFID2) will mask out the corresponding bit position of the configured Message ID filter (SFID1) and the value of the received Message ID at that bit position is not relevant for acceptance filtering. Only those bits of the received Message ID where the corresponding mask bits are 1 are relevant for acceptance filtering.
Specify the standard Filter ID 1.
Specify the standard Filter ID 2. Provide the buffer number if filter configuration is stored into Rx buffer.
Enable this parameter to update the extended filter elements parameters.
Select the extended filter element number. Filter number ranges between 0 to 63.
All enabled filter elements are used for acceptance filtering of extended frames. Acceptance filtering stops at the first matching enabled filter element or when the end of the filter list is reached.
Select one of the following parameters for the extended filter element selected using Select extended filter :
Disable filter element
Store in Rx FIFO 0 if filter matches
Store in Rx FIFO 1 if filter matches
Reject ID if filter matches
Set priority if filter matches
Set priority and store in FIFO 0 if filter matches
Set priority and store in FIFO 1 if filter matches
Store into Rx Buffer
Extended filter type.
Select one of the standard filter type:
Range filter (from ID1 to ID2) - For range filter the ID2 >= ID1
Dual filter - Two dedicated message IDs is provided. To filter one specific message ID, the ID2 = ID1
Classic ID and mask filter (ID1 = filter, ID2 = mask) - A 0 bit at the filter mask (EFID2) will mask out the corresponding bit position of the configured Message ID filter (EFID1) and the value of the received Message ID at that bit position is not relevant for acceptance filtering. Only those bits of the received Message ID where the corresponding mask bits are 1 are relevant for acceptance filtering.
Specify the first ID of extended ID filter element.
Specify the second ID of extended ID filter element. Provide buffer number if filter configuration is stored into Rx buffer.
Click on Display configured extended and standard filters elements in command window button to view the configured standard and extended filter elements in MATLAB® command window.
Click Reset standard and extended filters configurations to reset the configured standard and extended filter configurations.
Enable to configure the memory and its parameters. Select this parameter to configure CAN FD memory parameters. This is not applicable for classic CAN as memory parameters is automatically configured.
This parameter is available only for CAN FD protocol mode.
Select the maximum data size of CAN FD message in transmit FIFO.
This parameter is available only for CAN FD protocol mode and if Update memory configuration is selected.
Select the maximum data size of CAN FD message in receive FIFO 0.
This parameter is available only for CAN FD protocol mode and if Update memory configuration is selected.
Select the maximum data size of CAN FD message in receive FIFO 1.
This parameter is available only for CAN FD protocol mode and if Update memory configuration is selected.
Select the maximum data size of CAN FD message in receive buffer.
This parameter is available only for CAN FD protocol mode and if Update memory configuration is selected.
Select the number of elements (data + header CAN FD message) in transmit FIFO/Queue.
This parameter is available only for CAN FD protocol mode and if Update memory configuration is selected.
Select the number of elements (data + header CAN FD message) in receive FIFO 0.
This parameter is available only for CAN FD protocol mode and if Update memory configuration is selected.
Select the number of elements (data + header CAN FD message) in receive FIFO 1.
This parameter is available only for CAN FD protocol mode and if Update memory configuration is selected.
Click Validate memory button to validate all the memory parameters configured.
This parameter is available only for CAN FD protocol mode and if Update memory configuration is selected.
The following table explains the memory allocation.
Memory Allocation
| Section | Element size (in bytes) | Number of Elements |
|---|---|---|
| Standard filter | 4 | Number of standard filters configured in Update standard filter elements. |
| Extended filter | 8 | Number of standard filters configured in Update extended filter elements. |
| Tx FIFO | Header(8) + value specified in Maximum element size in TX FIFO (in bytes) | Number of elements in TX FIFO/Queue. |
| Tx event FIFO | 8 | 32 |
| Rx buffer | Header(8) + value specified in Maximum element size in RX buffer (in bytes) | Maximum buffer number configured in Update standard filter elements or Update extended filter elements configuration + 1 |
| Rx FIFO 0 | Header(8) + value specified in Maximum element size in RX FIFO 0 (in bytes) | Auto Allocate: If parameter Number of elements in RX FIFO 0 is set to Auto allocate then it will verify if Rx FIFO 0 is used for matching or non-matching frames and assign remaining memory if it is available. In this case minimum available memory should be 1 element size of Rx FIFO 0. Not Auto Allocate: Number of elements in RX FIFO 0 |
| Rx FIFO 1 | Header(8) + value specified in Maximum element size in RX FIFO 1 (in bytes) | Auto Allocate: If parameter Number of elements in RX FIFO 1 is set to Auto allocate then it will verify if Rx FIFO 1 is used for matching or non-matching frames and assign remaining memory if it is available. In this case minimum available memory should be 1 element size of Rx FIFO 1 . Not Auto Allocate: Number of elements in RX FIFO 1 |
|
Note
| ||