![]() |
nrfx 4.5.0
|
Hardware access layer for managing the Low Frequency 32 KHz RC Oscillator (LFRC). More...
Data Structures | |
| struct | nrf_lfrc_config_t |
| LFRC override configuration. More... | |
Enumerations | |
| enum | nrf_lfrc_task_t { NRF_LFRC_TASK_CAL = offsetof(NRF_LFRC_Type, TASKS_CAL) , NRF_LFRC_TASK_CANCELCAL = offsetof(NRF_LFRC_Type, TASKS_CANCELCAL) } |
| LFRC tasks. More... | |
| enum | nrf_lfrc_event_t { NRF_LFRC_EVENT_CALDONE = offsetof(NRF_LFRC_Type, EVENTS_CALDONE) , NRF_LFRC_EVENT_TRIMDONE = offsetof(NRF_LFRC_Type, EVENTS_TRIMDONE) , NRF_LFRC_EVENT_TRIMERROR = offsetof(NRF_LFRC_Type, EVENTS_TRIMERROR) , NRF_LFRC_EVENT_CKSYNSTARTED = offsetof(NRF_LFRC_Type, EVENTS_CKSYNSTARTED) , NRF_LFRC_EVENT_CKLFRCSTARTED = offsetof(NRF_LFRC_Type, EVENTS_CKLFRCSTARTED) } |
| LFRC events. More... | |
| enum | nrf_lfrc_int_mask_t { NRF_LFRC_INT_CALDONE_MASK = LFRC_INTENSET_CALDONE_Msk , NRF_LFRC_INT_TRIMDONE_MASK = LFRC_INTENSET_TRIMDONE_Msk , NRF_LFRC_INT_TRIMERROR_MASK = LFRC_INTENSET_TRIMERROR_Msk , NRF_LFRC_INT_CKSYNSTARTED_MASK = LFRC_INTENSET_CKSYNSTARTED_Msk , NRF_LFRC_INT_CKLFRCSTARTED_MASK = LFRC_INTENSET_CKLFRCSTARTED_Msk } |
| LFRC interrupts. More... | |
| enum | nrf_lfrc_cal_cycle_length_t { NRF_LFRC_CAL_CYCLE_LENGTH_64 = LFRC_CAL_LENGTH_LENGTH_N64 , NRF_LFRC_CAL_CYCLE_LENGTH_128 = LFRC_CAL_LENGTH_LENGTH_N128 , NRF_LFRC_CAL_CYCLE_LENGTH_256 = LFRC_CAL_LENGTH_LENGTH_N256 , NRF_LFRC_CAL_CYCLE_LENGTH_512 = LFRC_CAL_LENGTH_LENGTH_N512 } |
| Number of measurement cycles used during calibration. More... | |
| enum | nrf_lfrc_power_control_t { NRF_LFRC_POWER_CONTROL_AUTO = LFRC_PWRUPCTRL_CTRL_Auto , NRF_LFRC_POWER_CONTROL_POWER_UP = LFRC_PWRUPCTRL_CTRL_PowerUp , NRF_LFRC_POWER_CONTROL_POWER_DOWN = LFRC_PWRUPCTRL_CTRL_PowerDown } |
| Power up control. More... | |
Functions | |
| NRF_STATIC_INLINE uint32_t | nrf_lfrc_task_address_get (NRF_LFRC_Type const *p_reg, nrf_lfrc_task_t task) |
| Function for retrieving the address of the specified task. | |
| NRF_STATIC_INLINE void | nrf_lfrc_task_trigger (NRF_LFRC_Type *p_reg, nrf_lfrc_task_t task) |
| Function for setting the specified task. | |
| NRF_STATIC_INLINE uint32_t | nrf_lfrc_event_address_get (NRF_LFRC_Type const *p_reg, nrf_lfrc_event_t event) |
| Function for retrieving the address of the specified event. | |
| NRF_STATIC_INLINE void | nrf_lfrc_event_clear (NRF_LFRC_Type *p_reg, nrf_lfrc_event_t event) |
| Function for clearing the specified event. | |
| NRF_STATIC_INLINE bool | nrf_lfrc_event_check (NRF_LFRC_Type const *p_reg, nrf_lfrc_event_t event) |
| Function for retrieving the state of the specified event. | |
| NRF_STATIC_INLINE void | nrf_lfrc_int_enable (NRF_LFRC_Type *p_reg, uint32_t mask) |
| Function for enabling the specified interrupt. | |
| NRF_STATIC_INLINE void | nrf_lfrc_int_disable (NRF_LFRC_Type *p_reg, uint32_t mask) |
| Function for disabling the specified interrupt. | |
| NRF_STATIC_INLINE uint32_t | nrf_lfrc_int_enable_check (NRF_LFRC_Type const *p_reg, uint32_t mask) |
| Function for checking if the specified interrupts are enabled. | |
| NRF_STATIC_INLINE uint32_t | nrf_lfrc_int_pending_get (NRF_LFRC_Type const *p_reg) |
| Function for retrieving the state of pending interrupts. | |
| NRF_STATIC_INLINE int32_t | nrf_lfrc_trim_status_get (NRF_LFRC_Type const *p_reg) |
| Function for getting current trimming value of the LFRCOSC. | |
| NRF_STATIC_INLINE bool | nrf_lfrc_statusana_ready_check (NRF_LFRC_Type const *p_reg) |
| Function for checking status of analog module READY signal. | |
| NRF_STATIC_INLINE bool | nrf_lfrc_statusana_settled_check (NRF_LFRC_Type const *p_reg) |
| Function for checking status of analog module SETTLED signal. | |
| NRF_STATIC_INLINE void | nrf_lfrc_config_set (NRF_LFRC_Type *p_reg, nrf_lfrc_config_t const *p_config) |
| Function for override the configuration. | |
| NRF_STATIC_INLINE void | nrf_lfrc_cal_cycle_length_set (NRF_LFRC_Type *p_reg, nrf_lfrc_cal_cycle_length_t length) |
| Function for setting measurement cycle count length used while calibration. | |
| NRF_STATIC_INLINE void | nrf_lfrc_cal_trim_limit_low_set (NRF_LFRC_Type *p_reg, uint32_t trimlimit) |
| Function for setting lower trim limit. | |
| NRF_STATIC_INLINE void | nrf_lfrc_cal_trim_limit_high_set (NRF_LFRC_Type *p_reg, uint32_t trimlimit) |
| Function for setting higher trim limit. | |
| NRF_STATIC_INLINE uint32_t | nrf_lfrc_cal_result_get (NRF_LFRC_Type const *p_reg, uint8_t number) |
| Function for reading calibration results. | |
| NRF_STATIC_INLINE uint16_t | nrf_lfrc_cal_num_of_cycles_get (NRF_LFRC_Type const *p_reg) |
| Function for reading number of cycles when the CAL signal is high. | |
| NRF_STATIC_INLINE void | nrf_lfrc_power_control_set (NRF_LFRC_Type *p_reg, nrf_lfrc_power_control_t pwrctrl) |
| Function for power control set. | |
Hardware access layer for managing the Low Frequency 32 KHz RC Oscillator (LFRC).
| enum nrf_lfrc_event_t |
| enum nrf_lfrc_int_mask_t |
LFRC interrupts.
| enum nrf_lfrc_task_t |
| NRF_STATIC_INLINE void nrf_lfrc_cal_cycle_length_set | ( | NRF_LFRC_Type * | p_reg, |
| nrf_lfrc_cal_cycle_length_t | length ) |
Function for setting measurement cycle count length used while calibration.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | length | Number of cycles. |
| NRF_STATIC_INLINE uint16_t nrf_lfrc_cal_num_of_cycles_get | ( | NRF_LFRC_Type const * | p_reg | ) |
Function for reading number of cycles when the CAL signal is high.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE uint32_t nrf_lfrc_cal_result_get | ( | NRF_LFRC_Type const * | p_reg, |
| uint8_t | number ) |
Function for reading calibration results.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | number | Result number. |
| NRF_STATIC_INLINE void nrf_lfrc_cal_trim_limit_high_set | ( | NRF_LFRC_Type * | p_reg, |
| uint32_t | trimlimit ) |
Function for setting higher trim limit.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | trimlimit | TRIM limit value. |
| NRF_STATIC_INLINE void nrf_lfrc_cal_trim_limit_low_set | ( | NRF_LFRC_Type * | p_reg, |
| uint32_t | trimlimit ) |
Function for setting lower trim limit.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | trimlimit | TRIM limit value. |
| NRF_STATIC_INLINE void nrf_lfrc_config_set | ( | NRF_LFRC_Type * | p_reg, |
| nrf_lfrc_config_t const * | p_config ) |
Function for override the configuration.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_config | Configuration parameters. |
| NRF_STATIC_INLINE uint32_t nrf_lfrc_event_address_get | ( | NRF_LFRC_Type const * | p_reg, |
| nrf_lfrc_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 | LFRC Event. |
| NRF_STATIC_INLINE bool nrf_lfrc_event_check | ( | NRF_LFRC_Type const * | p_reg, |
| nrf_lfrc_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_lfrc_event_clear | ( | NRF_LFRC_Type * | p_reg, |
| nrf_lfrc_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_lfrc_int_disable | ( | NRF_LFRC_Type * | p_reg, |
| uint32_t | mask ) |
Function for disabling the specified interrupt.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be disabled. Use nrf_lfrc_int_mask_t values for bit masking. |
| NRF_STATIC_INLINE void nrf_lfrc_int_enable | ( | NRF_LFRC_Type * | p_reg, |
| uint32_t | mask ) |
Function for enabling the specified interrupt.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be enabled. Use nrf_lfrc_int_mask_t values for bit masking. |
| NRF_STATIC_INLINE uint32_t nrf_lfrc_int_enable_check | ( | NRF_LFRC_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_lfrc_int_mask_t values for bit masking. |
| NRF_STATIC_INLINE uint32_t nrf_lfrc_int_pending_get | ( | NRF_LFRC_Type const * | p_reg | ) |
Function for retrieving the state of pending interrupts.
States of pending interrupt are saved as a bitmask. One set at particular position means that interrupt for event is pending.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE void nrf_lfrc_power_control_set | ( | NRF_LFRC_Type * | p_reg, |
| nrf_lfrc_power_control_t | pwrctrl ) |
Function for power control set.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | pwrctrl | Power up control. |
| NRF_STATIC_INLINE bool nrf_lfrc_statusana_ready_check | ( | NRF_LFRC_Type const * | p_reg | ) |
Function for checking status of analog module READY signal.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | The signal is logic 1. |
| false | The signal is logic 0. |
| NRF_STATIC_INLINE bool nrf_lfrc_statusana_settled_check | ( | NRF_LFRC_Type const * | p_reg | ) |
Function for checking status of analog module SETTLED signal.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| true | The signal is logic 1. |
| false | The signal is logic 0. |
| NRF_STATIC_INLINE uint32_t nrf_lfrc_task_address_get | ( | NRF_LFRC_Type const * | p_reg, |
| nrf_lfrc_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 | LFRC Task. |
| NRF_STATIC_INLINE void nrf_lfrc_task_trigger | ( | NRF_LFRC_Type * | p_reg, |
| nrf_lfrc_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. |
| NRF_STATIC_INLINE int32_t nrf_lfrc_trim_status_get | ( | NRF_LFRC_Type const * | p_reg | ) |
Function for getting current trimming value of the LFRCOSC.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |