75typedef enum : uint16_t {
82typedef enum : uint8_t {
89typedef enum : uint16_t {
101typedef enum : uintptr_t {
137#ifndef RA8_OFF_TARGET
231 (void)first_unused_memory;
239 uint32_t cpuclk_hz = 0U;
240 uint32_t expected = 0U;
248 (live_rvr != expected)) {
264 __asm__
volatile(
"wfi");
290 __asm__
volatile(
"wfi");
295 __asm__
volatile(
"wfi");
299#ifndef RA8_OFF_TARGET
305 __asm__
volatile(
"wfi");
void main(void)
Secure fallback main entry point.
void tx_application_define(void *first_unused_memory)
ThreadX system-define hook: build worker thread + byte pool.
static CHAR s_thread_name[]
volatile uint32_t g_threadx_retune_tick
Scheduler-liveness counter – bumped by the worker on each wake.
retune_stack_t
Stack size, in bytes, for the worker thread.
@ k_retune_thread_stack_bytes
Retune thread stack bytes.
static uint8_t s_retune_stack[k_retune_thread_stack_bytes]
Stack for the worker thread (32-bit aligned per ARMv8-M AAPCS).
static uint32_t internal_retune_read_syst_rvr(void)
Read back the SysTick reload register (SYST_RVR).
retune_period_t
Worker sleep period in ThreadX ticks (tx_user.h pins a tick to 1 ms).
@ k_retune_loop_ticks
Retune loop ticks.
static TX_THREAD s_retune_thread
Worker thread control block.
volatile uint32_t g_threadx_retune_reload
SysTick reload the retune computed for the live CPUCLK0.
volatile uint32_t g_threadx_retune_bad
Non-zero iff the retune failed or SYST_RVR did not match the independently-computed reload for the li...
static void internal_retune_thread_entry(ULONG thread_input)
Worker entry: toggle LED1 and advance the liveness counter.
retune_priority_t
Thread priority for the worker thread.
@ k_retune_thread_priority
Retune thread priority.
retune_syst_addr_t
SysTick reload register address (Cortex-M System Control Space).
@ k_retune_syst_rvr_addr
Retune syst rvr address.
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
Board-support layer for the Renesas EK-RA8D2 v1 evaluation kit.
ra8_err_t ra8_board_led_toggle(ra8_board_led_id_t led)
Toggle led's output state.
ra8_err_t ra8_board_led_init(ra8_board_led_id_t led)
Configure led as a digital output, initial level low (off).
@ k_ra8_board_led1
LED1, BLUE, P600 (jumper E27).
Boot entry points shared between a vector table and its startup code.
High-level Clock Generation Circuit driver.
ra8_err_t ra8_cgc_get_clock_hz(ra8_clock_id_t id, uint32_t *out_hz)
Query the current frequency of a clock-tree domain.
@ k_ra8_clock_id_cpuclk0
Cortex-M85 CPUCLK0.
ra8_err_t ra8_cgc_init(void)
Configure the clock tree to a safe default.
Error Code Definitions for ra8-firmware.
@ 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.
NVIC + ICU IELSR allocator.
void ra8_isr_globals_enable(void)
Globally enable maskable interrupts (PRIMASK = 0).
RA8 <-> Eclipse ThreadX glue: SysTick kernel-tick retuning.
@ k_ra8_threadx_tick_hz
1 kHz -> 1 ms kernel tick.
ra8_err_t ra8_threadx_systick_reload_for(uint32_t cpuclk_hz, uint32_t tick_hz, uint32_t *out_reload)
Compute the SysTick reload for a given core clock + tick rate.
ra8_err_t ra8_threadx_systick_retune(void)
Reprogram SysTick.LOAD from the live CPUCLK0 rate.
unsigned int UINT
ThreadX-compatible unsigned int (host stub).
char CHAR
ThreadX-compatible CHAR (host stub).
unsigned long ULONG
ThreadX-compatible unsigned long (host stub).
Opaque thread stand-in for the host build.