46typedef enum : uint16_t {
92 __asm__
volatile(
"wfi");
115 uint32_t cpuclk0_hz = 0U;
128 .internal_output_enabled =
false,
129 .enable_channel0 =
true,
130 .enable_channel1 =
false,
164 const uint16_t code = (uint16_t)(i * step);
171 const uint16_t code = (uint16_t)((i - 1U) * step);
void main(void)
Secure fallback main entry point.
dac_demo_const_t
Channel + sample-rate tunables.
@ k_dac_demo_step_ms
1 ms x 64 x 2 = 128 ms full triangle period.
@ k_dac_demo_steps
DAC demo steps.
@ k_dac_demo_max_code
DAC demo maximum code.
@ k_dac_demo_channel
DAC demo channel.
volatile uint32_t g_dac_waveform_tick
HIL liveness counter – incremented once per triangle period.
static void internal_dac_demo_panic_halt(void)
Park the processor after an unrecoverable DAC waveform failure.
static void internal_dac_demo_setup_or_halt(void)
Bring CGC + SysTick + DAC_B0 up.
static ra8_err_t internal_dac_demo_one_triangle_period(void)
Emit one full ramp-up + ramp-down cycle.
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.
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.
Full-featured 12-bit DAC_B driver.
@ k_ra8_dac_b_vref_normal
OFSSEL=0: VREFH >= 2.7V (default).
ra8_err_t ra8_dac_b_write(uint8_t channel, uint16_t value)
Programme a DAC channel with a 12-bit code.
@ k_ra8_dac_b_format_right
DPSEL=0: right-justified (default).
ra8_err_t ra8_dac_b_init_configured(const ra8_dac_b_cfg_t *cfg)
Initialise DAC_B with a full config descriptor.
Error Code Definitions for ra8-firmware.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
@ k_ra8_err_hw_error
Generic hardware fault detected (error flag set, fault interrupt).
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).
SysTick-based tick counter, delay and timestamp helpers.
ra8_err_t ra8_time_init(uint32_t cpu_hz)
Initialise SysTick for a 1 kHz tick interrupt.
void ra8_delay_ms(uint32_t ms)
Busy-wait for at least ms milliseconds.
Configuration descriptor for ra8_dac_b_init_configured.