查看“DS1307”的源代码
←
DS1307
跳转到导航
跳转到搜索
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
== 说明 == RTC芯片,为没有RTC的系统提供实时时钟。 === 个人使用说明 === ==== 为[[MT7688]]添加实时时钟 ==== 操作系统为[[openwrt]],内核为[[Linux]]。主要步骤如下: * 将DS1307的I2C与MT7688的I2C总线相连 * 在[[openwrt]]的menuconfig启用CONFIG_PACKAGE_kmod-i2c-mt7628(> Kernel modules > I2C support > kmod-i2c-mt7628)与CONFIG_PACKAGE_kmod-rtc-ds1307(> Kernel modules > Other modules > kmod-rtc-ds1307) * 在[[Devicetree|设备树(dts)]]中添加ds1307的配置,如<syntaxhighlight lang="dts" line="1"> &i2c { status = "okay"; ds1307: rtc@68 { compatible = "dallas,ds1307"; reg = <0x68>; }; }; </syntaxhighlight> 注:以上步骤均在openwrt-22.03中通过测试。 [[Linux]] 5.10中关于DS1307的配置说明:<syntaxhighlight lang="text" line="1"> Dallas DS1307 and compatible RTC Required properties: - compatible: should be one of: "dallas,ds1307", "dallas,ds1308", "dallas,ds1337", "dallas,ds1338", "dallas,ds1339", "dallas,ds1388", "dallas,ds1340", "dallas,ds1341", "maxim,ds3231", "st,m41t0", "st,m41t00", "st,m41t11", "microchip,mcp7940x", "microchip,mcp7941x", "pericom,pt7c4338", "epson,rx8025", "isil,isl12057" "epson,rx8130" - reg: I2C bus address of the device Optional properties: - interrupts: rtc alarm interrupt. - clock-output-names: From common clock binding to override the default output clock name - wakeup-source: Enables wake up of host system on alarm - trickle-resistor-ohms : ds1339, ds1340 and ds 1388 only Selected resistor for trickle charger Possible values are 250, 2000, 4000 Should be given if trickle charger should be enabled - aux-voltage-chargeable: ds1339, ds1340, ds1388 and rx8130 only Tells whether the battery/supercap of the RTC (if any) is chargeable or not. Possible values are 0 (not chargeable), 1 (chargeable) Deprecated properties: - trickle-diode-disable : ds1339, ds1340 and ds1388 only Do not use internal trickle charger diode Should be given if internal trickle charger diode should be disabled (superseded by aux-voltage-chargeable) Example: ds1339: rtc@68 { compatible = "dallas,ds1339"; reg = <0x68>; interrupt-parent = <&gpio4>; interrupts = <20 0>; trickle-resistor-ohms = <250>; }; </syntaxhighlight> == 官方/[[alldatasheet]]资料 == === 相关数据手册 === [[文件:DS1307.pdf|左|缩略图]]
返回
DS1307
。
导航菜单
个人工具
登录
命名空间
页面
讨论
大陆简体
查看
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
工具
链入页面
相关更改
特殊页面
页面信息