Error: Implement a fault-reset feature
维护者通常 4 天内回复
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 30/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 冷清
- 技术栈
- c
- 领域
- embedded-iot
调研方向
从 init/appa/config/Src/stm32h7xx_it.c 和入口点 HardFault_Handler() 开始。调查 MCU 是否可以在没有 EEPROM 或专用 flash 块的情况下复位,并保留 flight_computer_state、flash 地址和错误原因。完成的标准是记录恢复设计是否可行,并确定其存储限制。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- C
- 星标
- 8
- 派生
- 6
- 平均合并
- 6 天 21 小时
- 30 天内合并 PR
- 9
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
SunDevilRocketry/Flight-Computer-Firmware 的其他 Issue
-
Sensor: Set magnetometer ODR to 30 Hz可能已有人在做 @NArmistead 于 17 天前认领。 未关闭enhancement
难度 2/5 1-3 小时 新手友好度 63/100
SunDevilRocketry/Flight-Computer-Firmware#347 · 已指派 1 人 ·
维护者通常 4 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 48/100
SunDevilRocketry/Flight-Computer-Firmware#368 ·
维护者通常 4 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 45/100
SunDevilRocketry/Flight-Computer-Firmware#367 ·
维护者通常 4 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 42/100
SunDevilRocketry/Flight-Computer-Firmware#365 · 1 条评论 ·
维护者通常 4 天内回复
-
advanced enhancement
难度 5/5 一周以上 新手友好度 35/100
SunDevilRocketry/Flight-Computer-Firmware#364 · 2 条评论 ·
维护者通常 4 天内回复
查看 SunDevilRocketry/Flight-Computer-Firmware 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 70/100
ly05010419/MacNativeGames#1340 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
InukaAsith/TwinDesk#84 ·
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复