Files
STM32F4-Base/Drivers/BSP/SD2506/README.md
T

29 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Drivers/BSP/SD2506/ — SD2506 RTC 驱动
> SD2506 实时时钟芯片驱动(I2C 接口):时间读写、温度、电池状态、诊断。
> 是 `sys_clock`(墙钟)的**硬件时间基准**。
## 文件一览
| 文件 | 作用 |
|---|---|
| `sd2506.c/h` | RTC 初始化、时间读写、ID/温度/电池读取、诊断 |
## 硬件接口
- **I2C**(具体引脚见根 `README.md` 与 `Inc/main.h`)
## 关键点
- **时间子系统优先初始化**:`app_main_init` 中最先调用 `sd2506_init` +
`sys_clock_init`,使后续日志都带时间戳
- 开机执行 **SD2506 诊断**(ID / 时间 / 温度 / 电池),失败触发"时钟芯片异常"自检上报
- RTC 故障时 `sys_clock_init` **降级到默认时间基准并返回 -1**
- 时间源同步由 `App/sync/time_sync.c`(timeSyncTask)负责
## 相关文档
- 墙钟维护:`docs/子系统设计/系统墙钟时间维护说明.md`
- 测试指南:`docs/测试说明/SD2506_Test_Guide.md`
- 陷阱台账:`docs/问题记录/SD2506_Trap_Records.md`