【ALINX AXU2CGB试用】PL 端外挂 RTC 驱动适配调试
Rtc
器件是 maxin ds3231 模块:
![](https://www.cirmall.com/bbs/data/attachment/forum/202107/19/091742sefesee9epzy25xe.png)
Rtc 挂在 PL 端 IIc 总线上,硬件连接如下:
![](https://www.cirmall.com/bbs/data/attachment/forum/202107/19/091743lbq5l5sj8ymbs8i8.png)
电路设计如下高亮部分
![](https://www.cirmall.com/bbs/data/attachment/forum/202107/19/091742h961uuxs7appsase.png)
控制器驱动配置如下:
![](https://www.cirmall.com/bbs/data/attachment/forum/202107/19/091742q9gkgzk3feugf3mq.png)
客户端驱动配置如下:
![](https://www.cirmall.com/bbs/data/attachment/forum/202107/19/091743dfgbzb1kiq4bpmme.png)
设备树配置如下
![](https://www.cirmall.com/bbs/data/attachment/forum/202107/19/091743ahhig7743g3mvmz3.png)
重新编译启动开机:I2c-3 是本文中的 iic 总线:
![](https://www.cirmall.com/bbs/data/attachment/forum/202107/19/091743olzng2lzp07rklrl.png)
DS1307 这个就是 DS3231 时钟设备:
![](https://www.cirmall.com/bbs/data/attachment/forum/202107/19/091743q4ix0h0vxxvxxv0v.png)
ds3231 没有自己的驱动,ds1307 驱动代码说是可能兼容的,适配就是这个步骤方法。驱动 probe 是 ok 的,读取时间会出错,估计是代码兼容的问题,等稍后分析 rtc 后发现问题再来更新。