Files
ThreadX4TGFS/test/threadx/vp_timer_jitter.c
T
alex 054251f810 Test upstream RISC-V SMP candidates on HERE VP
Build the SMP library and Moonlight board support against a selectable ThreadX source tree. Keep the pinned regression matrix and add RV32GC and RV64GC context tests. Adapt the direct timeout fixture to the RV64 timer extension and give timing-sensitive cases more phase coverage on HERE VP.
2026-11-27 11:13:06 +01:00

17 lines
494 B
C

#include "hwtimer.h"
void __real__tx_timer_interrupt(void);
void __wrap__tx_timer_interrupt(void)
{
static uint32_t sequence = 1;
/* Vary the interval over 17 ACLINT counts, centred on the normal tick,
so the ISR samples more than two phases of the test thread's loop. */
sequence = sequence * 1664525u + 1013904223u;
uint64_t next = get_aclint_mtimecmp(aclint);
set_aclint_mtimecmp(aclint, next - 8 + (sequence >> 16) % 17u);
__real__tx_timer_interrupt();
}