SLAAEN5 February   2025 MSPM0G1106 , MSPM0G1107 , MSPM0G1506 , MSPM0G1507 , MSPM0G1518 , MSPM0G1519 , MSPM0G3106 , MSPM0G3106-Q1 , MSPM0G3107 , MSPM0G3107-Q1 , MSPM0G3506 , MSPM0G3506-Q1 , MSPM0G3507 , MSPM0G3507-Q1 , MSPM0G3518 , MSPM0G3518-Q1 , MSPM0G3519 , MSPM0G3519-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
    1. 1.1 Bridge between CAN and SPI
  5. 2Implementation
    1. 2.1 Principle
    2. 2.2 Structure
  6. 3Software Description
    1. 3.1 Software Functionality
    2. 3.2 Configurable Parameters
    3. 3.3 Structure of Custom Element
    4. 3.4 Structure of FIFO
    5. 3.5 SPI Receive and Transmit (Transparent Transmission)
    6. 3.6 SPI Receive and Transmit (Protocol Transmission)
    7. 3.7 CAN Receive and Transmit
    8. 3.8 Application Integration
  7. 4Hardware
  8. 5Application Aspects
    1. 5.1 Flexible structure
    2. 5.2 Optional Configuration for SPI
    3. 5.3 Optional Configuration for CAN
    4. 5.4 CAN Bus Multinode Communication Example
  9. 6Summary
  10. 7References

Introduction

There are many communication methods between devices depending on the application. MCUs today usually support more than one communication method. For example, MSPM0 can support UART, SPI, CAN, and so on on a specific device. When devices need to transfer data over different communication interfaces, a bridge is constructed.

For CAN and SPI, a CAN-SPI bridge acts as a translator between the two interfaces. A CAN-SPI bridge allows a device to send and receive information on one interface and receive and send the information on the other interface.

This application note describes the software and hardware designs used in creating and using the CAN-SPI bridge. The MSPM0G3507 microcontroller (MCU) can be used by providing CAN and SPI communication interfaces. The accompanying demo uses the MSPM0G3507 with 2Mbps CANFD and 500k bit rate SPI to demonstrate transceiving data between channels.