61typedef enum : uint32_t {
73typedef enum : uint8_t {
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
ra8_err_t ra8_systick_reload_for(uint32_t cpu_hz, uint32_t tick_hz, uint32_t *out_reload)
Compute the SysTick reload for a given core clock and tick rate.
ra8_systick_limit_t
Architectural range limit of the Cortex-M SysTick reload register.
@ k_ra8_systick_rvr_max
Max SYST_RVR reload (24-bit).
uint32_t ra8_systick_current_value(void)
Read the live SysTick current-value register (SYST_CVR).
ra8_err_t ra8_systick_set_reload(uint32_t reload)
Re-arm SysTick with a new reload, leaving the control bits untouched.
void ra8_dwt_cyccnt_reset(void)
Zero the DWT cycle counter (DWT_CYCCNT).
ra8_systick_clock_source_t
Selects the SysTick counter clock (SYST_CSR.CLKSOURCE).
@ k_ra8_systick_clk_external
CLKSOURCE = 0: external reference clock.
@ 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).