69typedef enum : uint8_t {
ra8_err_t ra8_cgc_eswclk_hz(uint32_t *out_hz)
Query the current ESWCLK (Ethernet Switch clock) frequency.
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_pll2_enable(uint8_t mul_int, uint8_t mul_quarters, ra8_plodiv_t p_div_code)
Bring up PLL2 with caller-supplied multiplier and P divider.
void ra8_cgc_fake_trigger_stop_detection(void)
Test helper: invoke the registered OSTD callback.
ra8_err_t ra8_cgc_disable_stop_detection(void)
Disable oscillation-stop detection.
ra8_err_t ra8_cgc_use_hoco(void)
Switch the system clock source to HOCO (20 MHz).
ra8_err_t ra8_cgc_eswclk_init(void)
Bring up the Ethernet Switch Module (ESWM / RMAC) clock.
ra8_clock_id_t
Identifiers for the clock-tree frequencies queryable at runtime.
@ k_ra8_clock_id_pclkc
PCLKC.
@ k_ra8_clock_id_fclk
Flash/MRAM interface clock.
@ k_ra8_clock_id_cpuclk1
Cortex-M33 CPUCLK1.
@ k_ra8_clock_id_pclkd
PCLKD.
@ k_ra8_clock_id_pclkb
PCLKB.
@ k_ra8_clock_id_pclke
PCLKE.
@ k_ra8_clock_id_cpuclk0
Cortex-M85 CPUCLK0.
@ k_ra8_clock_id_mriclk
MRAM bus clock.
@ k_ra8_clock_id_pclka
PCLKA.
@ k_ra8_clock_id_iclk
System ICLK.
void(* ra8_cgc_ostd_fn_t)(void *ctx)
Oscillation-stop-detection callback.
ra8_err_t ra8_cgc_enable_stop_detection(ra8_cgc_ostd_fn_t handler, void *ctx)
Enable oscillation-stop detection on the main crystal.
ra8_err_t ra8_cgc_init(void)
Configure the clock tree to a safe default.
ra8_err_t ra8_cgc_usbfs_clock_enable(void)
Bring up the USB-FS module clock (USBCKCR / USBCKDIVCR).
ra8_err_t ra8_cgc_usbhs_pll_enable(void)
Bring up the USBHS PHY reference clock + module clock.
ra8_err_t ra8_cgc_switch_pll1_target(uint32_t new_cpuclk_hz)
Retune PLL1 to a new CPUCLK0 target without a full deinit.
Clock Generation Circuit (CGC) field layouts for the Renesas RA8D2.
ra8_plodiv_t
PLL output divider codes for PLODIVP/Q/R fields in PLLCCR2.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.