139typedef enum : uint8_t {
159typedef enum : uint8_t {
175typedef enum : uint8_t {
201typedef 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.
void(* ra8_vreg_event_fn_t)(void *ctx, uint8_t status_word)
Voltage-regulator fault callback.
ra8_err_t ra8_vreg_get_status(ra8_vreg_status_t *out)
Read the regulator status into a caller-supplied snapshot.
ra8_err_t ra8_vreg_set_ldo_boost(bool enable)
Enable / disable the LDO charge-pump boost.
ra8_err_t ra8_vreg_init(const ra8_vreg_cfg_t *cfg)
Initialise the internal voltage regulator from a config descriptor.
ra8_err_t ra8_vreg_set_mode(ra8_vreg_mode_t mode)
Switch between LDO and DCDC at runtime.
void ra8_vreg_dispatch(void)
Fire the registered fault callback with the current DCDCCTL value.
ra8_err_t ra8_vreg_set_lv_profile(ra8_vreg_lv_profile_t profile)
Select a low-voltage operation profile.
ra8_err_t ra8_vreg_clear_status(uint8_t mask)
Clear the bits in DCDCCTL named by mask.
ra8_vreg_lv_profile_t
Low-voltage operation profile (LVOCR).
@ k_ra8_vreg_lv_off
Both LVO0E and LVO1E cleared (full-speed).
@ k_ra8_vreg_lv_p1
LVO1E set, LVO0E cleared.
@ k_ra8_vreg_lv_p0
LVO0E set, LVO1E cleared.
ra8_vreg_ocp_t
DCDC over-current protection threshold programming.
@ k_ra8_vreg_ocp_off
OCPEN cleared.
@ k_ra8_vreg_ocp_low
OCPEN set; reserved for future use.
@ k_ra8_vreg_ocp_normal
OCPEN set; default threshold.
@ k_ra8_vreg_ocp_high
OCPEN set; reserved for future use.
ra8_err_t ra8_vreg_exit_stop(void)
Legacy alias for ra8_vreg_exit_standby().
ra8_err_t ra8_vreg_enter_standby(ra8_vreg_standby_t variant)
Park the regulator for one of the Software Standby variants.
ra8_vreg_standby_t
Software Standby variant the caller intends to enter next.
@ k_ra8_vreg_standby_deep_software1
Deep Software Standby mode 1.
@ k_ra8_vreg_standby_software
Software Standby mode.
@ k_ra8_vreg_standby_battery_backup
Battery Backup wake source.
@ k_ra8_vreg_standby_deep_software3
Deep Software Standby mode 3.
@ k_ra8_vreg_standby_deep_software2
Deep Software Standby mode 2.
ra8_err_t ra8_vreg_exit_standby(void)
Restore the regulator after Software Standby exit.
ra8_err_t ra8_vreg_deinit(void)
Tear down the regulator – return DCDCCTL/VCCSEL/LVOCR to reset state.
ra8_err_t ra8_vreg_set_vccsel(ra8_vreg_vccsel_t sel)
Set the DCDC supply-voltage-range select.
ra8_err_t ra8_vreg_enter_stop(void)
Legacy alias for ra8_vreg_enter_standby(k_ra8_vreg_standby_software).
ra8_err_t ra8_vreg_attach_handler(ra8_vreg_event_fn_t fn, void *ctx)
Attach a fault callback (LVD / over-current dispatch hook).
ra8_err_t ra8_vreg_set_ocp(ra8_vreg_ocp_t level)
Program the DCDC over-current-protection level.
ra8_err_t ra8_vreg_reset(void)
Reset the regulator to its OFS-byte default state.
ra8_err_t ra8_vreg_set_fast_startup(bool enable)
Enable / disable the DCDC fast-startup sequence.
ra8_vreg_mode_t
Runtime regulator mode selection (DCDCCTL.DCDCON).
@ k_ra8_vreg_mode_dcdc
Switching regulator (DCDC).
@ k_ra8_vreg_mode_ldo
Low-dropout linear regulator (default at reset).
Internal Voltage Regulator (VREG / DCDC / LDO) register layout for RA8D2.
ra8_vreg_vccsel_t
VCCSEL[1:0] supply-voltage range selection (DCDC mode only).
Configuration descriptor for ra8_vreg_init.
ra8_vreg_mode_t mode
Initial regulator mode.
bool ldo_boost
Enable LDO charge-pump boost (DCDCCTL.LCBOOST).
ra8_vreg_ocp_t ocp
OCP threshold (DCDC mode only).
ra8_vreg_vccsel_t vccsel
Supply-voltage range (used only in DCDC mode).
ra8_vreg_lv_profile_t lv_profile
Low-voltage operation profile (LVOCR).
bool fast_startup
Use fast-startup sequence (DCDCCTL.FST).
Snapshot of the regulator state.
ra8_vreg_mode_t mode
Decoded mode (LDO / DCDC).
bool dcdc_ready
True when DCDCON=1 and PD=0.
bool ldo_boost
True when DCDCCTL.LCBOOST is set.
ra8_vreg_lv_profile_t lv_profile
Decoded LVOCR profile.
ra8_vreg_vccsel_t vccsel_dec
Decoded VCCSEL.
uint8_t lvocr
Raw LVOCR value.
ra8_vreg_ocp_t ocp
Decoded OCP setting.
bool fast_startup
True when DCDCCTL.FST is set.
uint8_t dcdcctl
Raw DCDCCTL value.
bool io_buf_on
True when DCDCCTL.STOPZA is set.
uint8_t vccsel
Raw VCCSEL value.