CAN bus integration: Mamba F722S ↔ VESC ↔ Orin #674

Closed
opened 2026-03-17 18:47:04 -04:00 by seb · 0 comments
Owner

Overview

Connect Mamba F722S, dual VESC (IDs 56+68), and Orin Nano over a shared CAN bus for the SaltyBot balance architecture.

Hardware

  • CAN transceiver: SN65HVD230 wired to Mamba RX6/TX6 pads
  • Orin: CANable 2.0 USB-CAN adapter (/dev/ttyACM0, slcan)
  • VESC: Dual Mini FSESC 6.7 Pro, CAN IDs 56 + 68

Firmware Tasks (Mamba F722S)

  • Enable bxCAN peripheral — verify RX6/TX6 map to PA11/PA12 on STM32F722
  • Implement VESC CAN protocol to send motor current/duty commands directly to VESC IDs 56 + 68
  • Implement Orin ↔ FC protocol over CAN: receive high-level commands (target speed, mode, e-stop) from Orin, publish telemetry back (IMU data, balance state, motor status)
  • Balance PID loop stays on Mamba — VESC just does FOC motor control
  • Robot must balance even if Orin is offline

Architecture

Orin (CANable 2.0) ─┬─ CAN bus ─── SN65HVD230 ─── Mamba F722S (balance PID)
                   └─────────────────────────────── VESC 56 + VESC 68 (FOC)

Notes

  • IMU: MPU6000 on Mamba (WHO_AM_I=0x68), SPI1, CS=PA4
  • DCache must be disabled for SPI on F7 (known lesson)
  • SysTick_Handler + HAL_IncTick() mandatory
  • UART transport as fallback if CAN remapping fails
## Overview Connect Mamba F722S, dual VESC (IDs 56+68), and Orin Nano over a shared CAN bus for the SaltyBot balance architecture. ## Hardware - **CAN transceiver:** SN65HVD230 wired to Mamba RX6/TX6 pads - **Orin:** CANable 2.0 USB-CAN adapter (`/dev/ttyACM0`, slcan) - **VESC:** Dual Mini FSESC 6.7 Pro, CAN IDs 56 + 68 ## Firmware Tasks (Mamba F722S) - Enable bxCAN peripheral — verify RX6/TX6 map to PA11/PA12 on STM32F722 - Implement VESC CAN protocol to send motor current/duty commands directly to VESC IDs 56 + 68 - Implement Orin ↔ FC protocol over CAN: receive high-level commands (target speed, mode, e-stop) from Orin, publish telemetry back (IMU data, balance state, motor status) - Balance PID loop stays on Mamba — VESC just does FOC motor control - Robot must balance even if Orin is offline ## Architecture ``` Orin (CANable 2.0) ─┬─ CAN bus ─── SN65HVD230 ─── Mamba F722S (balance PID) └─────────────────────────────── VESC 56 + VESC 68 (FOC) ``` ## Notes - IMU: MPU6000 on Mamba (WHO_AM_I=0x68), SPI1, CS=PA4 - DCache must be disabled for SPI on F7 (known lesson) - SysTick_Handler + HAL_IncTick() mandatory - UART transport as fallback if CAN remapping fails
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: seb/saltylab-firmware#674
No description provided.