Error: Implement a fault-reset feature
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- c
- Domain
- embedded-iot
Research direction
Start with init/appa/config/Src/stm32h7xx_it.c and the HardFault_Handler() entry point. Investigate whether the MCU can reset and preserve flight_computer_state, the flash address, and the error cause without an EEPROM or dedicated flash block. Done means documenting whether the recovery design is feasible and identifying its storage constraints.
Written by the indexing model from the issue text.
Description
Description
Safety critical systems often have a requirement that the system should not have un-recoverable errors. This is next to impossible to achieve just by building a good software system, as there's always gonna be that one edge case that can still take your system out.
What we can do, however, is make sure that the system recovers when that edge case is hit. Even a segmentation fault is technically recoverable on STM32 because the MCU receives and handles an interrupt signal in this situation (see init/appa/config/Src/stm32h7xx_it.c -> HardFault_Handler()).
We could theoretically force the MCU to reset if we hit an unrecoverable error. This would pop the MCU back up in the idle state with all of the peripherals re-initialized (provided there isn't some kind of error on one of these). If there's some region of non-volatile memory in which we can save the flight_computer_state variable from the error handler, we can then resume execution in the same state as before.
This has a number of its own design challenges. We would have to also store the flash address so we can continue logging at the right point. flight_computer_state would need to sit in a special block of memory that can be readily erased/overwritten (which makes this suited for a new hardware revision with an EEPROM). We would also want to make sure we log the cause of the error somewhere so that hardfaults are debuggable and we don't lose the place where this was hit.
But theoretically, this idea could substantially increase reliability. Recommend investigating this for a while to see if it's feasible without an EEPROM or a flash block that's dedicated to error handling.
- Dominant language
- C
- Stars
- 8
- Forks
- 6
- Avg merge
- 6d 15h
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SunDevilRocketry/Flight-Computer-Firmware
-
enhancement good first issue
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
enhancement good first issue
Difficulty 3/5 1-2 days Newbie friendliness 72/100
-
enhancement
SunDevilRocketry/Flight-Computer-Firmware#327 · 1 assignee ·
-
verification
Difficulty 4/5 3-5 days Newbie friendliness 45/100
SunDevilRocketry/Flight-Computer-Firmware#324 · 2 comments ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
All issues in SunDevilRocketry/Flight-Computer-Firmware
Similar issues
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100