final_tx_time = dwt_readsystimestamphi32() + 0x17cdc00/10;//1ms
final_tx_time = dwt_readsystimestamphi32()+ 0x17cdc00/10;//1ms这个1ms怎么算出来的
根据时钟算的
uwb 1个时钟大概是1.56ps
dwt_readsystimestamphi32()返回的是高32bit,对应是1.56<<8 ,大约400ps
400*0x17cdc00/10 大约就是1ms dwt_readsystimestamphi32()+ 0x17cdc00/10;//1ms 这个是 :
dwt_readsystimestamphi32() 加 0x17cdc00/10
并不是乘号
是不是上面算错了? dw1000_2020 发表于 2020-5-30 09:31
dwt_readsystimestamphi32()+ 0x17cdc00/10;//1ms 这个是 :
dwt_readsystimestamphi32() 加 0x1 ...
uwb 1个时钟大概是1.56ps
dwt_readsystimestamphi32()返回的是高32bit,返回值每个单位 对应是1.56<<8 ,大约400ps
dwt_readsystimestamphi32()+ 0x17cdc00/10 相当于当前时间 + delay,当前时间是dwt_readsystimestamphi32() ,delay 是0x17cdc00/10, 而这个公式对应时间单位大概是400ps,所以就有下面的实际delay
400*0x17cdc00/10 大约就是1ms 蓝点无限 发表于 2020-6-1 08:19
uwb 1个时钟大概是1.56ps
dwt_readsystimestamphi32()返回的是高32bit,返回值每个单位 对应是1.56
UWB microsecond (uus) to device time unit (dtu, around 15.65 ps) conversion factor.
uwb一个时钟是15.65ps,实际0x17cdc00/10 差不多是10ms,请参考文档 公说公有理婆说婆有理 首先:dwt_setdelayedtrxtime(final_tx_time)的输入应该是预计发送的时间,而不是延迟的时间
;* input parameters
* @param starttime - the TX/RX start time (the 32 bits should be the high 32 bits of the system time at which to send the message,
然后0x17cdc00一位是15.6ps,
所以乘出来是24 960 000*15.6ps/1000 000=389.376us
再者如果是0x17cdc00/10就是38.9us或者0x17cdc00/80为4.8672us
再加上前面的dwt_readsystimestamphi32() 为获取当前时间的前32位,因为后八位没什么意义
所以dwt_readsystimestamphi32()+0x17cdc00/10就是发送时间,
而所延迟的时间就是大约为0x17cdc00/10的时间即38.9us。不知道我这么理解是不是准确的
zfjdy 发表于 2024-4-14 14:46
首先:dwt_setdelayedtrxtime(final_tx_time)的输入应该是预计发送的时间,而不是延迟的时间
;* input p ...
如果是1ms或者10ms的话,放在中断里,还要等待感觉有点夸张
页:
[1]