Fix: ECU-BMS FLT GPIO Checking for Array Faulting #153
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Description
When arrays were plugged into the battery, at high irradiances (i.e. currents), the pack would fault, for no apparent reason (no fault statuses lit up on telemetry). The only place where a fault could get triggered without it showing up in the fault code is with noise being induced on one of the fault GPIOs from the masterboard to the ECU.
Prior to this change, there were three GPIOs that the ECU would read and, if set, would transition to a fault state on. FLT, COMM, and OT.
Firmware Changes:
When the BMS starts up, it'll set BAL high, indicating no fault, and will set FLT high (indicating fault). As normal, the BMS will check the pack once and set the fault pin accordingly, signalling to the ECU to continue with its startup sequence (or to go to a fault state).
Note: During startup, the ECU doesn't care about the BAL pin (no need, since arrays won't be opened until later in startup). We also never saw issues with the arrays causing the battery to fault on startup.
During normal monitoring, if the BMS faults, it'll set FLT high and BAL low - if the ECU reads that combination of GPIOs, only then will it fault. So, if either FLT goes high, or BAL goes low individually, the ECU won't fault (hence, checksum).
This fix was implemented prior to morning charging of day 3 of competition, and was tested in front of scrutineers by pulling out the slave board connection to the masterboard, inducing communications fault. For the entirety of day 3 of race, we saw no faults (the sunniest day of FSGP 2024) - additionally, there were no faults during ASC. I believe it's safe to say this fixed the issue.
Monday Link
Effected Components
Testing
Sanity check
Sources