51uwb.cn

 找回密码
 立即注册
查看: 3720|回复: 6

DW1000延时发送时间问题

[复制链接]

1

主题

13

帖子

34

积分

新手上路

Rank: 1

积分
34
发表于 2021-12-18 20:58:01 | 显示全部楼层 |阅读模式
//发送一条delayed 信息(定时发送)
//定时发送的好处是可以将 这条信息发送的具体时间  打包到这个数据包发送给对方
final_tx_time =   dwt_readsystimestamphi32()  + 0x17cdc00/80;//10ms/8
我想知道0x17cdc00/80是如何计算选取的?
此外,我对于DW1000 User Manual中介绍有关时间基准的问题不理解,希望各位能够解惑。


在Clock Periods and Frequencies
The chipping rate given by the IEEE 802.15.4-2011 standard [1] is 499.2 MHz. DW1000 system clocks are referenced to this frequency. Where the system clock frequency is given as 125 MHz, this is an
approximation to the actual system clock frequency of 124.8 MHz. Similarly, where the system clock period is given as 8 ns, this is an approximation to the actual period of 1/ (124.8×106) seconds

在Register file: 0x06 – System Time Counter中
System time and time stamps are designed to be based on the time units which are nominally at 64 GHz, or more precisely 499.2 MHz × 128 which is 63.8976 GHz. In line with this when the DW1000 is in idle mode with the digital PLL enabled, the System Time Counter is incremented at a rate of 125 MHz in units of 512. The nine low-order bits of this register are thus always zero. The counter wrap period of the clock is then: 240 ÷ (128×499.2e6) = 17.2074 seconds.


在上述中写道系统时钟频率是124.8MHz,那么64GHz又是用来干什么的?还有其中出现的数字128,512等数字,不理解具体是用来干嘛的。



回复

使用道具 举报

35

主题

941

帖子

3912

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
3912
发表于 2021-12-19 19:44:05 | 显示全部楼层
系统时钟124.8Mhz, 经过倍频,内部有个接近64Ghz,精确一点是63.8976Gh的时钟用来给收发的信息打时间戳。

delayed tx,基于内部64Ghz 时钟为基础做的delay。
回复

使用道具 举报

1

主题

13

帖子

34

积分

新手上路

Rank: 1

积分
34
 楼主| 发表于 2021-12-20 20:16:32 | 显示全部楼层
蓝点无限 发表于 2021-12-19 19:44
系统时钟124.8Mhz, 经过倍频,内部有个接近64Ghz,精确一点是63.8976Gh的时钟用来给收发的信息打时间戳。
...

感谢解惑。但是我不知道0x17cdc00/80;//10ms/8这个时间值是如何选取的,看注释是延时了1.25ms吗?这个0x17cdc00和对应的时间值是如何换算的呢?
回复

使用道具 举报

35

主题

941

帖子

3912

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
3912
发表于 2021-12-20 22:13:57 | 显示全部楼层
yiyayiya 发表于 2021-12-20 20:16
感谢解惑。但是我不知道0x17cdc00/80;//10ms/8这个时间值是如何选取的,看注释是延时了1.25ms吗?这个0x1 ...

0x17cdc00/80;//10ms/8这个时间值是如何选取的
--》 这个是测试出来的,尽量小,因为twr算法中间时间越短,累积误差越少。
0x17cdc00 --> 这个就是根据每个时钟绝对时间算出来的,系统时钟是63.8976Gh,每个时钟绝对时间可以算。
ps 具体你看下final_tx_time  设定是时钟偏移多少位,具体可以参考datasheet
回复

使用道具 举报

1

主题

13

帖子

34

积分

新手上路

Rank: 1

积分
34
 楼主| 发表于 2021-12-21 22:24:53 | 显示全部楼层
蓝点无限 发表于 2021-12-20 22:13
0x17cdc00/80;//10ms/8这个时间值是如何选取的
--》 这个是测试出来的,尽量小,因为twr算法中间时间越 ...

小弟愚钝,冒昧问下。比如我要实现延时2ms发送,final_tx_time =   dwt_readsystimestamphi32()  + “延时时间”,那么这个延时时间的计算过程是怎样的?难道是2ms*(128*499.2MHz)=127795.2e3?
回复

使用道具 举报

35

主题

941

帖子

3912

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
3912
发表于 2021-12-22 22:42:41 | 显示全部楼层
yiyayiya 发表于 2021-12-21 22:24
小弟愚钝,冒昧问下。比如我要实现延时2ms发送,final_tx_time =   dwt_readsystimestamphi32()  + “延 ...

dw1000 时间戳使用的频率是63.8976Ghz,这个上面说过了
那对应1个时钟的绝对时间是1/63.8976Ghz,可以算出这个是xx秒,非常小的一个值,这个你可以算出来、

上面算出一个时钟的绝对时间了,你延时2ms,直接用2ms除以绝对时间就行。

具体计算你可以试试,大概原理就是这样。

回复

使用道具 举报

1

主题

13

帖子

34

积分

新手上路

Rank: 1

积分
34
 楼主| 发表于 2021-12-23 21:40:03 | 显示全部楼层
蓝点无限 发表于 2021-12-22 22:42
dw1000 时间戳使用的频率是63.8976Ghz,这个上面说过了
那对应1个时钟的绝对时间是1/63.8976Ghz,可以算 ...

十分感谢
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

bphero Inc.  

GMT+8, 2024-3-29 15:45 , Processed in 0.019999 second(s), 4 queries , File On.

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc. Template By 【未来科技】【 www.wekei.cn 】

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