51typedef enum : uint32_t {
57typedef enum : uint16_t {
86 __asm__
volatile(
"wfi");
109 uint32_t cpuclk0_hz = 0U;
209 __asm__
volatile(
"wfi");
void main(void)
Secure fallback main entry point.
static const uint8_t s_eth_loopback_boot_msg[]
eth_loopback_const_t
Demo tunables.
@ k_eth_loopback_baud
Ethernet loopback baud.
@ k_eth_loopback_burst_count
Ethernet loopback burst count.
static ra8_err_t internal_eth_loopback_run_once(ra8_etha_port_stats_t *out)
Bring port 0 through the ETHA loopback bring-up sequence.
static const uint8_t s_eth_loopback_log_msg[]
Fixed UART diagnostics for boot and successful ETHA loopback.
eth_loopback_ring_t
Descriptor-ring sizing.
@ k_eth_loopback_buffer_size
Ethernet loopback buffer size.
@ k_eth_loopback_ring_rx
Ethernet loopback ring RX.
@ k_eth_loopback_ring_tx
Ethernet loopback ring TX.
static void internal_eth_loopback_setup_or_halt(void)
Initialize clocks, module-stop control, timekeeping, and console.
static void internal_eth_loopback_panic_halt(void)
Park the processor after an unrecoverable ETHA demo failure.
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_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.
@ 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.
Per-port Ethernet Agent (ETHA) driver – HUM Ch 32 (p 1627-1702).
ra8_err_t ra8_etha_deinit(ra8_etha_port_t port)
Tear down an ETHA port (drop into RESET, mask all IRQs).
ra8_err_t ra8_etha_set_mode(ra8_etha_port_t port, ra8_etha_opc_t mode)
Issue an explicit EAMC mode-change command.
ra8_err_t ra8_etha_init(ra8_etha_port_t port, const ra8_etha_config_t *cfg)
Initialise an ETHA port (MSTP gate + reset registers + initial mode).
@ k_ra8_etha_port_0
ETHA port 0 (base 0x403C_A000).
@ k_ra8_etha_opc_operation
Enter OPERATION mode.
@ k_ra8_etha_opc_config
Enter CONFIG mode.
ra8_err_t ra8_etha_account_traffic(ra8_etha_port_t channel, uint32_t tx_ok, uint32_t tx_err, uint32_t rx_ok, uint32_t rx_err, uint32_t rx_drop)
Increment the per-port TX OK / TX err / RX OK / RX err / drop counters.
ra8_err_t ra8_etha_descriptor_ring_init(ra8_etha_port_t channel, uint16_t num_tx, uint16_t num_rx, uint16_t buffer_size)
Configure the per-port descriptor-ring sizing.
ra8_err_t ra8_etha_get_stats(ra8_etha_port_t channel, ra8_etha_port_stats_t *out_stats)
Snapshot the per-port software-maintained traffic counters.
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_init(void)
Re-establish the ra8_mstp ref-count table from current hardware state.
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.
Per-port ETHA configuration knobs.
Per-port runtime traffic counters maintained by ra8_etha.