Skip to content

Record firmware requirements from the hardware design - #10

Merged
thePunderWoman merged 1 commit into
mainfrom
firmware-requirements
Nov 8, 2026
Merged

thePunderWoman merged 1 commit into
mainfrom
firmware-requirements

Conversation

@thePunderWoman

Copy link
Copy Markdown
Member

Adds docs/firmware-requirements.md so the firmware work starts from what the hardware needs. Linked from AGENTS.md (the firmware section says to read it first) and from the PCB README.

Safety-critical items:

  • INA237 ALERT (IO4) → PWR_CUTOFF (IO1) is the primary overcurrent protection. The LM5060's V_DS trip is only a backstop, and the upstream fuse is mandatory.
  • Never cut off during motor regen; it overloads the output TVS. How this interacts with an overcurrent cutoff is flagged as an open decision.
  • Clearing a latched LM5060 fault by pulsing PWR_CUTOFF, which toggles EN (LM5060 datasheet).

Also covered:

  • Full pin map, including the module-internal GPIO26/27/28.
  • INA237 setup from its datasheet: address 0x40 (Table 7-2), its own register map, SHUNT_CAL = 4096 for ADCRANGE 0 with a 5 mA LSB on 1 mΩ (Equation 1), SOVL scaling, and the ALERT options.
  • Battery ADC scaling, load-switch behaviour, the lit-switch LED, CAN, UART, the GPIO26 antenna select, and programming.

Docs only. No design or board changes.

🤖 Generated with Claude Code

docs/firmware-requirements.md collects what the board relies on firmware
for: INA237 ALERT -> PWR_CUTOFF as the primary overcurrent protection, no
cutoff during regen, clearing the LM5060 fault latch via EN, the pin map,
INA237 setup (0x40, its own register map, SHUNT_CAL/SOVL values), battery
ADC, lit-switch LED, CAN/UART, and GPIO26 antenna select. Linked from
AGENTS.md and the PCB README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thePunderWoman
thePunderWoman merged commit 2e91a89 into main Nov 8, 2026
3 checks passed
@thePunderWoman
thePunderWoman deleted the firmware-requirements branch November 8, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant