找回密码
 立即注册

微信扫码登录

查看: 342|回复: 9

8258有rtc功能嘛?

[复制链接]

3

主题

8

回帖

47

积分

英勇黄铜

积分
47
发表于 2024-12-19 16:16:57 | 显示全部楼层 |阅读模式
information
说明:   建议参照本版块置顶帖内容输入必要信息
芯片型号:
SDK及版本:
芯片:TLSR8258
ZigBee-SDK version:3.7.1.0
连入网关后我获得实时时间后,在进入低功耗的情况下,我想做一个定时功能展示当前时间该如何做呢?

27

主题

212

回帖

699

积分

版主

积分
699
发表于 2024-12-19 19:27:16 | 显示全部楼层
没有硬件RTC,你可以看下ev_rtc是否有你需要的功能。

3

主题

8

回帖

47

积分

英勇黄铜

积分
47
 楼主| 发表于 2024-12-20 10:21:53 | 显示全部楼层
TL_YB 发表于 2024-12-19 19:27
没有硬件RTC,你可以看下ev_rtc是否有你需要的功能。

噢噢噢,就是能在低功耗下能进行计时就行

12

主题

44

回帖

258

积分

华贵铂金

积分
258
发表于 2024-12-20 13:14:05 | 显示全部楼层

n

本帖最后由 wes58 于 2024-12-23 09:51 编辑

I was looking for this. So it is good to find it.
When looking at the code in ev_rtc.c, I noticed that Telink is using year 2000 as start of UTC time.
If I want to sync the time that I get from NTP server, the start year that is used by NTP server is 1900. So I will get incorrect result.
I know that I can change in the code the start year to 1900.
The other way would be to enter the time in the time structure and convert it using ev_rtc_utc2Second().
But is there a reason why Telink decided to use 2000?

And, BLE ZigBee concurrent SDK doesn't have ev_rtc.c and ev_rtc.h files!

27

主题

212

回帖

699

积分

版主

积分
699
发表于 2024-12-23 10:08:56 | 显示全部楼层
wes58 发表于 2024-12-20 13:14
I was looking for this. So it is good to find it.
When looking at the code in ev_rtc.c, I noticed t ...

Hi,
It follows the ZCL specification.

12

主题

44

回帖

258

积分

华贵铂金

积分
258
发表于 2024-12-23 13:01:18 | 显示全部楼层
TL_YB 发表于 2024-12-23 10:08
Hi,
It follows the ZCL specification.

Which specification? I couldn't find it in any zigbee document I have.

27

主题

212

回帖

699

积分

版主

积分
699
发表于 2024-12-23 17:36:59 | 显示全部楼层
You can find this passage in the ZCL spec.

微信截图_20241223172527.png

12

主题

44

回帖

258

积分

华贵铂金

积分
258
发表于 2024-12-24 04:32:04 | 显示全部楼层
本帖最后由 wes58 于 2024-12-24 05:30 编辑
TL_YB 发表于 2024-12-23 17:36
You can find this passage in the ZCL spec.

Thanks for that. I was reading this and somehow I missed it..
Why would they do it this way.
Someone didin't think that you have to get accurate time stamp from somewhere. And you get it from the internet from NTP server.
So, you have to convert it to ZigBee UTC time stamp.



20

主题

45

回帖

218

积分

华贵铂金

积分
218
发表于 2025-1-6 16:38:40 | 显示全部楼层
TL_YB 发表于 2024-12-19 19:27
没有硬件RTC,你可以看下ev_rtc是否有你需要的功能。

您好,问一下在我低功耗终端联网给它初始化好时间后,是需要自己手动去开启一个定时器让它时间流转起来吗?

27

主题

212

回帖

699

积分

版主

积分
699
发表于 2025-1-6 19:12:05 | 显示全部楼层
wx_8236422632 发表于 2025-1-6 16:38
您好,问一下在我低功耗终端联网给它初始化好时间后,是需要自己手动去开启一个定时器让它时间流转起来吗 ...

系统运行起来后rtcSeconds就自动累加了,不需要应用层开定时器。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Telink forum ( 沪ICP备17008231号-1 )

GMT+8, 2025-1-19 22:11 , Processed in 0.092360 second(s), 23 queries .

Powered by Telink 隐私政策

泰凌微电子版权所有 © 。保留所有权利。 2024

快速回复 返回顶部 返回列表