4.5.3. 调试指南

4.5.3.1. 驱动加载状态

当使用 RT-Thread,RTC 被正常初始化,会生成设备注册信息。在启动到命令行后,通过命令 list_device 查看:

aic /> list_device
device           type         ref count
-------- -------------------- ----------
...
rtc      RTC                  0
...

4.5.3.2. 调试开关

在 ZX-RTT 中 RTC 驱动的 Log 控制接口共用了全局的 aic_log.h 接口。

为了更方便调试,可以单独打开RTC模块的 DEBUG 级别 log(实际上是提升DEBUG到INFO级别)。需要在menuconfig中配置:

Drivers options  --->
    Drivers debug  --->
        [*] Enable RTC driver debug