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 ) } |
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 ) } |
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 } |
POWER interrupts. More... | |
Functions | |
__STATIC_INLINE void | nrf_power_task_trigger (nrf_power_task_t task) |
Function for activating a specific POWER task. More... | |
__STATIC_INLINE uint32_t | nrf_power_task_address_get (nrf_power_task_t task) |
Function for returning the address of a specific POWER task register. More... | |
__STATIC_INLINE void | nrf_power_event_clear (nrf_power_event_t event) |
Function for clearing a specific event. More... | |
__STATIC_INLINE bool | nrf_power_event_check (nrf_power_event_t event) |
Function for returning the state of a specific event. More... | |
__STATIC_INLINE bool | nrf_power_event_get_and_clear (nrf_power_event_t event) |
Function for getting and clearing the state of specific event. More... | |
__STATIC_INLINE uint32_t | nrf_power_event_address_get (nrf_power_event_t event) |
Function for returning the address of a specific POWER event register. More... | |
__STATIC_INLINE void | nrf_power_int_enable (uint32_t int_mask) |
Function for enabling selected interrupts. More... | |
__STATIC_INLINE bool | nrf_power_int_enable_check (uint32_t int_mask) |
Function for retrieving the state of selected interrupts. More... | |
__STATIC_INLINE uint32_t | nrf_power_int_enable_get (void) |
Function for retrieving the information about enabled interrupts. More... | |
__STATIC_INLINE void | nrf_power_int_disable (uint32_t int_mask) |
Function for disabling selected interrupts. More... | |
The implemented functionality | |
Macros that defines functionality that is implemented into POWER peripheral. | |
#define | NRF_POWER_HAS_SLEEPEVT 1 |
The fact that sleep events are present. More... | |
#define | NRF_POWER_HAS_RAMPOWER_REGS 1 |
The fact that RAMPOWER registers are present. More... | |
#define | NRF_POWER_HAS_VDDH 1 |
Auxiliary definition to mark the fact that VDDH is present. More... | |
#define | NRF_POWER_HAS_USBREG 1 |
The fact that power module manages USB regulator. 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 } |
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 } |
RAM blocks numbers. 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 } |
RAM blocks masks. 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. | |
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. | |
enum | nrf_power_mainregstatus_t { NRF_POWER_MAINREGSTATUS_NORMAL = POWER_MAINREGSTATUS_MAINREGSTATUS_Normal, NRF_POWER_MAINREGSTATUS_HIGH = POWER_MAINREGSTATUS_MAINREGSTATUS_High } |
Main regulator status. | |
enum | nrf_power_rampower_t { NRF_POWER_RAMPOWER_S0POWER = POWER_RAM_POWER_S0POWER_Pos, NRF_POWER_RAMPOWER_S1POWER, NRF_POWER_RAMPOWER_S2POWER, NRF_POWER_RAMPOWER_S3POWER, NRF_POWER_RAMPOWER_S4POWER, NRF_POWER_RAMPOWER_S5POWER, NRF_POWER_RAMPOWER_S6POWER, NRF_POWER_RAMPOWER_S7POWER, NRF_POWER_RAMPOWER_S8POWER, NRF_POWER_RAMPOWER_S9POWER, NRF_POWER_RAMPOWER_S10POWER, NRF_POWER_RAMPOWER_S11POWER, NRF_POWER_RAMPOWER_S12POWER, NRF_POWER_RAMPOWER_S13POWER, NRF_POWER_RAMPOWER_S14POWER, NRF_POWER_RAMPOWER_S15POWER, NRF_POWER_RAMPOWER_S0RETENTION = POWER_RAM_POWER_S0RETENTION_Pos, NRF_POWER_RAMPOWER_S1RETENTION, NRF_POWER_RAMPOWER_S2RETENTION, NRF_POWER_RAMPOWER_S3RETENTION, NRF_POWER_RAMPOWER_S4RETENTION, NRF_POWER_RAMPOWER_S5RETENTION, NRF_POWER_RAMPOWER_S6RETENTION, NRF_POWER_RAMPOWER_S7RETENTION, NRF_POWER_RAMPOWER_S8RETENTION, NRF_POWER_RAMPOWER_S9RETENTION, NRF_POWER_RAMPOWER_S10RETENTION, NRF_POWER_RAMPOWER_S11RETENTION, NRF_POWER_RAMPOWER_S12RETENTION, NRF_POWER_RAMPOWER_S13RETENTION, NRF_POWER_RAMPOWER_S14RETENTION, NRF_POWER_RAMPOWER_S15RETENTION } |
Bit positions for RAMPOWER register. More... | |
enum | nrf_power_rampower_mask_t { NRF_POWER_RAMPOWER_S0POWER_MASK = 1UL << NRF_POWER_RAMPOWER_S0POWER, NRF_POWER_RAMPOWER_S1POWER_MASK = 1UL << NRF_POWER_RAMPOWER_S1POWER, NRF_POWER_RAMPOWER_S2POWER_MASK = 1UL << NRF_POWER_RAMPOWER_S2POWER, NRF_POWER_RAMPOWER_S3POWER_MASK = 1UL << NRF_POWER_RAMPOWER_S3POWER, NRF_POWER_RAMPOWER_S4POWER_MASK = 1UL << NRF_POWER_RAMPOWER_S4POWER, NRF_POWER_RAMPOWER_S5POWER_MASK = 1UL << NRF_POWER_RAMPOWER_S5POWER, NRF_POWER_RAMPOWER_S7POWER_MASK = 1UL << NRF_POWER_RAMPOWER_S7POWER, NRF_POWER_RAMPOWER_S8POWER_MASK = 1UL << NRF_POWER_RAMPOWER_S8POWER, NRF_POWER_RAMPOWER_S9POWER_MASK = 1UL << NRF_POWER_RAMPOWER_S9POWER, NRF_POWER_RAMPOWER_S10POWER_MASK = 1UL << NRF_POWER_RAMPOWER_S10POWER, NRF_POWER_RAMPOWER_S11POWER_MASK = 1UL << NRF_POWER_RAMPOWER_S11POWER, NRF_POWER_RAMPOWER_S12POWER_MASK = 1UL << NRF_POWER_RAMPOWER_S12POWER, NRF_POWER_RAMPOWER_S13POWER_MASK = 1UL << NRF_POWER_RAMPOWER_S13POWER, NRF_POWER_RAMPOWER_S14POWER_MASK = 1UL << NRF_POWER_RAMPOWER_S14POWER, NRF_POWER_RAMPOWER_S15POWER_MASK = 1UL << NRF_POWER_RAMPOWER_S15POWER, NRF_POWER_RAMPOWER_S0RETENTION_MASK = 1UL << NRF_POWER_RAMPOWER_S0RETENTION, NRF_POWER_RAMPOWER_S1RETENTION_MASK = 1UL << NRF_POWER_RAMPOWER_S1RETENTION, NRF_POWER_RAMPOWER_S2RETENTION_MASK = 1UL << NRF_POWER_RAMPOWER_S2RETENTION, NRF_POWER_RAMPOWER_S3RETENTION_MASK = 1UL << NRF_POWER_RAMPOWER_S3RETENTION, NRF_POWER_RAMPOWER_S4RETENTION_MASK = 1UL << NRF_POWER_RAMPOWER_S4RETENTION, NRF_POWER_RAMPOWER_S5RETENTION_MASK = 1UL << NRF_POWER_RAMPOWER_S5RETENTION, NRF_POWER_RAMPOWER_S7RETENTION_MASK = 1UL << NRF_POWER_RAMPOWER_S7RETENTION, NRF_POWER_RAMPOWER_S8RETENTION_MASK = 1UL << NRF_POWER_RAMPOWER_S8RETENTION, NRF_POWER_RAMPOWER_S9RETENTION_MASK = 1UL << NRF_POWER_RAMPOWER_S9RETENTION, NRF_POWER_RAMPOWER_S10RETENTION_MASK = 1UL << NRF_POWER_RAMPOWER_S10RETENTION, NRF_POWER_RAMPOWER_S11RETENTION_MASK = 1UL << NRF_POWER_RAMPOWER_S11RETENTION, NRF_POWER_RAMPOWER_S12RETENTION_MASK = 1UL << NRF_POWER_RAMPOWER_S12RETENTION, NRF_POWER_RAMPOWER_S13RETENTION_MASK = 1UL << NRF_POWER_RAMPOWER_S13RETENTION, NRF_POWER_RAMPOWER_S14RETENTION_MASK = 1UL << NRF_POWER_RAMPOWER_S14RETENTION, NRF_POWER_RAMPOWER_S15RETENTION_MASK = 1UL << NRF_POWER_RAMPOWER_S15RETENTION } |
Bit masks for RAMPOWER register. More... | |
__STATIC_INLINE uint32_t | nrf_power_resetreas_get (void) |
Get reset reason mask. More... | |
__STATIC_INLINE void | nrf_power_resetreas_clear (uint32_t mask) |
Clear selected reset reason field. More... | |
__STATIC_INLINE uint32_t | nrf_power_ramstatus_get (void) |
Get RAMSTATUS register. More... | |
__STATIC_INLINE void | nrf_power_system_off (void) |
Go to system OFF. More... | |
__STATIC_INLINE void | nrf_power_pofcon_set (bool enabled, nrf_power_pof_thr_t thr) |
Set power failure comparator configuration. More... | |
__STATIC_INLINE nrf_power_pof_thr_t | nrf_power_pofcon_get (bool *p_enabled) |
Get power failure comparator configuration. More... | |
__STATIC_INLINE void | nrf_power_pofcon_vddh_set (nrf_power_pof_thrvddh_t thr) |
Set VDDH power failure comparator threshold. More... | |
__STATIC_INLINE nrf_power_pof_thrvddh_t | nrf_power_pofcon_vddh_get (void) |
Get VDDH power failure comparator threshold. More... | |
__STATIC_INLINE void | nrf_power_gpregret_set (uint8_t val) |
Set general purpose retention register. More... | |
__STATIC_INLINE uint8_t | nrf_power_gpregret_get (void) |
Get general purpose retention register. More... | |
__STATIC_INLINE void | nrf_power_gpregret2_set (uint8_t val) |
Set general purpose retention register 2. More... | |
__STATIC_INLINE uint8_t | nrf_power_gpregret2_get (void) |
Get general purpose retention register 2. More... | |
__STATIC_INLINE void | nrf_power_dcdcen_set (bool enable) |
Enable or disable DCDC converter. More... | |
__STATIC_INLINE bool | nrf_power_dcdcen_get (void) |
Get the state of DCDC converter. More... | |
__STATIC_INLINE void | nrf_power_rampower_mask_on (uint8_t block, uint32_t section_mask) |
Turn ON sections in selected RAM block. More... | |
__STATIC_INLINE void | nrf_power_rampower_mask_off (uint8_t block, uint32_t section_mask) |
Turn ON sections in selected RAM block. More... | |
__STATIC_INLINE uint32_t | nrf_power_rampower_mask_get (uint8_t block) |
Get the mask of ON and retention sections in selected RAM block. More... | |
__STATIC_INLINE void | nrf_power_dcdcen_vddh_set (bool enable) |
Enable of disable DCDC converter on VDDH. More... | |
__STATIC_INLINE bool | nrf_power_dcdcen_vddh_get (void) |
Get the state of DCDC converter on VDDH. More... | |
__STATIC_INLINE nrf_power_mainregstatus_t | nrf_power_mainregstatus_get (void) |
Get main supply status. More... | |
__STATIC_INLINE uint32_t | nrf_power_usbregstatus_get (void) |
__STATIC_INLINE bool | nrf_power_usbregstatus_vbusdet_get (void) |
VBUS input detection status. More... | |
__STATIC_INLINE bool | nrf_power_usbregstatus_outrdy_get (void) |
USB supply output settling time elapsed. More... | |
Hardware access layer for (POWER) peripheral.
#define NRF_POWER_HAS_RAMPOWER_REGS 1 |
The fact that RAMPOWER registers are present.
After nRF51, new way to manage RAM power was implemented. Special registers, one for every RAM block that makes it possible to power ON or OFF RAM segments and turn ON and OFF RAM retention in system OFF state.
#define NRF_POWER_HAS_SLEEPEVT 1 |
The fact that sleep events are present.
In some MCUs there is possibility to process sleep entering and exiting events.
#define NRF_POWER_HAS_USBREG 1 |
The fact that power module manages USB regulator.
In devices that have USB, power peripheral manages also connection detection and USB power regulator, that converts 5 V to 3.3 V used by USBD peripheral.
#define NRF_POWER_HAS_VDDH 1 |
Auxiliary definition to mark the fact that VDDH is present.
This definition can be used in a code to decide if the part with VDDH related settings should be implemented.
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.
RAM blocks masks.
enum nrf_power_ramblock_t |
RAM blocks numbers.
Bit masks for RAMPOWER register.
All possible bits described, even if they are not used in selected MCU.
enum nrf_power_rampower_t |
Bit positions for RAMPOWER register.
All possible bits described, even if they are not used in selected MCU.
Reset reason.
enum nrf_power_task_t |
USBREGSTATUS register bit masks.
__STATIC_INLINE bool nrf_power_dcdcen_get | ( | void | ) |
Get the state of DCDC converter.
true | Converter is enabled |
false | Converter is disabled |
__STATIC_INLINE void nrf_power_dcdcen_set | ( | bool | enable | ) |
Enable or disable DCDC converter.
enable | Set true to enable or false to disable DCDC converter. |
__STATIC_INLINE bool nrf_power_dcdcen_vddh_get | ( | void | ) |
Get the state of DCDC converter on VDDH.
true | Converter is enabled |
false | Converter is disabled |
__STATIC_INLINE void nrf_power_dcdcen_vddh_set | ( | bool | enable | ) |
Enable of disable DCDC converter on VDDH.
enable | Set true to enable or false to disable DCDC converter. |
__STATIC_INLINE uint32_t nrf_power_event_address_get | ( | nrf_power_event_t | event | ) |
Function for returning the address of a specific POWER event register.
event | Event. |
__STATIC_INLINE bool nrf_power_event_check | ( | nrf_power_event_t | event | ) |
Function for returning the state of a specific event.
event | Event. |
true | If the event is set. |
false | If the event is not set. |
__STATIC_INLINE void nrf_power_event_clear | ( | nrf_power_event_t | event | ) |
Function for clearing a specific event.
event | Event. |
__STATIC_INLINE bool nrf_power_event_get_and_clear | ( | 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.
event | Event. |
true | If the event was set. |
false | If the event was not set. |
__STATIC_INLINE uint8_t nrf_power_gpregret2_get | ( | void | ) |
Get general purpose retention register 2.
__STATIC_INLINE void nrf_power_gpregret2_set | ( | uint8_t | val | ) |
Set general purpose retention register 2.
val | Value to be set in the register |
__STATIC_INLINE uint8_t nrf_power_gpregret_get | ( | void | ) |
Get general purpose retention register.
__STATIC_INLINE void nrf_power_gpregret_set | ( | uint8_t | val | ) |
Set general purpose retention register.
val | Value to be set in the register |
__STATIC_INLINE void nrf_power_int_disable | ( | uint32_t | int_mask | ) |
Function for disabling selected interrupts.
int_mask | Interrupts mask. |
__STATIC_INLINE void nrf_power_int_enable | ( | uint32_t | int_mask | ) |
Function for enabling selected interrupts.
int_mask | Interrupts mask. |
__STATIC_INLINE bool nrf_power_int_enable_check | ( | uint32_t | int_mask | ) |
Function for retrieving the state of selected interrupts.
int_mask | Interrupts mask. |
true | If any of selected interrupts is enabled. |
false | If none of selected interrupts is enabled. |
__STATIC_INLINE uint32_t nrf_power_int_enable_get | ( | void | ) |
Function for retrieving the information about enabled interrupts.
__STATIC_INLINE nrf_power_mainregstatus_t nrf_power_mainregstatus_get | ( | void | ) |
Get main supply status.
__STATIC_INLINE nrf_power_pof_thr_t nrf_power_pofcon_get | ( | bool * | p_enabled | ) |
Get power failure comparator configuration.
Get power failure comparator threshold and enable bit.
[out] | p_enabled | Function would set this boolean variable to true if power failure comparator is enabled. The pointer can be NULL if we do not need this information. |
__STATIC_INLINE void nrf_power_pofcon_set | ( | bool | enabled, |
nrf_power_pof_thr_t | thr | ||
) |
Set power failure comparator configuration.
Sets power failure comparator threshold and enable/disable flag.
enabled | Set to true if power failure comparator should be enabled. |
thr | Set the voltage threshold value. |
__STATIC_INLINE nrf_power_pof_thrvddh_t nrf_power_pofcon_vddh_get | ( | void | ) |
Get VDDH power failure comparator threshold.
__STATIC_INLINE void nrf_power_pofcon_vddh_set | ( | nrf_power_pof_thrvddh_t | thr | ) |
Set VDDH power failure comparator threshold.
thr | Threshold to be set |
__STATIC_INLINE uint32_t nrf_power_rampower_mask_get | ( | uint8_t | block | ) |
Get the mask of ON and retention sections in selected RAM block.
block | RAM block index. |
__STATIC_INLINE void nrf_power_rampower_mask_off | ( | uint8_t | block, |
uint32_t | section_mask | ||
) |
Turn ON sections in selected RAM block.
This function turns OFF sections in block and also block retention.
block | RAM block index. |
section_mask | Mask of the sections created by merging nrf_power_rampower_mask_t flags. |
__STATIC_INLINE void nrf_power_rampower_mask_on | ( | uint8_t | block, |
uint32_t | section_mask | ||
) |
Turn ON sections in selected RAM block.
This function turns ON sections in block and also block retention.
block | RAM block index. |
section_mask | Mask of the sections created by merging nrf_power_rampower_mask_t flags. |
__STATIC_INLINE uint32_t nrf_power_ramstatus_get | ( | void | ) |
Get RAMSTATUS register.
Returns the masks of RAM blocks that are powered ON.
__STATIC_INLINE void nrf_power_resetreas_clear | ( | uint32_t | mask | ) |
Clear selected reset reason field.
Function clears selected reset reason fields.
[in] | mask | The mask constructed from nrf_power_resetreas_mask_t enumerator values. |
__STATIC_INLINE uint32_t nrf_power_resetreas_get | ( | void | ) |
Get reset reason mask.
Function returns the reset reason. 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 are flagged, this indicates that the chip was reset from the on-chip reset generator, which indicates a power-on-reset or a brown out reset.
__STATIC_INLINE void nrf_power_system_off | ( | void | ) |
Go to system OFF.
This function puts the CPU into system off mode. The only way to wake up the CPU is by reset.
__STATIC_INLINE uint32_t nrf_power_task_address_get | ( | nrf_power_task_t | task | ) |
Function for returning the address of a specific POWER task register.
task | Task. |
__STATIC_INLINE void nrf_power_task_trigger | ( | nrf_power_task_t | task | ) |
Function for activating a specific POWER task.
task | Task. |
__STATIC_INLINE uint32_t nrf_power_usbregstatus_get | ( | void | ) |
__STATIC_INLINE bool nrf_power_usbregstatus_outrdy_get | ( | void | ) |
USB supply output settling time elapsed.
false | USBREG output settling time not elapsed |
true | USBREG output settling time elapsed (same information as USBPWRRDY event) |
__STATIC_INLINE bool nrf_power_usbregstatus_vbusdet_get | ( | void | ) |
VBUS input detection status.
USBDETECTED and USBREMOVED events are derived from this information
false | VBUS voltage below valid threshold |
true | VBUS voltage above valid threshold |