![]() |
nrfx 4.5.0
|
Hardware access layer for managing the REGULATORS peripheral. More...
Data Structures | |
| struct | nrf_regulators_pof_config_t |
| POF Comparator configuration structure. More... | |
Enumerations | |
| enum | nrf_regulators_vreg_t { NRF_REGULATORS_VREG_MAIN , NRF_REGULATORS_VREG_HIGH , NRF_REGULATORS_VREG_MEDIUM , NRF_REGULATORS_VREG_RADIO } |
| Voltage regulators. More... | |
| enum | nrf_regulators_pof_thr_t { NRF_REGULATORS_POF_THR_0V9 = REGULATORS_POFCON_THRESHOLD_V090 , NRF_REGULATORS_POF_THR_0V95 = REGULATORS_POFCON_THRESHOLD_V095 , NRF_REGULATORS_POF_THR_1V0 = REGULATORS_POFCON_THRESHOLD_V100 , NRF_REGULATORS_POF_THR_1V05 = REGULATORS_POFCON_THRESHOLD_V105 , NRF_REGULATORS_POF_THR_1V1 = REGULATORS_POFCON_THRESHOLD_V110 , NRF_REGULATORS_POF_THR_1V15 = REGULATORS_POFCON_THRESHOLD_V115 , NRF_REGULATORS_POF_THR_1V2 = REGULATORS_POFCON_THRESHOLD_V120 , NRF_REGULATORS_POF_THR_1V25 = REGULATORS_POFCON_THRESHOLD_V125 , NRF_REGULATORS_POF_THR_1V3 = REGULATORS_POFCON_THRESHOLD_V130 , NRF_REGULATORS_POF_THR_1V35 = REGULATORS_POFCON_THRESHOLD_V135 , NRF_REGULATORS_POF_THR_1V4 = REGULATORS_POFCON_THRESHOLD_V140 , NRF_REGULATORS_POF_THR_1V45 = REGULATORS_POFCON_THRESHOLD_V145 , NRF_REGULATORS_POF_THR_1V5 = REGULATORS_POFCON_THRESHOLD_V150 , NRF_REGULATORS_POF_THR_1V55 = REGULATORS_POFCON_THRESHOLD_V155 , NRF_REGULATORS_POF_THR_1V6 = REGULATORS_POFCON_THRESHOLD_V160 , NRF_REGULATORS_POF_THR_1V65 = REGULATORS_POFCON_THRESHOLD_V165 , NRF_REGULATORS_POF_THR_1V7 = REGULATORS_POFCON_THRESHOLD_V17 , NRF_REGULATORS_POF_THR_1V8 = REGULATORS_POFCON_THRESHOLD_V18 , NRF_REGULATORS_POF_THR_1V9 = REGULATORS_POFCON_THRESHOLD_V19 , NRF_REGULATORS_POF_THR_2V0 = REGULATORS_POFCON_THRESHOLD_V20 , NRF_REGULATORS_POF_THR_2V1 = REGULATORS_POFCON_THRESHOLD_V21 , NRF_REGULATORS_POF_THR_2V2 = REGULATORS_POFCON_THRESHOLD_V22 , NRF_REGULATORS_POF_THR_2V3 = REGULATORS_POFCON_THRESHOLD_V23 , NRF_REGULATORS_POF_THR_2V4 = REGULATORS_POFCON_THRESHOLD_V24 , NRF_REGULATORS_POF_THR_2V5 = REGULATORS_POFCON_THRESHOLD_V25 , NRF_REGULATORS_POF_THR_2V6 = REGULATORS_POFCON_THRESHOLD_V26 , NRF_REGULATORS_POF_THR_2V7 = REGULATORS_POFCON_THRESHOLD_V27 , NRF_REGULATORS_POF_THR_2V8 = REGULATORS_POFCON_THRESHOLD_V28 } |
| POF Comparator thresholds. More... | |
| enum | nrf_regulators_pof_thr_vddh_t { NRF_REGULATORS_POF_THR_VDDH_2V7 = REGULATORS_POFCON_THRESHOLDVDDH_V27 , NRF_REGULATORS_POF_THR_VDDH_2V8 = REGULATORS_POFCON_THRESHOLDVDDH_V28 , NRF_REGULATORS_POF_THR_VDDH_2V9 = REGULATORS_POFCON_THRESHOLDVDDH_V29 , NRF_REGULATORS_POF_THR_VDDH_3V0 = REGULATORS_POFCON_THRESHOLDVDDH_V30 , NRF_REGULATORS_POF_THR_VDDH_3V1 = REGULATORS_POFCON_THRESHOLDVDDH_V31 , NRF_REGULATORS_POF_THR_VDDH_3V2 = REGULATORS_POFCON_THRESHOLDVDDH_V32 , NRF_REGULATORS_POF_THR_VDDH_3V3 = REGULATORS_POFCON_THRESHOLDVDDH_V33 , NRF_REGULATORS_POF_THR_VDDH_3V4 = REGULATORS_POFCON_THRESHOLDVDDH_V34 , NRF_REGULATORS_POF_THR_VDDH_3V5 = REGULATORS_POFCON_THRESHOLDVDDH_V35 , NRF_REGULATORS_POF_THR_VDDH_3V6 = REGULATORS_POFCON_THRESHOLDVDDH_V36 , NRF_REGULATORS_POF_THR_VDDH_3V7 = REGULATORS_POFCON_THRESHOLDVDDH_V37 , NRF_REGULATORS_POF_THR_VDDH_3V8 = REGULATORS_POFCON_THRESHOLDVDDH_V38 , NRF_REGULATORS_POF_THR_VDDH_3V9 = REGULATORS_POFCON_THRESHOLDVDDH_V39 , NRF_REGULATORS_POF_THR_VDDH_4V0 = REGULATORS_POFCON_THRESHOLDVDDH_V40 , NRF_REGULATORS_POF_THR_VDDH_4V1 = REGULATORS_POFCON_THRESHOLDVDDH_V41 , NRF_REGULATORS_POF_THR_VDDH_4V2 = REGULATORS_POFCON_THRESHOLDVDDH_V42 } |
| POF Comparator thresholds for VDDH. More... | |
| enum | nrf_regulators_elv_mode_allow_mask_t { NRF_REGULATORS_ELV_MODE_ALLOW_MASK_EXT } |
| Components allowed to introduce ELV mode. More... | |
| enum | nrf_regulators_main_status_t { NRF_REGULATORS_MAIN_STATUS_NORMAL = REGULATORS_MAINREGSTATUS_VREGH_Inactive , NRF_REGULATORS_MAIN_STATUS_HIGH = REGULATORS_MAINREGSTATUS_VREGH_Active } |
| Main supply status. More... | |
Functions | |
| NRF_STATIC_INLINE void | nrf_regulators_vreg_enable_set (NRF_REGULATORS_Type *p_reg, nrf_regulators_vreg_t regulator, bool enable) |
| Function for enabling or disabling the specified voltage regulator. | |
| NRF_STATIC_INLINE bool | nrf_regulators_vreg_enable_check (NRF_REGULATORS_Type const *p_reg, nrf_regulators_vreg_t regulator) |
| Function for checking whether the specified voltage regulator is enabled. | |
| NRF_STATIC_INLINE void | nrf_regulators_system_off (NRF_REGULATORS_Type *p_reg) |
| Function for putting the CPU in System OFF mode. | |
| NRF_STATIC_INLINE nrf_regulators_main_status_t | nrf_regulators_main_status_get (NRF_REGULATORS_Type const *p_reg) |
| Function for getting the main supply status. | |
| NRF_STATIC_INLINE void | nrf_regulators_pof_config_set (NRF_REGULATORS_Type *p_reg, nrf_regulators_pof_config_t const *p_config) |
| Function for setting the POF Comparator configuration. | |
| NRF_STATIC_INLINE void | nrf_regulators_pof_config_get (NRF_REGULATORS_Type const *p_reg, nrf_regulators_pof_config_t *p_config) |
| Function for getting the POF Comparator configuration. | |
| NRF_STATIC_INLINE bool | nrf_regulators_pof_below_thr_check (NRF_REGULATORS_Type const *p_reg) |
| Function for checking if the detected voltage is below or above the threshold of VPOF (POF Comparator's threshold voltage). | |
| NRF_STATIC_INLINE void | nrf_regulators_elv_mode_allow_set (NRF_REGULATORS_Type *p_reg, uint32_t mask) |
| Function for setting components that are allowed to introduce the ELV mode. | |
| NRF_STATIC_INLINE uint32_t | nrf_regulators_elv_mode_allow_get (NRF_REGULATORS_Type const *p_reg) |
| Function for geting components that are allowed to introduce the ELV mode. | |
| NRF_STATIC_INLINE bool | nrf_regulators_inductor_check (NRF_REGULATORS_Type const *p_reg) |
| Function for checking whether an inductor is connected to the DCC pin. | |
| NRF_STATIC_INLINE void | nrf_regulators_system_hibernate (NRF_REGULATORS_Type *p_reg) |
| Function for putting the CPU in hibernation mode. | |
| NRF_STATIC_INLINE void | nrf_regulators_gpio_retention_release_set (NRF_REGULATORS_Type *p_reg, bool enable) |
| Function for enabling or disabling the GPIO retention release on wake up from hibernation mode. | |
| NRF_STATIC_INLINE bool | nrf_regulators_gpio_retention_check (NRF_REGULATORS_Type const *p_reg) |
| Function for checking the GPIO retention status. | |
Hardware access layer for managing the REGULATORS peripheral.
POF Comparator thresholds.
POF Comparator thresholds for VDDH.
| NRF_STATIC_INLINE uint32_t nrf_regulators_elv_mode_allow_get | ( | NRF_REGULATORS_Type const * | p_reg | ) |
Function for geting components that are allowed to introduce the ELV mode.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE void nrf_regulators_elv_mode_allow_set | ( | NRF_REGULATORS_Type * | p_reg, |
| uint32_t | mask ) |
Function for setting components that are allowed to introduce the ELV mode.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of components to be set, created using nrf_regulators_elv_mode_allow_mask_t. |
| NRF_STATIC_INLINE bool nrf_regulators_gpio_retention_check | ( | NRF_REGULATORS_Type const * | p_reg | ) |
Function for checking the GPIO retention status.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | GPIO retention is active. |
| false | GPIO retention is not active. |
| NRF_STATIC_INLINE void nrf_regulators_gpio_retention_release_set | ( | NRF_REGULATORS_Type * | p_reg, |
| bool | enable ) |
Function for enabling or disabling the GPIO retention release on wake up from hibernation mode.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | enable | True if GPIO retention release is to be enabled, false otherwise. |
| NRF_STATIC_INLINE bool nrf_regulators_inductor_check | ( | NRF_REGULATORS_Type const * | p_reg | ) |
Function for checking whether an inductor is connected to the DCC pin.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | Inductor detected. |
| false | Inductor not detected. |
| NRF_STATIC_INLINE nrf_regulators_main_status_t nrf_regulators_main_status_get | ( | NRF_REGULATORS_Type const * | p_reg | ) |
Function for getting the main supply status.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE bool nrf_regulators_pof_below_thr_check | ( | NRF_REGULATORS_Type const * | p_reg | ) |
Function for checking if the detected voltage is below or above the threshold of VPOF (POF Comparator's threshold voltage).
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | Voltage below VPOF threshold has been detected. |
| false | Voltage above VPOF threshold has been detected. |
| NRF_STATIC_INLINE void nrf_regulators_pof_config_get | ( | NRF_REGULATORS_Type const * | p_reg, |
| nrf_regulators_pof_config_t * | p_config ) |
Function for getting the POF Comparator configuration.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [out] | p_config | Pointer to the structure to be filled with POF Comparator configuration. |
| NRF_STATIC_INLINE void nrf_regulators_pof_config_set | ( | NRF_REGULATORS_Type * | p_reg, |
| nrf_regulators_pof_config_t const * | p_config ) |
Function for setting the POF Comparator configuration.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_config | Pointer to the structure containing POF Comparator configuration. |
| NRF_STATIC_INLINE void nrf_regulators_system_hibernate | ( | NRF_REGULATORS_Type * | p_reg | ) |
Function for putting the CPU in hibernation mode.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE void nrf_regulators_system_off | ( | NRF_REGULATORS_Type * | p_reg | ) |
Function for putting the CPU in System OFF mode.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE bool nrf_regulators_vreg_enable_check | ( | NRF_REGULATORS_Type const * | p_reg, |
| nrf_regulators_vreg_t | regulator ) |
Function for checking whether the specified voltage regulator is enabled.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | regulator | Regulator to be checked. |
| true | Specified voltage regulator is enabled. |
| false | Specified voltage regulator is disabled. |
| NRF_STATIC_INLINE void nrf_regulators_vreg_enable_set | ( | NRF_REGULATORS_Type * | p_reg, |
| nrf_regulators_vreg_t | regulator, | ||
| bool | enable ) |
Function for enabling or disabling the specified voltage regulator.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | regulator | Regulator to be enabled or disabled. |
| [in] | enable | True if specified voltage regulator is to be enabled, false otherwise. |