Skip to content

PDB: power distribution board controller and CAN heartbeat - #61

Closed
georgesleen wants to merge 44 commits into
mainfrom
pdb-working-branch
Closed

PDB: power distribution board controller and CAN heartbeat#61
georgesleen wants to merge 44 commits into
mainfrom
pdb-working-branch

Conversation

@georgesleen

Copy link
Copy Markdown
Contributor

Brings pdb-working-branch into main. 41 commits, none previously merged, so
main currently has no power distribution board code at all.

What's in it

  • New pdb-controller project: cell voltage and pack temperature monitoring,
    MPPT board reporting, CAN telemetry
  • Heartbeat support added to the CANFD module, and CAN_Init reworked to take
    a hardware ID parameter
  • Moving average filter for current sensing, plus a negative-current fix and
    an int16_t buffer correction
  • Hard fault on heartbeat CAN error removed
  • fdcan-library-test promoted to a real project

Verification

The pdb board was read back over SWD and its firmware matched against this
branch by string fingerprint. All 29 authored literals recovered from the
board's own code region are present in this branch's sources, including
MPPT BOARD 1/2, TempPack1/2, VC1..VC4_Cumulative,
Cell %d voltage is below threshold %0.2f and HAL ERROR CODE: %lu. The only
unmatched strings are Thumb instruction bytes and libc internals.

Note this is a source-level match, not byte-exact. The flashed image was built
with GNU Tools for STM32 14.3.rel1.20251027; a byte comparison would require
rebuilding with that exact toolchain. Logic-only changes that add no string
literals cannot be detected this way.

Reviewer notes

Diff excluding Drivers/, Debug/ and Release/ is 103 files, all additions.

origin/pdb-nvic-reset carries one commit not in this branch ("Added reset
line in error handler"). Decide whether that should land before or after this
merges, since deleting that branch during cleanup would otherwise lose it.

Per the README this needs two sign-offs, one from an ELEC lead.

alisha1697 and others added 30 commits March 8, 2025 19:41
Should work? unless I overlooked something or tested it wrong

Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>
Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>
Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>
Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>
Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>
Signed-off-by: alisha1697 <143849351+alisha1697@users.noreply.github.com>
- receives out of range IDs

Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>
Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>
Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>
Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>
Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>
Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>
Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>
Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>
Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>
Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>
Signed-off-by: Alisha Siddiqui <143849351+alisha1697@users.noreply.github.com>
@georgesleen

Copy link
Copy Markdown
Contributor Author

Superseded by #62, which merges this branch together with the other two module branches into a single integration branch. The conflicts between the three (24 between wingsail and rudder, 1 between wingsail and pdb) are resolved there once rather than falling to whichever PR merges last. This PR can stay open for reference, but merging it directly would leave the other two conflicting against main.

@georgesleen

Copy link
Copy Markdown
Contributor Author

Closing in favour of #62, which contains this branch's tip along with the other three module branches. The conflicts between them are resolved once there rather than falling to whichever of these merged last. Nothing is lost: the tip of this branch is an ancestor of integration/modules-to-main.

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.

5 participants