onepice 发表于 2020-5-13 14:45:34

标签天线fin时间计算疑问

final_tx_time = (resp_rx_ts + (RESP_RX_TO_FINAL_TX_DLY_UUS * UUS_TO_DWT_TIME)) >> 8;
                dwt_setdelayedtrxtime(final_tx_time);

                /* Final TX timestamp is the transmission time we programmed plus the TX antenna delay. */
                final_tx_ts = (((uint64)(final_tx_time & 0xFFFFFFFE)) << 8) + TX_ANT_DLY;

请问为什么是移动8位,还有dwt_setdelayedtrxtime()这个函数不是一开始我就使用了,为什么还需要天线延时?

dw1000_2020 发表于 2020-5-13 17:19:17

移8位 好像是一个寄存器只用到这个吧,之前看到一篇文章说明.
至于为什么要天线延时,你可以这样理解, 对于接收: 射频信号经过,天线, 再到DW1000中, 对于发送,就是反过来的,先是DW1000,再经过天线.
所以天线的不同,所要花费的时间肯定不一样.

以上就是我的理解,反正对不对我都说了. 我也持续关注大神的回复.

imagine 发表于 2020-5-13 19:44:31

dw1000_2020 发表于 2020-5-13 17:19
移8位 好像是一个寄存器只用到这个吧,之前看到一篇文章说明.
至于为什么要天线延时,你可以这样理解, 对于 ...

8位哪里可以看到?

蓝点无限 发表于 2020-5-14 08:58:04

imagine 发表于 2020-5-13 19:44
8位哪里可以看到?

/*! ------------------------------------------------------------------------------------------------------------------
* @fn dwt_setdelayedtrxtime()
*
* @brief This API function configures the delayed transmit time or the delayed RX on 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,
* or at which to turn on the receiver)
*
* output parameters none
*
* no return value
*/
void dwt_setdelayedtrxtime(uint32 starttime)
{
    dwt_write32bitoffsetreg(DX_TIME_ID, 1, starttime) ;

} // end dwt_setdelayedtrxtime()
delayed tx是匹配时钟高32bit。因为时钟低9bit是无效的


也就是delayed tx,定时发送时间,是一个"整数"
但是这个是芯片发送出去的时间,我要打包进去的是一个实际从模块出来的时间,所以又要加个天线延时进去


dw1000_2020 发表于 2020-5-14 10:29:18

厉害,厉害, 专业就是专业.

imagine 发表于 2020-5-14 11:16:04

蓝点无限 发表于 2020-5-14 08:58
delayed tx是匹配时钟高32bit。因为时钟低9bit是无效的




感谢蓝点哥

蓝点无限 发表于 2020-5-14 11:42:08

imagine 发表于 2020-5-14 11:16
感谢蓝点哥

:handshake
页: [1]
查看完整版本: 标签天线fin时间计算疑问