[M251] Drive MCP2515 CAN Module

, Sep 25, 2024|
0
30
0
  • Application: This example code uses the M251 to drive the MCP2515 CAN bus module through SPI, and demonstrates the sending and receiving of CAN data using the M253 with a CAN FD interface as the slave device.
  • BSP Version: M251_M252_M254_M256_M258_Series_BSP_CMSIS_V3.00.006, M253_Series_BSP_CMSIS_V3.00.008
  • Hardware: NuMaker-M251SD V1.1, NuMaker-M253LEB V1.0


To implement CAN application on an microcontroller (MCU) without a built-in CAN FD interface,
a stand-alone CAN controller can be used to connect the MCU via another communication
interface to achieve CAN communication. In this example code, the widely available MCP2515
CAN bus module will be used, connecting to the NuMaker-M251SD via the SPI interface. The
NuMaker-M253LEB will be used as the CAN Slave to complete the receiving and sending of
CAN packages.


You can download the sample code at https://www.nuvoton.com/resource-download.jsp?tp_GUID=EC012024091008364812