28static const char*
s_tag =
"TIME";
140 __asm__
volatile(
"mrs %0, primask" :
"=r"(primask));
141 if ((primask & 1U) != 0U) {
145 __asm__
volatile(
"nop");
149 while ((uint32_t)(
s_tick_ms - start) < ms) {
150 __asm__
volatile(
"wfi");
208#ifndef RA8_OFF_TARGET
static const char * s_tag
Logging / check tag.
Error Code Definitions for ra8-firmware.
@ k_ra8_err_invalid_arg
Invalid function argument.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Lightweight Logging Interface for ra8-firmware.
#define ra8_log_info_val(tag, message, value)
RA8 log info val.
#define ra8_log_error(tag, message)
RA8 log error.
Cortex-M85 SysTick + DWT cycle-counter timebase primitive.
@ k_ra8_systick_clk_cpu
CLKSOURCE = 1: processor (CPU) clock.
ra8_err_t ra8_systick_configure(uint32_t reload, ra8_systick_clock_source_t src, bool tick_irq)
Arm and start SysTick with a reload value and clock source.
uint32_t ra8_dwt_cyccnt_read(void)
Sample the DWT cycle counter (DWT_CYCCNT).
void ra8_dwt_cyccnt_enable(void)
Enable the DWT free-running cycle counter (DWT_CYCCNT).
static volatile uint32_t s_cycles_per_ms
CPU cycles per millisecond, stamped by ra8_time_init.
void ux_dcd_ra8_usb_irq_reenable(void)
Storm-guard recovery: zero the run counter and re-enable the USB IRQ.
static volatile uint32_t s_tick_ms
ra8_err_t ra8_time_init(uint32_t cpu_hz)
Implementation of ra8_time_init() – programme SysTick.
void ra8_time_on_tick(void)
Implementation of ra8_time_on_tick() – SysTick IRQ tick.
void ra8_delay_ms(uint32_t ms)
Implementation of ra8_delay_ms() – busy-wait with wfi.
void _tx_timer_interrupt(void)
void SysTick_Handler(void)
Service one SysTick event for the core timebase.
uint32_t ra8_time_ms(void)
Implementation of ra8_time_ms() – read SysTick counter.
volatile uint32_t g_ra8_threadx_systick_ready
0 until _tx_initialize_low_level has armed ThreadX's SysTick + timer state; 1 afterwards.
SysTick-based tick counter, delay and timestamp helpers.
Named Time Unit Constants for Delay / Timeout / Tick Math.
@ k_ra8_ms_per_sec
Milliseconds per second.