请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:CC2340R5-Q1 工具与软件:
您好、TI
连接监视器是否支持时间同步? 如果支持它、我如何实现它?
我从代码中看到、当前的方式是计算 deltaTime 以及一些 参数(如 BUS_LATENCY_IN_MS)要跳过的通道数。
// With a 100ms connection interval we will skip 3 channels into the future (in each connection event we can monitor 1 channel)
// This is mainly done to ensure that even a very slow bus is able to send the connection information in time
// In time: before the Central/Peripheral already go past the channel that we chose to listen on
// If Central/Peripheral are already past this point, we will have to wait numChannels*connInterval until we catch the
// connection once again
chanSkip = (uint16_t)((BUS_LATENCY_IN_MS/connInterval) + 1);
// DeltaTime is the distance between the current time and time we received the data for the new connection.
deltaTime = uble_timeDelta(currTime, reqTime);
// Figure out how many connection events have passed since the last anchor point
if (deltaTime > connInterval * BLE_TO_RAT)
{
chanReqDiff = (uint16_t) (deltaTime / (connInterval * BLE_TO_RAT) + 1);
}
if (gUpdateSessionMissEvents[hostConnHandle] == 0)
{
ubCMConnInfo.ArrayOfConnInfo[i].currentChan = setNextDataChan(sessionId, chanSkip + chanReqDiff); //jump some [ms] channels into the future
// Catch anchor point n+2 connection intervals in the future
ubCMConnInfo.ArrayOfConnInfo[i].scanDuration = (uint16_t)(connInterval*(chanSkip +chanReqDiff+1));
}
else //gUpdateSessionMissEvents[hostConnHandle] != 0
{
// Indicates that there was a Connection param update of an active connection handle, then take into consideration the calculation of num events missed until the new param update.
ubCMConnInfo.ArrayOfConnInfo[i].currentChan = setNextDataChan(sessionId, gUpdateSessionMissEvents[hostConnHandle] + chanReqDiff);
ubCMConnInfo.ArrayOfConnInfo[i].scanDuration = (uint16_t)(connInterval*(chanSkip +1));
}
这将导致在使用较慢的总线时有时无法进行监控。 我也不确定对于慢速总线、BUS_LATENCY_IN_MS 的值应该是多少。
是否有办法解决这个问题(例如时间同步)? 例如、NXP 的产品在传输连接参数之前执行时间同步。
此致
普雷斯顿