Hardware access layer for managing the Low Frequency Clock Multiplexer. More...
Macros | |
#define | NRF_LFCLOCKMUX NRF_CLOCK |
Clock component name redefinition. | |
Typedefs | |
typedef NRF_CLOCK_Type | NRF_LFCLOCKMUX_Type |
Clock component type redefinition. | |
Enumerations | |
enum | nrf_lfclockmux_task_t { NRF_LFCLOCKMUX_TASK_LFCLKSTART = offsetof(NRF_LFCLOCKMUX_Type, TASKS_LFCLKSTART) , NRF_LFCLOCKMUX_TASK_LFCLKSTOP = offsetof(NRF_LFCLOCKMUX_Type, TASKS_LFCLKSTOP) } |
Tasks. More... | |
enum | nrf_lfclockmux_event_t { NRF_LFCLOCKMUX_EVENT_LFCLKSTARTED = offsetof(NRF_LFCLOCKMUX_Type, EVENTS_LFCLKSTARTED) , NRF_LFCLOCKMUX_EVENT_LFCLKSRCCHANGED = offsetof(NRF_LFCLOCKMUX_Type, EVENTS_LFCLKSRCCHANGED) } |
Events. More... | |
enum | nrf_lfclockmux_int_mask_t { NRF_LFCLOCKMUX_INT_LFCLKSTARTED_MASK = CLOCK_INTENSET_LFCLKSTARTED_Msk , NRF_LFCLOCKMUX_INT_LFCLKSRCCHANGED_MASK = CLOCK_INTENSET_LFCLKSRCCHANGED_Msk } |
Interrupts. More... | |
enum | nrf_lfclockmux_source_t { NRF_LFCLOCKMUX_SOURCE_LPRC = (CLOCK_LFCLKSTAT_SRC_LFLPRC_Active << CLOCK_LFCLKSTAT_SRC_LFLPRC_Pos) , NRF_LFCLOCKMUX_SOURCE_RC = (CLOCK_LFCLKSTAT_SRC_LFRC_Active << CLOCK_LFCLKSTAT_SRC_LFRC_Pos) , NRF_LFCLOCKMUX_SOURCE_XTAL = (CLOCK_LFCLKSTAT_SRC_LFXO_Active << CLOCK_LFCLKSTAT_SRC_LFXO_Pos) , NRF_LFCLOCKMUX_SOURCE_SYNTH = (CLOCK_LFCLKSTAT_SRC_SYNTH_Active << CLOCK_LFCLKSTAT_SRC_SYNTH_Pos) , NRF_LFCLOCKMUX_SOURCE_LPRC_XTAL = NRF_LFCLOCKMUX_SOURCE_LPRC | NRF_LFCLOCKMUX_SOURCE_XTAL , NRF_LFCLOCKMUX_SOURCE_RC_XTAL = NRF_LFCLOCKMUX_SOURCE_RC | NRF_LFCLOCKMUX_SOURCE_XTAL , NRF_LFCLOCKMUX_SOURCE_SYNTH_XTAL = NRF_LFCLOCKMUX_SOURCE_SYNTH | NRF_LFCLOCKMUX_SOURCE_XTAL } |
Low-frequency clock sources. More... | |
Functions | |
NRF_STATIC_INLINE uint32_t | nrf_lfclockmux_task_address_get (NRF_LFCLOCKMUX_Type const *p_reg, nrf_lfclockmux_task_t task) |
Function for retrieving the address of the specified task. | |
NRF_STATIC_INLINE void | nrf_lfclockmux_task_trigger (NRF_LFCLOCKMUX_Type *p_reg, nrf_lfclockmux_task_t task) |
Function for setting the specified task. | |
NRF_STATIC_INLINE uint32_t | nrf_lfclockmux_event_address_get (NRF_LFCLOCKMUX_Type const *p_reg, nrf_lfclockmux_event_t event) |
Function for retrieving the address of the specified event. | |
NRF_STATIC_INLINE void | nrf_lfclockmux_event_clear (NRF_LFCLOCKMUX_Type *p_reg, nrf_lfclockmux_event_t event) |
Function for clearing the specified event. | |
NRF_STATIC_INLINE bool | nrf_lfclockmux_event_check (NRF_LFCLOCKMUX_Type const *p_reg, nrf_lfclockmux_event_t event) |
Function for retrieving the state of the specified event. | |
NRF_STATIC_INLINE void | nrf_lfclockmux_int_enable (NRF_LFCLOCKMUX_Type *p_reg, uint32_t mask) |
Function for enabling the specified interrupts. | |
NRF_STATIC_INLINE void | nrf_lfclockmux_int_disable (NRF_LFCLOCKMUX_Type *p_reg, uint32_t mask) |
Function for disabling the specified interrupts. | |
NRF_STATIC_INLINE uint32_t | nrf_lfclockmux_int_enable_check (NRF_LFCLOCKMUX_Type const *p_reg, uint32_t mask) |
Function for checking if the specified interrupts are enabled. | |
NRF_STATIC_INLINE uint32_t | nrf_lfclockmux_int_pending_get (NRF_LFCLOCKMUX_Type const *p_reg) |
Function for retrieving the state of pending interrupts. | |
NRF_STATIC_INLINE bool | nrf_lfclockmux_stat_run_check (NRF_LFCLOCKMUX_Type const *p_reg) |
Function for retrieving the trigger status of the task START for LF clock. | |
NRF_STATIC_INLINE nrf_lfclockmux_source_t | nrf_lfclockmux_stat_src_get (NRF_LFCLOCKMUX_Type const *p_reg) |
Function for retrieving the status indicating which clock source is running for LF clock. | |
NRF_STATIC_INLINE void | nrf_lfclockmux_lf_src_set (NRF_LFCLOCKMUX_Type *p_reg, nrf_lfclockmux_source_t source) |
Function for changing the low-frequency clock source. | |
NRF_STATIC_INLINE nrf_lfclockmux_source_t | nrf_lfclockmux_lf_src_get (NRF_LFCLOCKMUX_Type const *p_reg) |
Function for retrieving the selected source for the low-frequency clock. | |
NRF_STATIC_INLINE void | nrf_lfclockmux_alwaysrun_set (NRF_LFCLOCKMUX_Type *p_reg, bool alwaysrun) |
Function for setting the LF clock domain to always run. | |
NRF_STATIC_INLINE bool | nrf_lfclockmux_alwaysrun_get (NRF_LFCLOCKMUX_Type const *p_reg) |
Function for checking if the LF clock domain is configured to always run. | |
NRF_STATIC_INLINE void | nrf_lfclockmux_config_reset_set (NRF_LFCLOCKMUX_Type *p_reg, bool en) |
Function controls reset to the LF CLOCK MUX peripheral. | |
NRF_STATIC_INLINE void | nrf_lfclockmux_config_bypass_set (NRF_LFCLOCKMUX_Type *p_reg, nrf_lfclockmux_source_t source) |
Function for enabling bypass. | |
NRF_STATIC_INLINE void | nrf_lfclockmux_config_timeout_set (NRF_LFCLOCKMUX_Type *p_reg, uint8_t timeout) |
Function for setting the timeout value for the clock alignment procedure. | |
NRF_STATIC_INLINE uint8_t | nrf_lfclockmux_config_timeout_get (NRF_LFCLOCKMUX_Type const *p_reg) |
Function for getting the timeout value for the clock alignment procedure. | |
NRF_STATIC_INLINE void | nrf_lfclockmux_config_threshold_set (NRF_LFCLOCKMUX_Type *p_reg, uint8_t thr_low, uint8_t thr_high, uint8_t thr_diff) |
Function for setting threshold limit while clock switching. | |
Hardware access layer for managing the Low Frequency Clock Multiplexer.
Low-frequency clock sources.
Used by LFCLKCTRL and LFCLKSTAT.SRC registers.
NRF_STATIC_INLINE bool nrf_lfclockmux_alwaysrun_get | ( | NRF_LFCLOCKMUX_Type const * | p_reg | ) |
Function for checking if the LF clock domain is configured to always run.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
true | The LF clock domain is configured to always run. |
false | The LF clock domain is not configured to always run. |
NRF_STATIC_INLINE void nrf_lfclockmux_alwaysrun_set | ( | NRF_LFCLOCKMUX_Type * | p_reg, |
bool | alwaysrun | ||
) |
Function for setting the LF clock domain to always run.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | alwaysrun | Ensure the clock is always running. |
NRF_STATIC_INLINE void nrf_lfclockmux_config_bypass_set | ( | NRF_LFCLOCKMUX_Type * | p_reg, |
nrf_lfclockmux_source_t | source | ||
) |
Function for enabling bypass.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | source | Bypass source. |
NRF_STATIC_INLINE void nrf_lfclockmux_config_reset_set | ( | NRF_LFCLOCKMUX_Type * | p_reg, |
bool | en | ||
) |
Function controls reset to the LF CLOCK MUX peripheral.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | en | Enable reset. |
NRF_STATIC_INLINE void nrf_lfclockmux_config_threshold_set | ( | NRF_LFCLOCKMUX_Type * | p_reg, |
uint8_t | thr_low, | ||
uint8_t | thr_high, | ||
uint8_t | thr_diff | ||
) |
Function for setting threshold limit while clock switching.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | thr_low | Threshold low limit while clock switching. |
[in] | thr_high | Threshold high limit while clock switching. |
[in] | thr_diff | Threshold difference while clock switching. |
NRF_STATIC_INLINE uint8_t nrf_lfclockmux_config_timeout_get | ( | NRF_LFCLOCKMUX_Type const * | p_reg | ) |
Function for getting the timeout value for the clock alignment procedure.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
Number | of 32Ki clocks. |
NRF_STATIC_INLINE void nrf_lfclockmux_config_timeout_set | ( | NRF_LFCLOCKMUX_Type * | p_reg, |
uint8_t | timeout | ||
) |
Function for setting the timeout value for the clock alignment procedure.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | timeout | Number of 32Ki clocks. |
NRF_STATIC_INLINE uint32_t nrf_lfclockmux_event_address_get | ( | NRF_LFCLOCKMUX_Type const * | p_reg, |
nrf_lfclockmux_event_t | event | ||
) |
Function for retrieving the address of the specified event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | LFCLOCKMUX Event. |
NRF_STATIC_INLINE bool nrf_lfclockmux_event_check | ( | NRF_LFCLOCKMUX_Type const * | p_reg, |
nrf_lfclockmux_event_t | event | ||
) |
Function for retrieving the state of the specified 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_lfclockmux_event_clear | ( | NRF_LFCLOCKMUX_Type * | p_reg, |
nrf_lfclockmux_event_t | event | ||
) |
Function for clearing the specified event.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | event | Event to clear. |
NRF_STATIC_INLINE void nrf_lfclockmux_int_disable | ( | NRF_LFCLOCKMUX_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for disabling the specified interrupts.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be disabled. Use nrf_lfclockmux_int_mask_t values for bit masking. |
NRF_STATIC_INLINE void nrf_lfclockmux_int_enable | ( | NRF_LFCLOCKMUX_Type * | p_reg, |
uint32_t | mask | ||
) |
Function for enabling the specified interrupts.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | mask | Mask of interrupts to be enabled. Use nrf_lfclockmux_int_mask_t values for bit masking. |
NRF_STATIC_INLINE uint32_t nrf_lfclockmux_int_enable_check | ( | NRF_LFCLOCKMUX_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_lfclockmux_int_mask_t values for bit masking. |
NRF_STATIC_INLINE uint32_t nrf_lfclockmux_int_pending_get | ( | NRF_LFCLOCKMUX_Type const * | p_reg | ) |
Function for retrieving the state of pending interrupts.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE nrf_lfclockmux_source_t nrf_lfclockmux_lf_src_get | ( | NRF_LFCLOCKMUX_Type const * | p_reg | ) |
Function for retrieving the selected source for the low-frequency clock.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE void nrf_lfclockmux_lf_src_set | ( | NRF_LFCLOCKMUX_Type * | p_reg, |
nrf_lfclockmux_source_t | source | ||
) |
Function for changing the low-frequency clock source.
Check in Product Specification if this function can be called when the low-frequency clock is running.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | source | New low-frequency clock source. |
NRF_STATIC_INLINE bool nrf_lfclockmux_stat_run_check | ( | NRF_LFCLOCKMUX_Type const * | p_reg | ) |
Function for retrieving the trigger status of the task START for LF clock.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
false | The task START for the LF clock has not been triggered. |
true | The task START for the LF clock has been triggered. |
NRF_STATIC_INLINE nrf_lfclockmux_source_t nrf_lfclockmux_stat_src_get | ( | NRF_LFCLOCKMUX_Type const * | p_reg | ) |
Function for retrieving the status indicating which clock source is running for LF clock.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
NRF_STATIC_INLINE uint32_t nrf_lfclockmux_task_address_get | ( | NRF_LFCLOCKMUX_Type const * | p_reg, |
nrf_lfclockmux_task_t | task | ||
) |
Function for retrieving the address of the specified task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | LFCLOCKMUX Task. |
NRF_STATIC_INLINE void nrf_lfclockmux_task_trigger | ( | NRF_LFCLOCKMUX_Type * | p_reg, |
nrf_lfclockmux_task_t | task | ||
) |
Function for setting the specified task.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | task | Task to be activated. |