Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Error: Implement a fault-reset feature

已关闭
#165 6 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 4 天内回复

@ETSells 已经在做这个了。

开始于 2026年10月10日。

  • #352 来自 @ETSells —— 未关闭

评估

难度
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 内容生成。

描述

advanced enhancement help wanted

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 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

SunDevilRocketry/Flight-Computer-Firmware 的其他 Issue

查看 SunDevilRocketry/Flight-Computer-Firmware 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。