Nexus Embedded Platform 1.0.0
Statically assembled reusable embedded mechanisms
Loading...
Searching...
No Matches
lowpower.h File Reference

Explicit continuous-clock tickless timer port. More...

#include "nexus/core/status.h"
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  nx_freertos_tick_snapshot_t
 Stopped-tick epoch with the concrete port's declared precision. More...
struct  nx_freertos_lowpower_port_t
 Caller-owned, immutable tickless timer implementation. More...

Macros

#define NX_FREERTOS_LATE_TICK_BUDGET   8u
 Bounded late alarm catch-up; larger delays violate the timer port.

Functions

const nx_freertos_lowpower_port_t * nx_freertos_lowpower_port (void)
 Return the explicitly selected continuous timer port.
void nx_freertos_suppress_ticks_and_sleep (uint32_t expected_idle_ticks)
 Kernel tickless hook with measured phase preservation.

Detailed Description

Explicit continuous-clock tickless timer port.

Author
Nexus Team
Version
1.0.0
Date
2026-10-11

Definition in file lowpower.h.

Macro Definition Documentation

◆ NX_FREERTOS_LATE_TICK_BUDGET

#define NX_FREERTOS_LATE_TICK_BUDGET   8u

Bounded late alarm catch-up; larger delays violate the timer port.

Definition at line 17 of file lowpower.h.

Function Documentation

◆ nx_freertos_lowpower_port()

const nx_freertos_lowpower_port_t * nx_freertos_lowpower_port ( void )

Return the explicitly selected continuous timer port.

Returns
Stable port or NULL to leave normal periodic ticking.
Note
A maintained SoC binding or application implementation overrides the weak NULL default. The port and context remain live throughout the scheduler; no runtime rebinding, hidden pool or worker is provided. Absence of a port never stops ticks or sleeps.

◆ nx_freertos_suppress_ticks_and_sleep()

void nx_freertos_suppress_ticks_and_sleep ( uint32_t expected_idle_ticks)

Kernel tickless hook with measured phase preservation.

Parameters
[in]expected_idle_ticksKernel's bounded next-unblock window.
Note
Called only by Idle with scheduler suspended. Uses reviewed masked shallow WFI, exact saved PRIMASK restoration and bounded pended-tick catch-up. The configured tick rate must divide 1000000 exactly. The final kernel readiness check precedes tick pause; a rejected pause makes no changes. Default profiles do not call this hook. HIL must verify the concrete timer, clock continuity and actual wake latency.