MSPM0_ValvanoWare  1.0
ECE445L starter code
Functions
CAN.h File Reference

CAN. More...

#include <stdint.h>

Go to the source code of this file.

Functions

void CAN_Init (void)
 Initialize CAN. More...
 
void CAN_EnableInterrupts (uint32_t priority)
 Enable CAN interrupts. More...
 
int CAN_Send (uint32_t id, uint32_t dlc, uint8_t *data)
 Send CAN message. More...
 
int CAN_CheckMail (void)
 Check for received CAN message. More...
 
int CAN_GetMailNonBlock (uint32_t *id, uint32_t *dlc, uint8_t *data)
 Received a CAN message. More...
 
void CAN_GetMail (uint32_t *id, uint32_t *dlc, uint8_t *data)
 Receive a CAN message. More...
 

Detailed Description

CAN.

Controller Area Network between the motor board and the sensor board. This interface uses FDCAN0 to communicate on CAN bus PA12 and PA13. 120 ohm across CANH, CANL on both ends of network. If there are three boards (two sensor and one motor), remove the jumper on the middle board. Use TCAN1057AVDRQ1, because it implements 3.3V digital logic (not TCAN1057A-Q1, the version with pin 5 nc)

Version
ECE445M RTOS V1.2
Author
Jonathan Valvano
Warning
AS-IS
Note
For more information see http://users.ece.utexas.edu/~valvano/
Date
May 11, 2026
CAN pins
TCAN1057AVDRQ0MSPM0G3507
Pin1 TXD CAN_Tx PA12 FD-CAN module 0 transmit
Pin2 Vss ground
Pin3 VCC +5V with 0.1uF cap to ground
Pin4 RXD CAN_Rx PA13 FD-CAN module 0 receive (0 to 3.3V)
Pin5 VIO +3.3V (digital interface supply)
Pin6 CANL to other CANL on network
Pin7 CANH to other CANH on network
Pin8 RS ground, Slope-Control Input (maximum slew rate)