57typedef enum : uint32_t {
62typedef enum : uint8_t {
92static void ehb_write(
const uint8_t* data, uint32_t len)
118 buf[n] = (uint8_t)
'0';
122 buf[n] = (uint8_t)((uint32_t)
'0' + (val % (uint32_t)
k_ehb_radix));
126 for (uint32_t i = 0U; i < n; i++) {
150 __asm__
volatile(
"wfi");
171 uint32_t cpuclk0_hz = 0U;
261 __asm__
volatile(
"wfi");
void main(void)
Secure fallback main entry point.
static ra8_err_t ehb_run_once(void)
Drive the ESWCLK + ESWM prerequisites, then the two ETH HAL primitives.
static const uint8_t k_ehb_msg_mstp[]
static void ehb_write_u32_line(uint32_t val)
Log one unsigned 32-bit value as decimal ASCII plus CRLF.
static const uint8_t k_ehb_msg_crlf[]
static void ehb_panic_halt(void)
Print the negative banner and park the CPU.
static const uint8_t k_ehb_msg_pass[]
static const uint8_t k_ehb_msg_fail[]
static const uint8_t k_ehb_msg_boot[]
static void ehb_write(const uint8_t *data, uint32_t len)
Write a byte span to the SCI8 console, discarding the status.
ehb_fmt_t
Decimal-serialiser fields.
@ k_ehb_radix
Decimal serialiser radix.
@ k_ehb_dec_u32_max
Max decimal digits for a uint32_t.
static const uint8_t k_ehb_msg_coma[]
static const uint8_t k_ehb_msg_rgmii[]
static const uint8_t k_ehb_msg_eswclk[]
static const uint8_t k_ehb_msg_hw_fail[]
static void ehb_setup_or_halt(void)
Bring up clocks, MSTP, SysTick and the SCI8 console; halt on failure.
ehb_const_t
Console + demo knobs (no magic numbers).
@ k_ehb_baud
SCI8 J-Link VCOM console baud.
Board-support layer for the Renesas EK-RA8D2 v1 evaluation kit.
ra8_err_t ra8_board_uart_console_write(const uint8_t *data, size_t len)
Polled blocking write to the J-Link OB VCOM console.
ra8_err_t ra8_board_uart_console_init(uint32_t baud)
Configure SCI8 + PD02/PD03 as the debug-console UART.
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.
ra8_err_t ra8_cgc_eswclk_init(void)
Bring up the Ethernet Switch Module (ESWM / RMAC) clock.
@ 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.
Ethernet Switch Module (ESWM) + frame TX/RX driver.
@ k_ra8_eth_mii_port_1
ESWM media port 1 (RMAC1 / ETHA1).
ra8_err_t ra8_eth_rgmii_select(ra8_eth_mii_port_t port)
Select RGMII on a port's ESWM media-interface mux and enable it.
Ethernet Common Agent (COMA) driver.
ra8_err_t ra8_eth_coma_bringup(void)
Bring the COMA switch out of reset, init the buffer pool, and fan every per-agent clock out.
NVIC + ICU IELSR allocator.
void ra8_isr_globals_enable(void)
Globally enable maskable interrupts (PRIMASK = 0).
Ref-counted Module Stop Control wrapper for the RA8D2.
ra8_err_t ra8_mstp_enable(ra8_mstp_t id)
Reference-counted "ungate this peripheral" request.
ra8_err_t ra8_mstp_init(void)
Re-establish the ra8_mstp ref-count table from current hardware state.
Module Stop Control (MSTP) register layout for the Renesas RA8D2.
@ k_ra8_mstp_eswm
MSTPC30 ESWM.
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.