feat: CAN bus driver for BLDC motor controllers (Issue #597) #610
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "sl-firmware/issue-597-can-driver"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implements CAN2.0B bus driver for two BLDC motor controllers (left / right wheels) on the STM32F722 flight controller.
include/can_driver.h/src/can_driver.c— full HAL_CAN2 driver0x100+nidvelocity+torque cmd (DLC=4, little-endian int16 pair) at 100 Hz0x110+nidenable/disable cmd (DLC=1); follows arm state0x200+nidfeedback frame (DLC=8: vel_rpm, current_ma, pos_x100, temp_c, fault)can_driver_process()drains FIFO0 each tickinclude/jlink.h— protocol extensionsJLINK_CMD_CAN_STATS_GET(0x10): on-demand stats requestJLINK_TLM_CAN_STATS(0x89): 16-byte stats telemetryJLINK_TLM_SLOPE(0x88) +jlink_tlm_slope_tmissing from Issue #600src/jlink.c—jlink_send_can_stats()frame encoder + dispatchsrc/main.c— 100 Hz differential-drive TX, arm-state enable, 1 Hz stats TLMinclude/config.h—CAN_RPM_SCALE=10,CAN_TLM_HZ=1Closes #597
a8816d4226to2996d18ace