---
# System prepended metadata

title: STM32 - CAN
tags: [NTURT, electrical_system, firmware_hardware]

---

# STM32 - CAN
###### tags: `firmware_hardware` `electrical_system` `NTURT`

#### Author: @andre-liang 

![](https://hackmd.io/_uploads/SJ7MCQXn2.jpg)

### Preface 

The CAN (Controller Area Network) bus serves as the central communication protocol, fostering seamless interaction among microcontrollers within the vehicle. Operating akin to the human body's nerve system that interconnects organs, the CAN bus links various devices together. This communication network efficiently employs only two wires, simplifying the connection process. This streamlined approach streamlines the linkage of multiple devices, ensuring a more direct and effective means of communication.

### Message Frame

![](https://hackmd.io/_uploads/B1uZWHm2n.png)

The illustration above depicts the transmission of a message frame across the network, featuring the following functionalities:

1. SOF: Start of Frame, a signal indicating to other nodes within the network that a message is being broadcasted.
2. Arbitration: Determines message priority and signifies its intended purpose.
3. Control: Specifies the length of the Data frame.
4. Data: Carries the actual binary data values.
5. CRC: Cyclic Redundancy Check, abbreviated as CRC, is employed to maintain message integrity, crucial given the CAN bus's resilience against electrical interference.
6. EOF: Denotes the End of Frame, signifying the conclusion of the CAN message transmission.

### Setup



### Reference

1. https://ithelp.ithome.com.tw/articles/10284525