SLAAET4 April   2025 MSPM0G3506 , MSPM0G3507 , MSPM0G3518 , MSPM0G3519

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
    1. 1.1 MCAN Features
  5. 2Sysconfig Configuration for MCAN Module
    1. 2.1 MCAN Clock Frequency
    2. 2.2 MCAN Basic Configuration
      1. 2.2.1 Transmitter Delay Compensation (TDC)
      2. 2.2.2 Bit Timing Parameters
      3. 2.2.3 Message RAM Configuration
        1. 2.2.3.1 Standard and Extended ID Filter Configuration
          1. 2.2.3.1.1 How to Add More Filters
        2. 2.2.3.2 TX MSG RAM
        3. 2.2.3.3 RX MSG RAM
    3. 2.3 Advanced Configuration
    4. 2.4 Retention Configuration
    5. 2.5 Interrupts
    6. 2.6 Pin Configuration and PinMux
  6. 3Demo Project Descriptions
    1. 3.1 TX Buffer Mode
    2. 3.2 TX FIFO Mode
    3. 3.3 RX Buffer Mode
    4. 3.4 RX FIFO Mode
  7. 4Debug and Design Tips to Resolve/Avoid CAN Communication Issues
    1. 4.1 Minimum Number of Nodes Required
    2. 4.2 Why a Transceiver is Needed
    3. 4.3 Bus Off Status
    4. 4.4 Using MCAN in Low Power Mode
    5. 4.5 Debug Checklist
      1. 4.5.1 Programming Issues
      2. 4.5.2 Physical Layer Issues
      3. 4.5.3 Hardware Debug Tips
  8. 5Summary
  9. 6References

Demo Project Descriptions

  • mcan_loopback

This example illustrates the loopback functionality of the MCAN module. The loopback operation is completely internal to the module. However, the transmitted data is visible in the MCANTX pin. An advantage of this test case is that the transceiver is not needed, so the loopback operation can run on the LaunchPad™ boards. To facilitate easy analyzing of data on a logic analyzer, only four bytes of data are transmitted. However, data is transmitted as a CAN frame with bit-rate switching disabled.

 MCAN Loopback Message Figure 3-1 MCAN Loopback Message
  • mcan_multi_message_tx

This example demonstrates the MCAN External Transmit function to send multiple messages. External communication is done between two CAN nodes. The receiving node can be another MCU or a CAN bus analysis tool capable of receiving or acknowledging the transmitted frames. Connect both CAN nodes through a CAN transceiver. This example can be used with the mcan_multi_message_rx example project. A nominal bit rate of 250kbps and data bit rate of are used.

The TX messages are stored in CAN message RAM as buffer mode. Then, use a software call add request for the transmission API to transmit message in the desired TX buffer.

 Output of Bus-Monitoring Tool
                    for mcan_multi_message_tx Figure 3-2 Output of Bus-Monitoring Tool for mcan_multi_message_tx
  • mcan_multi_message_rx

This example demonstrates the MCAN receive function. The transmitting node can be another MCU or a CAN bus analysis tool capable of transmitting CAN FD frames. A nominal bit rate of 250kbps and data bit rate of 2Mbps are used. Only frames with a standard message ID of 0x3 and 0x4 are received. If another MCU with MCAN module is used as the transmitter, then mcan_multi_message_tx example project can be run for the transmit function.

  • mcan_multi_message_tx_tcan114x

This example demonstrates the MCAN external transmit function to send multiple messages using the BOOSTXL-TCAN1145 BoosterPack™. External communication is done between two CAN nodes. The receiving node can be another MCU or a CAN bus analysis tool capable of receiving or acknowledging the transmitted frames. Connect both CAN nodes through a CAN transceiver. This example can be used with the mcan_multi_message_rx_tcan114x example project. A nominal bit rate of 250kbps and data bit rate of 2Mbps are used.

The software first initiailzes the TCAN114x module through SPI. Meanwhile, TX messages are stored in the CAN message RAM as buffer mode. Then, use a software call add request for the transmission API to transmit messages in the desired TX buffer.

 Output of Bus-Monitoring Tool
                    for mcan_multi_message_tx_tcan114x Figure 3-3 Output of Bus-Monitoring Tool for mcan_multi_message_tx_tcan114x
  • mcan_multi_message_rx_tcan114x

This example demonstrates the MCAN receive function using a BOOSTXL-TCAN1145 BoosterPack. The transmitting node can be another MCU or a CAN bus analysis tool capable of transmitting CAN FD frames. A nominal bit rate of 250kbps and data bit rate of 2Mbps are used. Only frames with a standard message ID of 0x3 and 0x4 are received. If another MCU with MCAN module is used as the transmitter, then mcan_multi_message_tx_tcan114x example project can be run for the transmit function.

  • mcan_single_message_tx

This example demonstrates the MCAN external transmit function to send signal message. External communication is done between two CAN nodes. The receiving node can be another MCU or a CAN bus analysis tool capable of receiving or acknowledging the transmitted frames. Connect both CAN nodes through a CAN transceiver. This example can be used with the mcan_multi_message_rx example project. A nominal bit rate of 250kbps and data bit rate of 2Mbps are used.

The TX message is stored in CAN message RAM as buffer mode. Then, use a software call add request for the transmission API to transmit messages in the TX buffer.

 Output of Bus-Monitoring Tool
                    for mcan_single_message_tx Figure 3-4 Output of Bus-Monitoring Tool for mcan_single_message_tx