![]() |
nrfx 4.5.0
|
Hardware access layer for managing the POWER peripheral. More...
Data Structures | |
| struct | nrf_power_abb_config_t |
| POWER operating point for ABB domain structure. More... | |
Enumerations | |
| enum | nrf_power_task_t { NRF_POWER_TASK_CONSTLAT = offsetof(NRF_POWER_Type, TASKS_CONSTLAT) , NRF_POWER_TASK_LOWPWR = offsetof(NRF_POWER_Type, TASKS_LOWPWR) , NRF_POWER_TASK_SEMAPHORE_ACQUIRE = offsetof(NRF_POWER_Type, TASKS_SEMAPHORE.ACQUIRE) , NRF_POWER_TASK_SEMAPHORE_RELEASE = offsetof(NRF_POWER_Type, TASKS_SEMAPHORE.RELEASE) , NRF_POWER_TASK_REGULATOR_UPDATE = offsetof(NRF_POWER_Type, TASKS_REGUPDATE) } |
| POWER tasks. More... | |
| enum | nrf_power_event_t { NRF_POWER_EVENT_POFWARN = offsetof(NRF_POWER_Type, EVENTS_POFWARN) , NRF_POWER_EVENT_SLEEPENTER = offsetof(NRF_POWER_Type, EVENTS_SLEEPENTER) , NRF_POWER_EVENT_SLEEPEXIT = offsetof(NRF_POWER_Type, EVENTS_SLEEPEXIT) , NRF_POWER_EVENT_USBDETECTED = offsetof(NRF_POWER_Type, EVENTS_USBDETECTED) , NRF_POWER_EVENT_USBREMOVED = offsetof(NRF_POWER_Type, EVENTS_USBREMOVED) , NRF_POWER_EVENT_USBPWRRDY = offsetof(NRF_POWER_Type, EVENTS_USBPWRRDY) , NRF_POWER_EVENT_SEMAPHORE_ACQUIRED = offsetof(NRF_POWER_Type, EVENTS_SEMAPHORE.ACQUIRED) , NRF_POWER_EVENT_SEMAPHORE_RELEASED = offsetof(NRF_POWER_Type, EVENTS_SEMAPHORE.RELEASED) , NRF_POWER_EVENT_REGULATOR_UPDATED = offsetof(NRF_POWER_Type, EVENTS_REGUPDATED) , NRF_POWER_EVENT_ABB_LOCK_0 = offsetof(NRF_POWER_Type, EVENTS_ABBLOCK[0]) , NRF_POWER_EVENT_ABB_LOCK_1 = offsetof(NRF_POWER_Type, EVENTS_ABBLOCK[1]) } |
| POWER events. More... | |
| enum | nrf_power_int_mask_t { NRF_POWER_INT_POFWARN_MASK = POWER_INTENSET_POFWARN_Msk , NRF_POWER_INT_SLEEPENTER_MASK = POWER_INTENSET_SLEEPENTER_Msk , NRF_POWER_INT_SLEEPEXIT_MASK = POWER_INTENSET_SLEEPEXIT_Msk , NRF_POWER_INT_USBDETECTED_MASK = POWER_INTENSET_USBDETECTED_Msk , NRF_POWER_INT_USBREMOVED_MASK = POWER_INTENSET_USBREMOVED_Msk , NRF_POWER_INT_USBPWRRDY_MASK = POWER_INTENSET_USBPWRRDY_Msk , NRF_POWER_INT_SEMAPHORE_ACQUIRED = POWER_INTEN_SEMAPHOREACQUIRED_Msk , NRF_POWER_INT_SEMAPHORE_RELEASED = POWER_INTEN_SEMAPHORERELEASED_Msk , NRF_POWER_INT_REGULATOR_UPDATED = POWER_INTEN_REGUPDATED_Msk , NRF_POWER_INT_ABB_LOCK_0 = POWER_INTEN_ABBLOCK0_Msk , NRF_POWER_INT_ABB_LOCK_1 = POWER_INTEN_ABBLOCK1_Msk } |
| POWER interrupts. More... | |
| enum | nrf_power_resetreas_mask_t { NRF_POWER_RESETREAS_RESETPIN_MASK = POWER_RESETREAS_RESETPIN_Msk , NRF_POWER_RESETREAS_DOG_MASK = POWER_RESETREAS_DOG_Msk , NRF_POWER_RESETREAS_SREQ_MASK = POWER_RESETREAS_SREQ_Msk , NRF_POWER_RESETREAS_LOCKUP_MASK = POWER_RESETREAS_LOCKUP_Msk , NRF_POWER_RESETREAS_OFF_MASK = POWER_RESETREAS_OFF_Msk , NRF_POWER_RESETREAS_LPCOMP_MASK = POWER_RESETREAS_LPCOMP_Msk , NRF_POWER_RESETREAS_DIF_MASK = POWER_RESETREAS_DIF_Msk , NRF_POWER_RESETREAS_NFC_MASK = POWER_RESETREAS_NFC_Msk , NRF_POWER_RESETREAS_VBUS_MASK = POWER_RESETREAS_VBUS_Msk , NRF_POWER_RESETREAS_CTRLAP_MASK = POWER_RESETREAS_CTRLAP_Msk } |
| Reset reason. More... | |
| enum | nrf_power_usbregstatus_mask_t { NRF_POWER_USBREGSTATUS_VBUSDETECT_MASK = POWER_USBREGSTATUS_VBUSDETECT_Msk , NRF_POWER_USBREGSTATUS_OUTPUTRDY_MASK = POWER_USBREGSTATUS_OUTPUTRDY_Msk } |
| USBREGSTATUS register bit masks. More... | |
| enum | nrf_power_ramblock_t { NRF_POWER_RAMBLOCK0 = POWER_RAMSTATUS_RAMBLOCK0_Pos , NRF_POWER_RAMBLOCK1 = POWER_RAMSTATUS_RAMBLOCK1_Pos , NRF_POWER_RAMBLOCK2 = POWER_RAMSTATUS_RAMBLOCK2_Pos , NRF_POWER_RAMBLOCK3 = POWER_RAMSTATUS_RAMBLOCK3_Pos } |
| Numbers of RAM blocks. More... | |
| enum | nrf_power_ramblock_mask_t { NRF_POWER_RAMBLOCK0_MASK = POWER_RAMSTATUS_RAMBLOCK0_Msk , NRF_POWER_RAMBLOCK1_MASK = POWER_RAMSTATUS_RAMBLOCK1_Msk , NRF_POWER_RAMBLOCK2_MASK = POWER_RAMSTATUS_RAMBLOCK2_Msk , NRF_POWER_RAMBLOCK3_MASK = POWER_RAMSTATUS_RAMBLOCK3_Msk } |
| Masks of RAM blocks. More... | |
| enum | nrf_power_onoffram_t { NRF_POWER_ONRAM0 , NRF_POWER_OFFRAM0 , NRF_POWER_ONRAM1 , NRF_POWER_OFFRAM1 , NRF_POWER_ONRAM2 , NRF_POWER_OFFRAM2 , NRF_POWER_ONRAM3 , NRF_POWER_OFFRAM3 } |
| RAM power state position of the bits. More... | |
| enum | nrf_power_onoffram_mask_t { NRF_POWER_ONRAM0_MASK = 1U << NRF_POWER_ONRAM0 , NRF_POWER_OFFRAM0_MASK = 1U << NRF_POWER_OFFRAM0 , NRF_POWER_ONRAM1_MASK = 1U << NRF_POWER_ONRAM1 , NRF_POWER_OFFRAM1_MASK = 1U << NRF_POWER_OFFRAM1 , NRF_POWER_ONRAM2_MASK = 1U << NRF_POWER_ONRAM2 , NRF_POWER_OFFRAM2_MASK = 1U << NRF_POWER_OFFRAM2 , NRF_POWER_ONRAM3_MASK = 1U << NRF_POWER_ONRAM3 , NRF_POWER_OFFRAM3_MASK = 1U << NRF_POWER_OFFRAM3 } |
| RAM power state bit masks. More... | |
| enum | nrf_power_pof_thr_t { NRF_POWER_POFTHR_V21 = POWER_POFCON_THRESHOLD_V21 , NRF_POWER_POFTHR_V23 = POWER_POFCON_THRESHOLD_V23 , NRF_POWER_POFTHR_V25 = POWER_POFCON_THRESHOLD_V25 , NRF_POWER_POFTHR_V27 = POWER_POFCON_THRESHOLD_V27 , NRF_POWER_POFTHR_V17 = POWER_POFCON_THRESHOLD_V17 , NRF_POWER_POFTHR_V18 = POWER_POFCON_THRESHOLD_V18 , NRF_POWER_POFTHR_V19 = POWER_POFCON_THRESHOLD_V19 , NRF_POWER_POFTHR_V20 = POWER_POFCON_THRESHOLD_V20 , NRF_POWER_POFTHR_V22 = POWER_POFCON_THRESHOLD_V22 , NRF_POWER_POFTHR_V24 = POWER_POFCON_THRESHOLD_V24 , NRF_POWER_POFTHR_V26 = POWER_POFCON_THRESHOLD_V26 , NRF_POWER_POFTHR_V28 = POWER_POFCON_THRESHOLD_V28 } |
| Power failure comparator thresholds. More... | |
| enum | nrf_power_pof_thrvddh_t { NRF_POWER_POFTHRVDDH_V27 = POWER_POFCON_THRESHOLDVDDH_V27 , NRF_POWER_POFTHRVDDH_V28 = POWER_POFCON_THRESHOLDVDDH_V28 , NRF_POWER_POFTHRVDDH_V29 = POWER_POFCON_THRESHOLDVDDH_V29 , NRF_POWER_POFTHRVDDH_V30 = POWER_POFCON_THRESHOLDVDDH_V30 , NRF_POWER_POFTHRVDDH_V31 = POWER_POFCON_THRESHOLDVDDH_V31 , NRF_POWER_POFTHRVDDH_V32 = POWER_POFCON_THRESHOLDVDDH_V32 , NRF_POWER_POFTHRVDDH_V33 = POWER_POFCON_THRESHOLDVDDH_V33 , NRF_POWER_POFTHRVDDH_V34 = POWER_POFCON_THRESHOLDVDDH_V34 , NRF_POWER_POFTHRVDDH_V35 = POWER_POFCON_THRESHOLDVDDH_V35 , NRF_POWER_POFTHRVDDH_V36 = POWER_POFCON_THRESHOLDVDDH_V36 , NRF_POWER_POFTHRVDDH_V37 = POWER_POFCON_THRESHOLDVDDH_V37 , NRF_POWER_POFTHRVDDH_V38 = POWER_POFCON_THRESHOLDVDDH_V38 , NRF_POWER_POFTHRVDDH_V39 = POWER_POFCON_THRESHOLDVDDH_V39 , NRF_POWER_POFTHRVDDH_V40 = POWER_POFCON_THRESHOLDVDDH_V40 , NRF_POWER_POFTHRVDDH_V41 = POWER_POFCON_THRESHOLDVDDH_V41 , NRF_POWER_POFTHRVDDH_V42 = POWER_POFCON_THRESHOLDVDDH_V42 } |
| Power failure comparator thresholds for VDDH. More... | |
| enum | nrf_power_mainregstatus_t { NRF_POWER_MAINREGSTATUS_NORMAL = POWER_MAINREGSTATUS_MAINREGSTATUS_Normal , NRF_POWER_MAINREGSTATUS_HIGH = POWER_MAINREGSTATUS_MAINREGSTATUS_High } |
| Main regulator status. More... | |
| enum | nrf_power_rampower_mask_t { NRF_POWER_RAMPOWER_S0POWER_MASK = POWER_RAM_POWER_S0POWER_Msk , NRF_POWER_RAMPOWER_S1POWER_MASK = POWER_RAM_POWER_S1POWER_Msk , NRF_POWER_RAMPOWER_S2POWER_MASK = POWER_RAM_POWER_S2POWER_Msk , NRF_POWER_RAMPOWER_S3POWER_MASK = POWER_RAM_POWER_S3POWER_Msk , NRF_POWER_RAMPOWER_S4POWER_MASK = POWER_RAM_POWER_S4POWER_Msk , NRF_POWER_RAMPOWER_S5POWER_MASK = POWER_RAM_POWER_S5POWER_Msk , NRF_POWER_RAMPOWER_S6POWER_MASK = POWER_RAM_POWER_S6POWER_Msk , NRF_POWER_RAMPOWER_S7POWER_MASK = POWER_RAM_POWER_S7POWER_Msk , NRF_POWER_RAMPOWER_S8POWER_MASK = POWER_RAM_POWER_S8POWER_Msk , NRF_POWER_RAMPOWER_S9POWER_MASK = POWER_RAM_POWER_S9POWER_Msk , NRF_POWER_RAMPOWER_S10POWER_MASK = POWER_RAM_POWER_S10POWER_Msk , NRF_POWER_RAMPOWER_S11POWER_MASK = POWER_RAM_POWER_S11POWER_Msk , NRF_POWER_RAMPOWER_S12POWER_MASK = POWER_RAM_POWER_S12POWER_Msk , NRF_POWER_RAMPOWER_S13POWER_MASK = POWER_RAM_POWER_S13POWER_Msk , NRF_POWER_RAMPOWER_S14POWER_MASK = POWER_RAM_POWER_S14POWER_Msk , NRF_POWER_RAMPOWER_S15POWER_MASK = POWER_RAM_POWER_S15POWER_Msk , NRF_POWER_RAMPOWER_S0RETENTION_MASK = POWER_RAM_POWER_S0RETENTION_Msk , NRF_POWER_RAMPOWER_S1RETENTION_MASK = POWER_RAM_POWER_S1RETENTION_Msk , NRF_POWER_RAMPOWER_S2RETENTION_MASK = POWER_RAM_POWER_S2RETENTION_Msk , NRF_POWER_RAMPOWER_S3RETENTION_MASK = POWER_RAM_POWER_S3RETENTION_Msk , NRF_POWER_RAMPOWER_S4RETENTION_MASK = POWER_RAM_POWER_S4RETENTION_Msk , NRF_POWER_RAMPOWER_S5RETENTION_MASK = POWER_RAM_POWER_S5RETENTION_Msk , NRF_POWER_RAMPOWER_S6RETENTION_MASK = POWER_RAM_POWER_S6RETENTION_Msk , NRF_POWER_RAMPOWER_S7RETENTION_MASK = POWER_RAM_POWER_S7RETENTION_Msk , NRF_POWER_RAMPOWER_S8RETENTION_MASK = POWER_RAM_POWER_S8RETENTION_Msk , NRF_POWER_RAMPOWER_S9RETENTION_MASK = POWER_RAM_POWER_S9RETENTION_Msk , NRF_POWER_RAMPOWER_S10RETENTION_MASK = POWER_RAM_POWER_S10RETENTION_Msk , NRF_POWER_RAMPOWER_S11RETENTION_MASK = POWER_RAM_POWER_S11RETENTION_Msk , NRF_POWER_RAMPOWER_S12RETENTION_MASK = POWER_RAM_POWER_S12RETENTION_Msk , NRF_POWER_RAMPOWER_S13RETENTION_MASK = POWER_RAM_POWER_S13RETENTION_Msk , NRF_POWER_RAMPOWER_S14RETENTION_MASK = POWER_RAM_POWER_S14RETENTION_Msk , NRF_POWER_RAMPOWER_S15RETENTION_MASK = POWER_RAM_POWER_S15RETENTION_Msk } |
| Bit masks for RAMPOWER register. More... | |
| enum | nrf_power_vreg_mask_t { NRF_POWER_VREG_1V8_MASK = POWER_REGCONFIG_VREG1V8_Msk , NRF_POWER_VREG_1V0_MASK = POWER_REGCONFIG_VREG1V0_Msk , NRF_POWER_VREG_0V8_MASK = POWER_REGCONFIG_VREG0V8_Msk , NRF_POWER_VREG_VS_MASK = POWER_REGCONFIG_VREGVS_Msk , NRF_POWER_VREG_MAIN1V8_MASK = POWER_REGCONFIG_VREGMAIN1V8_Msk , NRF_POWER_VREG_MAIN1V0_MASK = POWER_REGCONFIG_VREGMAIN1V0_Msk , NRF_POWER_VREG_MAINVS_MASK = POWER_REGCONFIG_VREGMAINVS_Msk , NRF_POWER_VREG_FORCE_MASK = POWER_REGCONFIG_FORCE_Msk } |
| POWER voltage regulators bit masks. More... | |
| enum | nrf_power_op_point_t { NRF_POWER_OP_POINT_0V4 = POWER_ABB_OPPOINT_OPPOINT_OpPoint0V4 , NRF_POWER_OP_POINT_0V5 = POWER_ABB_OPPOINT_OPPOINT_OpPoint0V5 , NRF_POWER_OP_POINT_0V6 = POWER_ABB_OPPOINT_OPPOINT_OpPoint0V6 , NRF_POWER_OP_POINT_0V8 = POWER_ABB_OPPOINT_OPPOINT_OpPoint0V8 } |
| POWER operating points for ABB domain. More... | |
| enum | nrf_power_override_value_t { NRF_POWER_OVERRIDE_VALUE_POWER_DOWN = POWER_ABB_OPPOINT_ABBPWROVERRIDEVAL_PowerDown , NRF_POWER_OVERRIDE_VALUE_POWER_UP = POWER_ABB_OPPOINT_ABBPWROVERRIDEVAL_PowerUp } |
| POWER operating points for ABB domain. More... | |
Functions | |
| NRF_STATIC_INLINE void | nrf_power_task_trigger (NRF_POWER_Type *p_reg, nrf_power_task_t task) |
| Function for activating a specific POWER task. | |
| NRF_STATIC_INLINE uint32_t | nrf_power_task_address_get (NRF_POWER_Type const *p_reg, nrf_power_task_t task) |
| Function for returning the address of a specific POWER task register. | |
| NRF_STATIC_INLINE void | nrf_power_event_clear (NRF_POWER_Type *p_reg, nrf_power_event_t event) |
| Function for clearing a specific event. | |
| NRF_STATIC_INLINE bool | nrf_power_event_check (NRF_POWER_Type const *p_reg, nrf_power_event_t event) |
| Function for retrieving the state of the POWER event. | |
| NRF_STATIC_INLINE bool | nrf_power_event_get_and_clear (NRF_POWER_Type *p_reg, nrf_power_event_t event) |
| Function for getting and clearing the state of specific event. | |
| NRF_STATIC_INLINE uint32_t | nrf_power_event_address_get (NRF_POWER_Type const *p_reg, nrf_power_event_t event) |
| Function for returning the address of a specific POWER event register. | |
| NRF_STATIC_INLINE void | nrf_power_int_enable (NRF_POWER_Type *p_reg, uint32_t mask) |
| Function for enabling selected interrupts. | |
| NRF_STATIC_INLINE uint32_t | nrf_power_int_enable_check (NRF_POWER_Type const *p_reg, uint32_t mask) |
| Function for checking if the specified interrupts are enabled. | |
| NRF_STATIC_INLINE uint32_t | nrf_power_int_enable_get (NRF_POWER_Type const *p_reg) |
| Function for retrieving the information about enabled interrupts. | |
| NRF_STATIC_INLINE void | nrf_power_int_disable (NRF_POWER_Type *p_reg, uint32_t mask) |
| Function for disabling selected interrupts. | |
| NRF_STATIC_INLINE void | nrf_power_subscribe_set (NRF_POWER_Type *p_reg, nrf_power_task_t task, uint8_t channel) |
| Function for setting the subscribe configuration for a given POWER task. | |
| NRF_STATIC_INLINE void | nrf_power_subscribe_clear (NRF_POWER_Type *p_reg, nrf_power_task_t task) |
| Function for clearing the subscribe configuration for a given POWER task. | |
| NRF_STATIC_INLINE uint32_t | nrf_power_subscribe_get (NRF_POWER_Type const *p_reg, nrf_power_task_t task) |
| Function for getting the subscribe configuration for a given POWER task. | |
| NRF_STATIC_INLINE void | nrf_power_publish_set (NRF_POWER_Type *p_reg, nrf_power_event_t event, uint8_t channel) |
| Function for setting the publish configuration for a given POWER event. | |
| NRF_STATIC_INLINE void | nrf_power_publish_clear (NRF_POWER_Type *p_reg, nrf_power_event_t event) |
| Function for clearing the publish configuration for a given POWER event. | |
| NRF_STATIC_INLINE uint32_t | nrf_power_publish_get (NRF_POWER_Type const *p_reg, nrf_power_event_t event) |
| Function for getting the publish configuration for a given POWER event. | |
| NRF_STATIC_INLINE uint32_t | nrf_power_resetreas_get (NRF_POWER_Type const *p_reg) |
| Function for getting the reset reason bitmask. | |
| NRF_STATIC_INLINE void | nrf_power_resetreas_clear (NRF_POWER_Type *p_reg, uint32_t mask) |
| Function for clearing the selected reset reason field. | |
| NRF_STATIC_INLINE bool | nrf_power_powerstatus_get (NRF_POWER_Type const *p_reg) |
| Function for getting power status of the LTE Modem domain. | |
| NRF_STATIC_INLINE uint32_t | nrf_power_ramstatus_get (NRF_POWER_Type const *p_reg) |
| Function for getting the RAMSTATUS register. | |
| NRF_STATIC_INLINE void | nrf_power_pofcon_set (NRF_POWER_Type *p_reg, bool enable, nrf_power_pof_thr_t thr) |
| Function for setting the power failure comparator configuration. | |
| NRF_STATIC_INLINE nrf_power_pof_thr_t | nrf_power_pofcon_get (NRF_POWER_Type const *p_reg, bool *p_enabled) |
| Function for getting the power failure comparator configuration. | |
| NRF_STATIC_INLINE void | nrf_power_pofcon_vddh_set (NRF_POWER_Type *p_reg, nrf_power_pof_thrvddh_t thr) |
| Function for setting the VDDH power failure comparator threshold. | |
| NRF_STATIC_INLINE nrf_power_pof_thrvddh_t | nrf_power_pofcon_vddh_get (NRF_POWER_Type const *p_reg) |
| Function for getting the VDDH power failure comparator threshold. | |
| NRF_STATIC_INLINE void | nrf_power_gpregret_set (NRF_POWER_Type *p_reg, uint32_t reg_num, uint32_t val) |
| Function for setting the general purpose retention register. | |
| NRF_STATIC_INLINE uint32_t | nrf_power_gpregret_get (NRF_POWER_Type const *p_reg, uint32_t reg_num) |
| Function for getting general purpose retention register. | |
| NRF_STATIC_INLINE void | nrf_power_dcdcen_set (NRF_POWER_Type *p_reg, bool enable) |
| Enable or disable DCDC converter. | |
| NRF_STATIC_INLINE bool | nrf_power_dcdcen_get (NRF_POWER_Type const *p_reg) |
| Function for getting the state of the DCDC converter. | |
| NRF_STATIC_INLINE void | nrf_power_rampower_mask_on (NRF_POWER_Type *p_reg, uint8_t block, uint32_t section_mask) |
| Turn ON sections in the selected RAM block. | |
| NRF_STATIC_INLINE void | nrf_power_rampower_mask_off (NRF_POWER_Type *p_reg, uint8_t block, uint32_t section_mask) |
| Turn ON sections in the selected RAM block. | |
| NRF_STATIC_INLINE uint32_t | nrf_power_rampower_mask_get (NRF_POWER_Type const *p_reg, uint8_t block) |
| Function for getting the ON mask and retention sections in the selected RAM block. | |
| NRF_STATIC_INLINE void | nrf_power_dcdcen_vddh_set (NRF_POWER_Type *p_reg, bool enable) |
| Function for enabling or disabling the DCDC converter on VDDH. | |
| NRF_STATIC_INLINE bool | nrf_power_dcdcen_vddh_get (NRF_POWER_Type const *p_reg) |
| Function for getting the state of DCDC converter on VDDH. | |
| NRF_STATIC_INLINE nrf_power_mainregstatus_t | nrf_power_mainregstatus_get (NRF_POWER_Type const *p_reg) |
| Function for getting the main supply status. | |
| NRF_STATIC_INLINE uint32_t | nrf_power_usbregstatus_get (NRF_POWER_Type const *p_reg) |
| Function for getting the whole USBREGSTATUS register. | |
| NRF_STATIC_INLINE bool | nrf_power_usbregstatus_vbusdet_get (NRF_POWER_Type const *p_reg) |
| Function for getting the VBUS input detection status. | |
| NRF_STATIC_INLINE bool | nrf_power_usbregstatus_outrdy_get (NRF_POWER_Type const *p_reg) |
| Function for getting the state of the elapsed time for the USB supply output settling. | |
| NRF_STATIC_INLINE bool | nrf_power_abb_busy_check (NRF_POWER_Type const *p_reg, uint8_t domain_idx) |
| Function for checking whether the specified ABB domain is busy. | |
| NRF_STATIC_INLINE void | nrf_power_abb_config_set (NRF_POWER_Type *p_reg, uint8_t domain_idx, nrf_power_abb_config_t const *p_config) |
| Function for setting configuration of the operating point for the specified ABB domain. | |
| NRF_STATIC_INLINE void | nrf_power_abb_config_get (NRF_POWER_Type const *p_reg, uint8_t domain_idx, nrf_power_abb_config_t *p_config) |
| Function for getting configuration of the operating point for the specified ABB domain. | |
| NRF_STATIC_INLINE void | nrf_power_abb_force_lock_set (NRF_POWER_Type *p_reg, uint8_t domain_idx, bool enable) |
| Function for setting the force lock for the specified ABB domain. | |
| NRF_STATIC_INLINE bool | nrf_power_abb_force_lock_check (NRF_POWER_Type const *p_reg, uint8_t domain_idx) |
| Function for checking if the force lock for the specified ABB domain is enabled. | |
| NRF_STATIC_INLINE void | nrf_power_vreg_set (NRF_POWER_Type *p_reg, uint32_t mask) |
| Function for setting the enabled voltage regulators. | |
| NRF_STATIC_INLINE uint32_t | nrf_power_vreg_get (NRF_POWER_Type const *p_reg) |
| Function for getting mask of enabled voltage regulators. | |
| NRF_STATIC_INLINE void | nrf_power_vreg_or_set (NRF_POWER_Type *p_reg, uint32_t mask) |
| Function for enabling the specified voltage regulators. | |
| NRF_STATIC_INLINE void | nrf_power_vreg_clear_set (NRF_POWER_Type *p_reg, uint32_t mask) |
| Function for disabling the specified voltage regulators. | |
| NRF_STATIC_INLINE void | nrf_power_ulp_mode_set (NRF_POWER_Type *p_reg, bool enable) |
| Function for setting the Ultra Low Power (ULP) mode. | |
| NRF_STATIC_INLINE bool | nrf_power_ulp_mode_check (NRF_POWER_Type const *p_reg) |
| Function for checking if the ULP mode is enabled. | |
| NRF_STATIC_INLINE void | nrf_power_ulv_mode_set (NRF_POWER_Type *p_reg, bool enable) |
| Function for setting the Ultra Low Voltage (ULV) mode. | |
| NRF_STATIC_INLINE bool | nrf_power_ulv_mode_check (NRF_POWER_Type const *p_reg) |
| Function for checking if the ULV mode is enabled. | |
| NRF_STATIC_INLINE bool | nrf_power_sem_status_get (NRF_POWER_Type const *p_reg) |
| Function for getting the POWER semaphore status. | |
| NRF_STATIC_INLINE void | nrf_power_bils_set (NRF_POWER_Type *p_reg, bool enable) |
| Function for setting BILS instances. | |
| NRF_STATIC_INLINE bool | nrf_power_bils_check (NRF_POWER_Type const *p_reg) |
| Function for checking if BILS instances are enabled. | |
| NRF_STATIC_INLINE void | nrf_power_pmic_set (NRF_POWER_Type *p_reg, bool enable) |
| Function for setting the PMIC interface. | |
| NRF_STATIC_INLINE bool | nrf_power_pmic_check (NRF_POWER_Type const *p_reg) |
| Function for checking if the PMIC interface is enabled. | |
Hardware access layer for managing the POWER peripheral.
| enum nrf_power_event_t |
POWER events.
| enum nrf_power_int_mask_t |
POWER interrupts.
RAM power state bit masks.
| enum nrf_power_onoffram_t |
RAM power state position of the bits.
| enum nrf_power_op_point_t |
| enum nrf_power_pof_thr_t |
Power failure comparator thresholds.
Power failure comparator thresholds for VDDH.
Masks of RAM blocks.
| enum nrf_power_ramblock_t |
Numbers of RAM blocks.
Bit masks for RAMPOWER register.
All possible bits described, even if they are not used in selected MCU.
Reset reason.
| enum nrf_power_task_t |
POWER tasks.
USBREGSTATUS register bit masks.
| Enumerator | |
|---|---|
| NRF_POWER_USBREGSTATUS_VBUSDETECT_MASK | USB detected or removed. |
| NRF_POWER_USBREGSTATUS_OUTPUTRDY_MASK | USB 3.3 V supply ready. |
POWER voltage regulators bit masks.
| NRF_STATIC_INLINE bool nrf_power_abb_busy_check | ( | NRF_POWER_Type const * | p_reg, |
| uint8_t | domain_idx ) |
Function for checking whether the specified ABB domain is busy.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | domain_idx | Index of ABB domain. |
| true | The ABB is busy with applying the new operating point. |
| false | The ABB is ready to accept the new operating point. |
| NRF_STATIC_INLINE void nrf_power_abb_config_get | ( | NRF_POWER_Type const * | p_reg, |
| uint8_t | domain_idx, | ||
| nrf_power_abb_config_t * | p_config ) |
Function for getting configuration of the operating point for the specified ABB domain.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | domain_idx | Index of ABB domain. |
| [in] | p_config | Pointer to the structure with configuration to be set. |
| NRF_STATIC_INLINE void nrf_power_abb_config_set | ( | NRF_POWER_Type * | p_reg, |
| uint8_t | domain_idx, | ||
| nrf_power_abb_config_t const * | p_config ) |
Function for setting configuration of the operating point for the specified ABB domain.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | domain_idx | Index of ABB domain. |
| [in] | p_config | Pointer to the structure with configuration to be set. |
| NRF_STATIC_INLINE bool nrf_power_abb_force_lock_check | ( | NRF_POWER_Type const * | p_reg, |
| uint8_t | domain_idx ) |
Function for checking if the force lock for the specified ABB domain is enabled.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | domain_idx | Index of ABB domain whose status is checked. |
| true | Force lock is enabled. |
| false | Force lock is disabled. |
| NRF_STATIC_INLINE void nrf_power_abb_force_lock_set | ( | NRF_POWER_Type * | p_reg, |
| uint8_t | domain_idx, | ||
| bool | enable ) |
Function for setting the force lock for the specified ABB domain.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | domain_idx | Index of ABB domain. |
| [in] | enable | True if force lock is to be enabled, false otherwise. |
| NRF_STATIC_INLINE bool nrf_power_bils_check | ( | NRF_POWER_Type const * | p_reg | ) |
Function for checking if BILS instances are enabled.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | All configured BILS instances are enabled. |
| false | All BILS instances are disabled. |
| NRF_STATIC_INLINE void nrf_power_bils_set | ( | NRF_POWER_Type * | p_reg, |
| bool | enable ) |
Function for setting BILS instances.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | enable | True if all configured BILS instances are to be enabled, false otherwise. |
| NRF_STATIC_INLINE bool nrf_power_dcdcen_get | ( | NRF_POWER_Type const * | p_reg | ) |
Function for getting the state of the DCDC converter.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | Converter is enabled. |
| false | Converter is disabled. |
| NRF_STATIC_INLINE void nrf_power_dcdcen_set | ( | NRF_POWER_Type * | p_reg, |
| bool | enable ) |
Enable or disable DCDC converter.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | enable | True if DCDC converter is to be enabled, false otherwise. |
| NRF_STATIC_INLINE bool nrf_power_dcdcen_vddh_get | ( | NRF_POWER_Type const * | p_reg | ) |
Function for getting the state of DCDC converter on VDDH.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | Converter is enabled. |
| false | Converter is disabled. |
| NRF_STATIC_INLINE void nrf_power_dcdcen_vddh_set | ( | NRF_POWER_Type * | p_reg, |
| bool | enable ) |
Function for enabling or disabling the DCDC converter on VDDH.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | enable | True if DCDC converter on VDDH is to be enabled, false otherwise. |
| NRF_STATIC_INLINE uint32_t nrf_power_event_address_get | ( | NRF_POWER_Type const * | p_reg, |
| nrf_power_event_t | event ) |
Function for returning the address of a specific POWER event register.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event. |
| NRF_STATIC_INLINE bool nrf_power_event_check | ( | NRF_POWER_Type const * | p_reg, |
| nrf_power_event_t | event ) |
Function for retrieving the state of the POWER event.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event to be checked. |
| true | The event has been generated. |
| false | The event has not been generated. |
| NRF_STATIC_INLINE void nrf_power_event_clear | ( | NRF_POWER_Type * | p_reg, |
| nrf_power_event_t | event ) |
Function for clearing a specific event.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event. |
| NRF_STATIC_INLINE bool nrf_power_event_get_and_clear | ( | NRF_POWER_Type * | p_reg, |
| nrf_power_event_t | event ) |
Function for getting and clearing the state of specific event.
This function checks the state of the event and clears it.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event. |
| true | The event was set. |
| false | The event was not set. |
| NRF_STATIC_INLINE uint32_t nrf_power_gpregret_get | ( | NRF_POWER_Type const * | p_reg, |
| uint32_t | reg_num ) |
Function for getting general purpose retention register.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | reg_num | General purpose retention register number. |
| NRF_STATIC_INLINE void nrf_power_gpregret_set | ( | NRF_POWER_Type * | p_reg, |
| uint32_t | reg_num, | ||
| uint32_t | val ) |
Function for setting the general purpose retention register.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | reg_num | General purpose retention register number. |
| [in] | val | Value to be set in the register. |
| NRF_STATIC_INLINE void nrf_power_int_disable | ( | NRF_POWER_Type * | p_reg, |
| uint32_t | mask ) |
Function for disabling selected interrupts.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be disabled. Use nrf_power_int_mask_t values for bit masking. |
| NRF_STATIC_INLINE void nrf_power_int_enable | ( | NRF_POWER_Type * | p_reg, |
| uint32_t | mask ) |
Function for enabling selected interrupts.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be enabled. Use nrf_power_int_mask_t values for bit masking. |
| NRF_STATIC_INLINE uint32_t nrf_power_int_enable_check | ( | NRF_POWER_Type const * | p_reg, |
| uint32_t | mask ) |
Function for checking if the specified interrupts are enabled.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be checked. Use nrf_power_int_mask_t values for bit masking. |
| NRF_STATIC_INLINE uint32_t nrf_power_int_enable_get | ( | NRF_POWER_Type const * | p_reg | ) |
Function for retrieving the information about enabled interrupts.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE nrf_power_mainregstatus_t nrf_power_mainregstatus_get | ( | NRF_POWER_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_power_pmic_check | ( | NRF_POWER_Type const * | p_reg | ) |
Function for checking if the PMIC interface is enabled.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | PMIC interface is enabled. |
| false | PMIC interface is disabled. |
| NRF_STATIC_INLINE void nrf_power_pmic_set | ( | NRF_POWER_Type * | p_reg, |
| bool | enable ) |
Function for setting the PMIC interface.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | enable | True if PMIC interface is to be enabled, false otherwise. |
| NRF_STATIC_INLINE nrf_power_pof_thr_t nrf_power_pofcon_get | ( | NRF_POWER_Type const * | p_reg, |
| bool * | p_enabled ) |
Function for getting the power failure comparator configuration.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [out] | p_enabled | Function sets this boolean variable to true if power failure comparator is enabled. The pointer can be NULL if we do not need this information. |
| NRF_STATIC_INLINE void nrf_power_pofcon_set | ( | NRF_POWER_Type * | p_reg, |
| bool | enable, | ||
| nrf_power_pof_thr_t | thr ) |
Function for setting the power failure comparator configuration.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | enable | True if the power failure comparator is to be enabled, false otherwise. |
| [in] | thr | Voltage threshold value. |
| NRF_STATIC_INLINE nrf_power_pof_thrvddh_t nrf_power_pofcon_vddh_get | ( | NRF_POWER_Type const * | p_reg | ) |
Function for getting the VDDH power failure comparator threshold.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE void nrf_power_pofcon_vddh_set | ( | NRF_POWER_Type * | p_reg, |
| nrf_power_pof_thrvddh_t | thr ) |
Function for setting the VDDH power failure comparator threshold.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | thr | Threshold to be set. |
| NRF_STATIC_INLINE bool nrf_power_powerstatus_get | ( | NRF_POWER_Type const * | p_reg | ) |
Function for getting power status of the LTE Modem domain.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | The LTE Modem domain is powered on. |
| false | The LTE Modem domain is powered off. |
| NRF_STATIC_INLINE void nrf_power_publish_clear | ( | NRF_POWER_Type * | p_reg, |
| nrf_power_event_t | event ) |
Function for clearing the publish configuration for a given POWER event.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event for which to clear the configuration. |
| NRF_STATIC_INLINE uint32_t nrf_power_publish_get | ( | NRF_POWER_Type const * | p_reg, |
| nrf_power_event_t | event ) |
Function for getting the publish configuration for a given POWER event.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event for which to read the configuration. |
| NRF_STATIC_INLINE void nrf_power_publish_set | ( | NRF_POWER_Type * | p_reg, |
| nrf_power_event_t | event, | ||
| uint8_t | channel ) |
Function for setting the publish configuration for a given POWER event.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event for which to set the configuration. |
| [in] | channel | Channel through which to publish the event. |
| NRF_STATIC_INLINE uint32_t nrf_power_rampower_mask_get | ( | NRF_POWER_Type const * | p_reg, |
| uint8_t | block ) |
Function for getting the ON mask and retention sections in the selected RAM block.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | block | RAM block index. |
| NRF_STATIC_INLINE void nrf_power_rampower_mask_off | ( | NRF_POWER_Type * | p_reg, |
| uint8_t | block, | ||
| uint32_t | section_mask ) |
Turn ON sections in the selected RAM block.
This function turns OFF several sections in one block and also block retention.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | block | RAM block index. |
| [in] | section_mask | Mask of the sections created by merging nrf_power_rampower_mask_t flags. |
| NRF_STATIC_INLINE void nrf_power_rampower_mask_on | ( | NRF_POWER_Type * | p_reg, |
| uint8_t | block, | ||
| uint32_t | section_mask ) |
Turn ON sections in the selected RAM block.
This function turns ON several sections in one block and also block retention.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | block | RAM block index. |
| [in] | section_mask | Mask of the sections created by merging nrf_power_rampower_mask_t flags. |
| NRF_STATIC_INLINE uint32_t nrf_power_ramstatus_get | ( | NRF_POWER_Type const * | p_reg | ) |
Function for getting the RAMSTATUS register.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE void nrf_power_resetreas_clear | ( | NRF_POWER_Type * | p_reg, |
| uint32_t | mask ) |
Function for clearing the selected reset reason field.
This function clears the selected reset reason field.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | The mask constructed from nrf_power_resetreas_mask_t enumerator values. |
| NRF_STATIC_INLINE uint32_t nrf_power_resetreas_get | ( | NRF_POWER_Type const * | p_reg | ) |
Function for getting the reset reason bitmask.
This function returns the reset reason bitmask. Unless cleared, the RESETREAS register is cumulative. A field is cleared by writing '1' to it (see nrf_power_resetreas_clear). If none of the reset sources is flagged, the chip was reset from the on-chip reset generator, which indicates a power-on-reset or a brown out reset.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE bool nrf_power_sem_status_get | ( | NRF_POWER_Type const * | p_reg | ) |
Function for getting the POWER semaphore status.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | Semaphore is acquired. |
| false | Semaphore is released. |
| NRF_STATIC_INLINE void nrf_power_subscribe_clear | ( | NRF_POWER_Type * | p_reg, |
| nrf_power_task_t | task ) |
Function for clearing the subscribe configuration for a given POWER task.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Task for which to clear the configuration. |
| NRF_STATIC_INLINE uint32_t nrf_power_subscribe_get | ( | NRF_POWER_Type const * | p_reg, |
| nrf_power_task_t | task ) |
Function for getting the subscribe configuration for a given POWER task.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Task for which to read the configuration. |
| NRF_STATIC_INLINE void nrf_power_subscribe_set | ( | NRF_POWER_Type * | p_reg, |
| nrf_power_task_t | task, | ||
| uint8_t | channel ) |
Function for setting the subscribe configuration for a given POWER task.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Task for which to set the configuration. |
| [in] | channel | Channel through which to subscribe events. |
| NRF_STATIC_INLINE uint32_t nrf_power_task_address_get | ( | NRF_POWER_Type const * | p_reg, |
| nrf_power_task_t | task ) |
Function for returning the address of a specific POWER task register.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Task. |
| NRF_STATIC_INLINE void nrf_power_task_trigger | ( | NRF_POWER_Type * | p_reg, |
| nrf_power_task_t | task ) |
Function for activating a specific POWER task.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Task. |
| NRF_STATIC_INLINE bool nrf_power_ulp_mode_check | ( | NRF_POWER_Type const * | p_reg | ) |
Function for checking if the ULP mode is enabled.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | ULP mode is enabled. |
| false | ULP mode is disabled. |
| NRF_STATIC_INLINE void nrf_power_ulp_mode_set | ( | NRF_POWER_Type * | p_reg, |
| bool | enable ) |
Function for setting the Ultra Low Power (ULP) mode.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | enable | True if ULP mode is to be enabled, false otherwise. |
| NRF_STATIC_INLINE bool nrf_power_ulv_mode_check | ( | NRF_POWER_Type const * | p_reg | ) |
Function for checking if the ULV mode is enabled.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | ULV mode is enabled. |
| false | ULV mode is disabled. |
| NRF_STATIC_INLINE void nrf_power_ulv_mode_set | ( | NRF_POWER_Type * | p_reg, |
| bool | enable ) |
Function for setting the Ultra Low Voltage (ULV) mode.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | enable | True if ULV mode is to be enabled, false otherwise. |
| NRF_STATIC_INLINE uint32_t nrf_power_usbregstatus_get | ( | NRF_POWER_Type const * | p_reg | ) |
Function for getting the whole USBREGSTATUS register.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE bool nrf_power_usbregstatus_outrdy_get | ( | NRF_POWER_Type const * | p_reg | ) |
Function for getting the state of the elapsed time for the USB supply output settling.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| false | USBREG output settling time not elapsed. |
| true | USBREG output settling time elapsed (same information as USBPWRRDY event). |
| NRF_STATIC_INLINE bool nrf_power_usbregstatus_vbusdet_get | ( | NRF_POWER_Type const * | p_reg | ) |
Function for getting the VBUS input detection status.
USBDETECTED and USBREMOVED events are derived from this information
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| false | VBUS voltage below valid threshold. |
| true | VBUS voltage above valid threshold. |
| NRF_STATIC_INLINE void nrf_power_vreg_clear_set | ( | NRF_POWER_Type * | p_reg, |
| uint32_t | mask ) |
Function for disabling the specified voltage regulators.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of voltage regulators to be disabled. Use nrf_power_vreg_mask_t values for bit masking. |
| NRF_STATIC_INLINE uint32_t nrf_power_vreg_get | ( | NRF_POWER_Type const * | p_reg | ) |
Function for getting mask of enabled voltage regulators.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE void nrf_power_vreg_or_set | ( | NRF_POWER_Type * | p_reg, |
| uint32_t | mask ) |
Function for enabling the specified voltage regulators.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of voltage regulators to be enabled. Use nrf_power_vreg_mask_t values for bit masking. |
| NRF_STATIC_INLINE void nrf_power_vreg_set | ( | NRF_POWER_Type * | p_reg, |
| uint32_t | mask ) |
Function for setting the enabled voltage regulators.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of enabled voltage regulators to be set. Use nrf_power_vreg_mask_t values for bit masking. |