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

Explicit external Tick and diagnostic counter contracts. More...

#include "nexus/os/lowpower.h"
#include <stdint.h>

Go to the source code of this file.

Functions

void nx_freertos_external_tick_setup (uint32_t tick_hz)
 Configure the application's selected kernel Tick source.
void nx_freertos_runtime_counter_start (void)
 Start the explicitly selected diagnostic counter.
uint32_t nx_freertos_runtime_counter_now (void)
 Read the diagnostic counter without blocking.

Detailed Description

Explicit external Tick and diagnostic counter contracts.

Author
Nexus Team
Note
Applications implement these symbols only when the authored OS policy enables them. No weak timer/counter fallback is supplied. The platform never invents timer wiring.

Definition in file tick.h.

Function Documentation

◆ nx_freertos_external_tick_setup()

void nx_freertos_external_tick_setup ( uint32_t tick_hz)

Configure the application's selected kernel Tick source.

Parameters
[in]tick_hzExact authored Tick frequency in hertz
Note
Scheduler startup calls this in its canonical masked, privileged context. Configure a periodic interrupt, clear pending state and route it to the selected kernel Tick handler at its validated priority. Do not start tasks here. Hardware clock and routing remain application/SoC-owned.

◆ nx_freertos_runtime_counter_now()

uint32_t nx_freertos_runtime_counter_now ( void )

Read the diagnostic counter without blocking.

Returns
Monotonic modulo-32-bit counter in application-defined units
Note
Called by the kernel during context switches. It must be bounded, allocation-free and safe in interrupt/critical context. Configure a frequency above Tick frequency and account for wrapping when interpreting recorded totals.

◆ nx_freertos_runtime_counter_start()

void nx_freertos_runtime_counter_start ( void )

Start the explicitly selected diagnostic counter.

Note
Called during scheduler startup. Counter initialization must be bounded, allocation-free and safe in the startup mask.