[nexus] implement microsecond alarm platform APIs (#12580)

This commit implements the otPlatAlarmMicro* platform APIs in the
Nexus simulation environment. It also transitions the simulation's
internal time base from millisecond to microsecond granularity to
ensure that both millisecond and microsecond alarms operate on a
consistent and shared time reference.

Changes include:
- Enabled OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE in Nexus config.
- Updated Nexus::Core to use a 64-bit microsecond time base (mNow).
- Implemented otPlatAlarmMicroGetNow, otPlatAlarmMicroStartAt, and
  otPlatAlarmMicroStop.
- Refactored Nexus::Node to support separate millisecond and
  microsecond alarm instances (mAlarmMilli and mAlarmMicro).
- Updated radio timestamps and PCAP logging to use the new high-
  resolution microsecond time base.
- Adjusted simulation time advancement and alarm triggering logic to
  handle both alarm types correctly.
This commit is contained in:
Jonathan Hui
2026-03-02 11:31:27 -06:00
committed by GitHub
parent 709217aa8a
commit 4866887933
7 changed files with 80 additions and 24 deletions
+2 -1
View File
@@ -38,7 +38,8 @@ void Node::Reset(void)
uint32_t id = GetId();
mRadio.Reset();
mAlarm.Reset();
mAlarmMilli.Reset();
mAlarmMicro.Reset();
mMdns.Reset();
mPendingTasklet = false;
#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE