S32K144 RTC

1、先看下 RTC 时钟源
在这里插入图片描述
2、RTC Control Register (CR)

LPO Select
When set, the RTC prescaler increments using the LPO 1 kHz clock and not the RTC 32.768 kHz clock.
The LPO increments the prescaler from bit TPR[5] (TPR[4:0] are ignored), supporting close to 1 second
increment of the seconds register. Although compensation is supported when clocked from the LPO,
TCR[4:0] of the compensation register are also ignored and only TCR[7:5] set the compensation value
(can overflow after 1020 to 1027 cycles).
0b - RTC prescaler increments using 32.768 kHz clock.
1b - RTC prescaler increments using 1 kHz LPO, bits [4:0] of the prescaler are ignored.

这里表示 :
0:RTC 经过 32.768KHZ 的 方式进行计数
1:RTC 经过 1KHZ 的方式进行计数

因为没有外部 32.768KHZ的 晶振,因此 这里选择 LPO 1KHZ 的时钟源。

3、LPO 1KHZ时钟源 需要 LPO Clock Select Register (LPOCLKS) 中 使能。

注意1: LPO Clock Select Register (LPOCLKS) 上电只能写入一次,软件复位 后都写不进去。

注意2: LPO Clock Select Register (LPOCLKS) 属于 System Integration Module, 只能特权模式写入。

在这里插入图片描述
在这里插入图片描述

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值