GD5F沉降延时调至2ms(兼顾BBT扫描耗时)+探针增加meta区字节(验证半新半旧页是否消除)

This commit is contained in:
2026-09-20 05:07:12 +08:00
parent f4d4cef9e6
commit 7bfa312b56
2 changed files with 11 additions and 6 deletions
+3 -2
View File
@@ -65,9 +65,10 @@ extern "C" {
* 确定性早于 0Bh 读完成)→ 0Bh 流式读到"前段新、后段旧"的混合页 * 确定性早于 0Bh 读完成)→ 0Bh 流式读到"前段新、后段旧"的混合页
* (journal checkpoint header 有效而 meta 残留旧数据 → 复位后 resume * (journal checkpoint header 有效而 meta 残留旧数据 → 复位后 resume
* 锚定新 checkpoint 却读到旧树 → 数据静默丢失)。13h 之后、0Bh 之前 * 锚定新 checkpoint 却读到旧树 → 数据静默丢失)。13h 之后、0Bh 之前
* 强制等待该时长,保证整页新鲜。取值须覆盖低 VDD 下 t_RR 最慢工况。 * 强制等待该时长,保证整页新鲜。取值须覆盖低 VDD 下 t_RR 最慢工况,
* 同时受开机 BBT 全片扫描(2048 次页读)耗时约束:2ms 实测两可。
*/ */
#define GD5F_PAGE_READ_SETTLE_MS 5 #define GD5F_PAGE_READ_SETTLE_MS 2
#define GD5F_TOTAL_BLOCKS 2048 #define GD5F_TOTAL_BLOCKS 2048
#define GD5F_TOTAL_SIZE (GD5F_TOTAL_BLOCKS * GD5F_BLOCK_SIZE) #define GD5F_TOTAL_SIZE (GD5F_TOTAL_BLOCKS * GD5F_BLOCK_SIZE)
+8 -4
View File
@@ -231,16 +231,20 @@ int dhara_nand_read(const struct dhara_nand *n, dhara_page_t p, size_t offset, s
if (s_probe_log && offset == 0 && length == FTL_PAGE_SIZE) { if (s_probe_log && offset == 0 && length == FTL_PAGE_SIZE) {
/* 组末页(组内偏移 15:页号低 4 位 = 15)= checkpoint 页: /* 组末页(组内偏移 15:页号低 4 位 = 15)= checkpoint 页:
* 记录 raw 前 4 字节 + 时间戳(捕捉 stale buffer: * 记录 header 前 4 字节 + meta 区 4 字节(偏移 944 = 槽 7,
* 读到上一页残留 = 13h 就绪信号早于 buffer 装载完成) */ * 树根 meta)+ 时间戳。header 新/meta 旧 = 半新半旧混合页
* (低 VDD 就绪信号提前竞态的直接证据) */
if ((p & 15u) == 15u) { if ((p & 15u) == 15u) {
const uint8_t *m = data; const uint8_t *m = data;
DBG_INFO("probe t %lu pg %lu blk %lu g%lu: %02X %02X %02X %02X", DBG_INFO("probe t %lu pg %lu blk %lu g%lu: %02X %02X %02X %02X"
" meta %02X %02X %02X %02X",
(unsigned long)HAL_GetTick(), (unsigned long)HAL_GetTick(),
(unsigned long)phy_pg, (unsigned long)(p >> 6), (unsigned long)phy_pg, (unsigned long)(p >> 6),
(unsigned long)((p >> 4) & 3u), (unsigned long)((p >> 4) & 3u),
(unsigned int)m[0], (unsigned int)m[1], (unsigned int)m[0], (unsigned int)m[1],
(unsigned int)m[2], (unsigned int)m[3]); (unsigned int)m[2], (unsigned int)m[3],
(unsigned int)m[944], (unsigned int)m[945],
(unsigned int)m[946], (unsigned int)m[947]);
} }
} }
return 0; return 0;