-
Describe the bug A clear and concise description of what the bug is. When the function otPlatRadioReceiveAt is called, I noticed that the input paramter aStart, the start of the receive window, is earlier than the current time of the system. We are around 29ms 'late'. I looked at the call stack in the OT source code, starting from SubMac::UpdateCsl, I list the important steps (in my opinion) in the process before otPlatRadioReceiveAt is called:
HandleCslTimer()
My question is on the last line; from my understanding, 'aStart' is thus (mCslSampleTime.GetValue() - periodUs - timeAhead), which is equal to (otPlatRadioGetNow() - timeAhead). Is it normal behavior for otPlatRadioReceiveAt to be called with these parameters? To Reproduce Information to reproduce the behavior, including:
Expected behavior A clear and concise description of what you expected to happen. Console/log output If applicable, add console/log output to help explain your problem. Additional context Add any other context about the problem here. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @lukatug. Notice that When
Hope this helps. |
Beta Was this translation helpful? Give feedback.
Hi @lukatug.
Notice that
mCslSampleTime
is initialized once with theotPlatRadioGetNow
value and then periodically increased byperiodUs
.When
RadioSupportsReceiveTiming
the logic for each iteration is as follows:mCslTimer.FireAt(mCslSampleTime - timeAhead);
Get<Radio>().UpdateCslSampleTime(mCslSampleTime.GetValue());
Get<Radio>().ReceiveAt(mCslChannel, mCslSampleTime.GetValue() - periodUs - timeAhead, timeAhead + timeAfter));
Here
timeAhead
doesn't includekCslReceiveTimeAhead
which i…