FTL诊断:L0探针窗口绑定路径日志(FAT读LPN→物理页+写目标)+重格式化行带fr码

This commit is contained in:
2026-09-20 05:12:08 +08:00
parent 7bfa312b56
commit 0669471178
3 changed files with 37 additions and 6 deletions
+6 -1
View File
@@ -260,9 +260,13 @@ void StartDefaultTask(void *argument)
} \
} while (0)
FRESULT hfr;
nand_ftl_set_tree_probe(1);
FS_VOL_PROBE(hfr);
if (hfr != FR_OK) {
FS_VOL_PROBE(hfr); /* 两击确认 */
}
nand_ftl_set_tree_probe(0);
if (hfr != FR_OK) {
nand_ftl_scan_checks(); /* 诊断:环上 checkpoint 的 epoch 分布 */
}
if (hfr != FR_OK) {
@@ -270,7 +274,8 @@ void StartDefaultTask(void *argument)
hfr == FR_INT_ERR || hfr == FR_DISK_ERR ||
hfr == FR_NO_FILE || hfr == FR_NO_PATH ||
hfr == FR_INVALID_NAME || hfr == FR_NO_FILESYSTEM) {
DBG_INFO("[FS] volume FAT invalid, reformatting...");
DBG_INFO("[FS] volume FAT invalid (fr=%d), reformatting...",
(int)hfr);
f_mount(NULL, "", 0);
{
static uint8_t fs_work2[FF_MAX_SS];