This code demonstrates Classical CAN communication using the FDCAN peripheral on an STM32H7 microcontroller with STM32 HAL drivers. It includes CAN message transmission, interrupt-driven message reception, standard ID filtering, and GPIO-based reception indication.
The system periodically transmits CAN frames and listens for incoming messages using RX FIFO0 callbacks. When a new CAN frame is received, a GPIO pin is toggled to provide a simple hardware-level indication of successful reception.
- STM32H723ZGT Development Board
- CAN Transceiver : TJA1057 and MCP2551
- STM32CubeIDE
- Standard Identifier:
0x11 - Data Length: 8 bytes
- Frame Type: Data Frame
- Format: Classical CAN
- Bit Rate Switch: Disabled
- Nominal Baud Rate: 500 Kbps
- RX FIFO0 interrupt enabled
- Standard ID range filter configured from
0x00to0xFF - Callback function:
HAL_FDCAN_RxFifo0Callback()
1, 2, 3, 4, 5, 6, 7, 8STM32H7_NormalMode/
├── Core/
│ ├── Inc/
│ └── Src/
├── Drivers/
├── Debug/
├── .project
├── .cproject
└── README.md
- Communication between BMS Master and Rear VCU
- CAN message formatting for motor controllers
- Implementing FDCAN and Bitrate switching
Krish Gupta