![]() |
nrfx 4.5.0
|
Hardware access layer for managing the Global Real Time Counter (GRTC) peripheral. More...
Macros | |
| #define | NRF_GRTC_HAS_PWM 1 |
| Symbol indicating whether GRTC has PWM registers. | |
| #define | NRF_GRTC_HAS_CLKOUT 1 |
| Symbol indicating whether GRTC has clock output registers. | |
| #define | NRF_GRTC_HAS_CLKSEL 1 |
| Symbol indicating whether GRTC has clock source selection. | |
| #define | NRF_GRTC_HAS_CLKSEL_LFLPRC 1 |
| Symbol indicating whether RC oscillator clock source is available. | |
| #define | NRF_GRTC_HAS_CLKSEL_LFXO 1 |
| Symbol indicating whether crystal oscillator clock source is available. | |
| #define | NRF_GRTC_HAS_SYSCOUNTER_ARRAY 1 |
| Symbol indicating whether GRTC has multiple SYSCOUNTER registers. | |
| #define | NRF_GRTC_HAS_SYSCOUNTERVALID 1 |
| Symbol indicating whether SYSCOUNTERVALID event is present. | |
| #define | NRF_GRTC_HAS_SYSCOUNTER_LOADED 1 |
| Symbol indicating whether SYSCOUNTERH LOADED bit is present. | |
| #define | NRF_GRTC_HAS_KEEPRUNNING 1 |
| Symbol indicating whether KEEPRUNNING register is present. | |
| #define | NRF_GRTC_HAS_MINTERVAL 1 |
| Symbol indicating whether MINTERVAL register is present. | |
| #define | NRF_GRTC_HAS_INTERVAL 1 |
| Symbol indicating whether INTERVAL register is present. | |
| #define | NRF_GRTC_HAS_RTCOUNTER 1 |
| Symbol indicating whether GRTC has RTCOUNTER. | |
| #define | NRF_GRTC_HAS_RTCOMPARESYNC 1 |
| Symbol indicating whether RTCOMPARE synchronization event is present. | |
| #define | NRF_GRTC_HAS_EXTENDED 1 |
| Symbol indicating whether GRTC has extended functionality. | |
| #define | NRF_GRTC_HAS_INT_GROUPS 1 |
| Symbol indicating whether GRTC interrupt groups are present. | |
| #define | NRF_GRTC_DOMAIN_INDEX GRTC_IRQ_GROUP |
| Symbol indicating actual domain index. | |
| #define | GRTC_SYSCOUNTER SYSCOUNTER[NRF_GRTC_DOMAIN_INDEX] |
| Symbol indicating actual SYSCOUNTER index. | |
| #define | NRF_GRTC_SYSCOUNTER_COUNT GRTC_SYSCOUNTER_MaxCount |
| Number of capture/compare channels for SYSCOUNTER. | |
| #define | NRF_GRTC_INTERVAL_MAX_VALUE (GRTC_INTERVAL_VALUE_Msk >> GRTC_INTERVAL_VALUE_Pos) |
| Maximum value of INTERVAL register content. | |
| #define | NRF_GRTC_MINTERVAL_MAX_VALUE (GRTC_MINTERVAL_VALUE_Msk >> GRTC_MINTERVAL_VALUE_Pos) |
| Maximum value of MINTERVAL register content. | |
| #define | NRF_GRTC_MINTERVAL_COUNT GRTC_MINTERVAL_MaxCount |
| Number of MINTERVAL registers. | |
| #define | GRTC_INTEN NRFX_CONCAT_2(INTEN, GRTC_IRQ_GROUP) |
| Interrupts INTEN register definition. | |
| #define | GRTC_INTENSET NRFX_CONCAT_2(INTENSET, GRTC_IRQ_GROUP) |
| Interrupts INTENSET register definition. | |
| #define | GRTC_INTENCLR NRFX_CONCAT_2(INTENCLR, GRTC_IRQ_GROUP) |
| Interrupts INTENCLR register definition. | |
| #define | GRTC_INTPEND NRFX_CONCAT_2(INTPEND, GRTC_IRQ_GROUP) |
| Interrupts INTPEND register definition. | |
| #define | NRF_GRTC_SYSCOUNTER_MAIN_FREQUENCY_HZ 1000000UL |
| Main SYSCOUNTER frequency in Hz. | |
| #define | NRF_GRTC_SYSCOUNTER_CC_COUNT GRTC_CC_MaxCount |
| Number of capture/compare channels for SYSCOUNTER. | |
| #define | NRF_GRTC_SYSCOUNTER_CCH_MASK GRTC_CC_CCH_CCH_Msk |
| Bitmask of the higher 32-bits of capture/compare register for the SYSCOUNTER. | |
| #define | NRF_GRTC_SYSCOUNTER_CCADD_MASK GRTC_CC_CCADD_VALUE_Msk |
| Bitmask of CCADD register for the SYSCOUNTER. | |
| #define | NRF_GRTC_SYSCOUNTERL_VALUE_MASK GRTC_SYSCOUNTERL_VALUE_Msk |
| Bitmask of the lower part of the SYSCOUNTER value. | |
| #define | NRF_GRTC_SYSCOUNTERH_VALUE_MASK GRTC_SYSCOUNTERH_VALUE_Msk |
| Bitmask of the higher part of the SYSCOUNTER value. | |
| #define | NRF_GRTC_RTCOUNTER_CCH_MASK GRTC_RTCOMPAREH_VALUE_Msk |
| Bitmask of the higher 32-bits of capture/compare register for the RTCOUNTER. | |
| #define | NRF_GRTC_SYSCOUNTERH_OVERFLOW_MASK GRTC_SYSCOUNTERH_OVERFLOW_Msk |
| Bitmask of the OVERFLOW bit. | |
| #define | NRF_GRTC_SYSCOUNTERH_BUSY_MASK GRTC_SYSCOUNTERH_BUSY_Msk |
| Bitmask of the BUSY bit. | |
| #define | NRF_GRTC_TIMEOUT_MAX_VALUE (GRTC_TIMEOUT_VALUE_Msk >> GRTC_TIMEOUT_VALUE_Pos) |
| Maximum value of TIMEOUT register content. | |
| #define | NRF_GRTC_WAKETIME_MAX_VALUE (GRTC_WAKETIME_VALUE_Msk >> GRTC_WAKETIME_VALUE_Pos) |
| Maximum value of WAKETIME register content. | |
| #define | NRF_GRTC_CLKCFG_CLKFASTDIV_MAX_VALUE GRTC_CLKCFG_CLKFASTDIV_Max |
| Maximum value of CLKFASTDIV register content. | |
| #define | NRF_GRTC_CHANNEL_INT_MASK(ch) |
| Macro for creating the interrupt bitmask for the specified compare channel. | |
| #define | NRF_GRTC_INTEN_MASK NRFX_BIT_MASK(GRTC_CC_MaxCount) |
| Bitmask of interrupt enable. | |
| #define | NRF_GRTC_SYSCOUNTER_ALL_CHANNELS_INT_MASK ((uint32_t)(((1 << NRF_GRTC_SYSCOUNTER_CC_COUNT) - 1) << GRTC_INTEN0_COMPARE0_Pos)) |
| Mask for all channels represented by CC channels. | |
Enumerations | |
| enum | nrf_grtc_task_t { NRF_GRTC_TASK_START = offsetof(NRF_GRTC_Type, TASKS_START) , NRF_GRTC_TASK_STOP = offsetof(NRF_GRTC_Type, TASKS_STOP) , NRF_GRTC_TASK_CLEAR = offsetof(NRF_GRTC_Type, TASKS_CLEAR) , NRF_GRTC_TASK_PWM_START = offsetof(NRF_GRTC_Type, TASKS_PWMSTART) , NRF_GRTC_TASK_PWM_STOP = offsetof(NRF_GRTC_Type, TASKS_PWMSTOP) , NRF_GRTC_TASK_CAPTURE_0 = offsetof(NRF_GRTC_Type, TASKS_CAPTURE[0]) , NRF_GRTC_TASK_CAPTURE_1 = offsetof(NRF_GRTC_Type, TASKS_CAPTURE[1]) , NRF_GRTC_TASK_CAPTURE_2 = offsetof(NRF_GRTC_Type, TASKS_CAPTURE[2]) , NRF_GRTC_TASK_CAPTURE_3 = offsetof(NRF_GRTC_Type, TASKS_CAPTURE[3]) , NRF_GRTC_TASK_CAPTURE_4 = offsetof(NRF_GRTC_Type, TASKS_CAPTURE[4]) , NRF_GRTC_TASK_CAPTURE_5 = offsetof(NRF_GRTC_Type, TASKS_CAPTURE[5]) } |
| GRTC tasks. More... | |
| enum | nrf_grtc_event_t { NRF_GRTC_EVENT_COMPARE_0 = offsetof(NRF_GRTC_Type, EVENTS_COMPARE[0]) , NRF_GRTC_EVENT_COMPARE_1 = offsetof(NRF_GRTC_Type, EVENTS_COMPARE[1]) , NRF_GRTC_EVENT_COMPARE_2 = offsetof(NRF_GRTC_Type, EVENTS_COMPARE[2]) , NRF_GRTC_EVENT_COMPARE_3 = offsetof(NRF_GRTC_Type, EVENTS_COMPARE[3]) , NRF_GRTC_EVENT_COMPARE_4 = offsetof(NRF_GRTC_Type, EVENTS_COMPARE[4]) , NRF_GRTC_EVENT_COMPARE_5 = offsetof(NRF_GRTC_Type, EVENTS_COMPARE[5]) , NRF_GRTC_EVENT_RTCOMPARE = offsetof(NRF_GRTC_Type, EVENTS_RTCOMPARE) , NRF_GRTC_EVENT_RTCOMPARESYNC = offsetof(NRF_GRTC_Type, EVENTS_RTCOMPARESYNC) , NRF_GRTC_EVENT_SYSCOUNTERVALID = offsetof(NRF_GRTC_Type, EVENTS_SYSCOUNTERVALID) , NRF_GRTC_EVENT_PWM_PERIOD_END = offsetof(NRF_GRTC_Type, EVENTS_PWMPERIODEND) } |
| GRTC events. More... | |
| enum | nrf_grtc_short_mask_t { NRF_GRTC_SHORT_RTCOMPARE_CLEAR_MASK = GRTC_SHORTS_RTCOMPARE_CLEAR_Msk } |
| Types of GRTC shortcuts. More... | |
| enum | nrf_grtc_cc_add_reference_t { NRF_GRTC_CC_ADD_REFERENCE_SYSCOUNTER = GRTC_CC_CCADD_REFERENCE_SYSCOUNTER , NRF_GRTC_CC_ADD_REFERENCE_CC = GRTC_CC_CCADD_REFERENCE_CC } |
| Types of GRTC CC references. More... | |
| enum | nrf_grtc_int_mask_t { NRF_GRTC_INT_COMPARE0_MASK = GRTC_INTENSET0_COMPARE0_Msk , NRF_GRTC_INT_COMPARE1_MASK = GRTC_INTENSET0_COMPARE1_Msk , NRF_GRTC_INT_COMPARE2_MASK = GRTC_INTENSET0_COMPARE2_Msk , NRF_GRTC_INT_COMPARE3_MASK = GRTC_INTENSET0_COMPARE3_Msk , NRF_GRTC_INT_COMPARE4_MASK = GRTC_INTENSET0_COMPARE4_Msk , NRF_GRTC_INT_COMPARE5_MASK = GRTC_INTENSET0_COMPARE5_Msk , NRF_GRTC_INT_RTCOMPARE_MASK = GRTC_INTENSET0_RTCOMPARE_Msk , NRF_GRTC_INT_RTCOMPARESYNC_MASK = GRTC_INTENSET0_RTCOMPARESYNC_Msk , NRF_GRTC_INT_SYSCOUNTERVALID_MASK = GRTC_INTENSET0_SYSCOUNTERVALID_Msk } |
| GRTC interrupts. More... | |
| enum | nrf_grtc_clkout_t { NRF_GRTC_CLKOUT_32K = GRTC_CLKOUT_CLKOUT32K_Msk , NRF_GRTC_CLKOUT_FAST = GRTC_CLKOUT_CLKOUTFAST_Msk } |
| Configuration of clock output. More... | |
| enum | nrf_grtc_clksel_t { NRF_GRTC_CLKSEL_LFXO = GRTC_CLKCFG_CLKSEL_LFXO , NRF_GRTC_CLKSEL_LFCLK = GRTC_CLKCFG_CLKSEL_SystemLFCLK , NRF_GRTC_CLKSEL_LFLPRC = GRTC_CLKCFG_CLKSEL_LFLPRC } |
| Configuration of the GRTC clock source selection. More... | |
Functions | |
| NRF_STATIC_INLINE void | nrf_grtc_sys_counter_cc_set (NRF_GRTC_Type *p_reg, uint8_t cc_channel, uint64_t cc_value) |
| Function for setting the compare value of channel for the SYSCOUNTER. | |
| NRF_STATIC_INLINE uint64_t | nrf_grtc_sys_counter_cc_get (NRF_GRTC_Type const *p_reg, uint8_t cc_channel) |
| Function for getting the capture/compare value of channel for the SYSCOUNTER. | |
| NRF_STATIC_INLINE void | nrf_grtc_sys_counter_cc_add_set (NRF_GRTC_Type *p_reg, uint8_t cc_channel, uint32_t value, nrf_grtc_cc_add_reference_t reference) |
| Function for setting the value to be added to capture/compare register for the SYSCOUNTER. | |
| NRF_STATIC_INLINE void | nrf_grtc_rt_counter_cc_set (NRF_GRTC_Type *p_reg, uint64_t cc_value, bool sync) |
| Function for setting a compare value for the RTCOUNTER. | |
| NRF_STATIC_INLINE uint64_t | nrf_grtc_rt_counter_cc_get (NRF_GRTC_Type const *p_reg) |
| Function for returning the compare value for the RTCOUNTER. | |
| NRF_STATIC_INLINE void | nrf_grtc_int_enable (NRF_GRTC_Type *p_reg, uint32_t mask) |
| Function for enabling specified interrupts. | |
| NRF_STATIC_INLINE void | nrf_grtc_int_disable (NRF_GRTC_Type *p_reg, uint32_t mask) |
| Function for disabling specified interrupts. | |
| NRF_STATIC_INLINE uint32_t | nrf_grtc_int_enable_check (NRF_GRTC_Type const *p_reg, uint32_t mask) |
| Function for checking if the specified interrupts are enabled. | |
| NRF_STATIC_INLINE uint32_t | nrf_grtc_int_pending_get (NRF_GRTC_Type const *p_reg) |
| Function for retrieving the state of pending interrupts. | |
| NRF_STATIC_INLINE void | nrf_grtc_int_group_enable (NRF_GRTC_Type *p_reg, uint8_t group_idx, uint32_t mask) |
| Function for enabling interrupts in the specified group. | |
| NRF_STATIC_INLINE void | nrf_grtc_int_group_disable (NRF_GRTC_Type *p_reg, uint8_t group_idx, uint32_t mask) |
| Function for disabling interrupts in the specified group. | |
| NRF_STATIC_INLINE uint32_t | nrf_grtc_int_group_enable_check (NRF_GRTC_Type const *p_reg, uint8_t group_idx, uint32_t mask) |
| Function for checking if the specified interrupts from a given group are enabled. | |
| NRF_STATIC_INLINE void | nrf_grtc_event_enable (NRF_GRTC_Type *p_reg, uint32_t mask) |
| Function for enabling events. | |
| NRF_STATIC_INLINE void | nrf_grtc_event_disable (NRF_GRTC_Type *p_reg, uint32_t mask) |
| Function for disabling events. | |
| NRF_STATIC_INLINE void | nrf_grtc_shorts_enable (NRF_GRTC_Type *p_reg, uint32_t mask) |
| Function for enabling the specified shortcuts. | |
| NRF_STATIC_INLINE void | nrf_grtc_shorts_disable (NRF_GRTC_Type *p_reg, uint32_t mask) |
| Function for disabling the specified shortcuts. | |
| NRF_STATIC_INLINE void | nrf_grtc_shorts_set (NRF_GRTC_Type *p_reg, uint32_t mask) |
| Function for setting the specified shortcuts. | |
| NRF_STATIC_INLINE void | nrf_grtc_subscribe_set (NRF_GRTC_Type *p_reg, nrf_grtc_task_t task, uint8_t channel) |
| Function for setting the subscribe configuration for a given GRTC task. | |
| NRF_STATIC_INLINE void | nrf_grtc_subscribe_clear (NRF_GRTC_Type *p_reg, nrf_grtc_task_t task) |
| Function for clearing the subscribe configuration for a given GRTC task. | |
| NRF_STATIC_INLINE uint32_t | nrf_grtc_subscribe_get (NRF_GRTC_Type const *p_reg, nrf_grtc_task_t task) |
| Function for getting the subscribe configuration for a given GRTC task. | |
| NRF_STATIC_INLINE void | nrf_grtc_publish_set (NRF_GRTC_Type *p_reg, nrf_grtc_event_t event, uint8_t channel) |
| Function for setting the publish configuration for a given GRTC event. | |
| NRF_STATIC_INLINE void | nrf_grtc_publish_clear (NRF_GRTC_Type *p_reg, nrf_grtc_event_t event) |
| Function for clearing the publish configuration for a given GRTC event. | |
| NRF_STATIC_INLINE uint32_t | nrf_grtc_publish_get (NRF_GRTC_Type const *p_reg, nrf_grtc_event_t event) |
| Function for getting the publish configuration for a given GRTC event. | |
| NRF_STATIC_INLINE bool | nrf_grtc_event_check (NRF_GRTC_Type const *p_reg, nrf_grtc_event_t event) |
| Function for retrieving the state of the GRTC event. | |
| NRF_STATIC_INLINE void | nrf_grtc_event_clear (NRF_GRTC_Type *p_reg, nrf_grtc_event_t event) |
| Function for clearing an event. | |
| NRF_STATIC_INLINE uint32_t | nrf_grtc_rt_counter_low_get (NRF_GRTC_Type const *p_reg) |
| Function for returning the lower 32-bits of RTCOUNTER value. | |
| NRF_STATIC_INLINE uint32_t | nrf_grtc_rt_counter_high_get (NRF_GRTC_Type const *p_reg) |
| Function for returning the higher 32-bits of RTCOUNTER value. | |
| NRF_STATIC_INLINE uint32_t | nrf_grtc_sys_counter_low_get (NRF_GRTC_Type const *p_reg) |
| Function for returning the lower 32-bits of SYSCOUNTER value. | |
| NRF_STATIC_INLINE uint32_t | nrf_grtc_sys_counter_high_get (NRF_GRTC_Type const *p_reg) |
| Function for returning the higher 32-bits of SYSCOUNTER value. | |
| NRF_STATIC_INLINE uint64_t | nrf_grtc_sys_counter_get (NRF_GRTC_Type const *p_reg) |
| Function for returning the 64-bit SYSCOUNTER value. | |
| NRF_STATIC_INLINE bool | nrf_grtc_sys_counter_overflow_check (NRF_GRTC_Type const *p_reg) |
| Function for checking whether the lower 32-bits of SYSCOUNTER overflowed after last execution of nrf_grtc_sys_counter_low_get. | |
| NRF_STATIC_INLINE uint32_t | nrf_grtc_sys_counter_low_indexed_get (NRF_GRTC_Type const *p_reg, uint8_t index) |
| Function for returning the lower 32-bits of SYSCOUNTER value of the specified index. | |
| NRF_STATIC_INLINE uint32_t | nrf_grtc_sys_counter_high_indexed_get (NRF_GRTC_Type const *p_reg, uint8_t index) |
| Function for returning the higher 32-bits of SYSCOUNTER value of the specified index. | |
| NRF_STATIC_INLINE uint64_t | nrf_grtc_sys_counter_indexed_get (NRF_GRTC_Type const *p_reg, uint8_t index) |
| Function for returning the 64-bit SYSCOUNTER value of the specified index. | |
| NRF_STATIC_INLINE bool | nrf_grtc_sys_counter_overflow_indexed_check (NRF_GRTC_Type const *p_reg, uint8_t index) |
| Function for checking whether the lower 32-bits of SYSCOUNTER overflowed after last execution of nrf_grtc_sys_counter_low_indexed_get. | |
| NRF_STATIC_INLINE void | nrf_grtc_sys_counter_active_set (NRF_GRTC_Type *p_reg, bool enable) |
| Function for setting the request to keep the SYSCOUNTER active. | |
| NRF_STATIC_INLINE bool | nrf_grtc_sys_counter_active_check (NRF_GRTC_Type const *p_reg) |
| Function for checking whether the SYSCOUNTER is requested to remain active. | |
| NRF_STATIC_INLINE void | nrf_grtc_sys_counter_active_indexed_set (NRF_GRTC_Type *p_reg, uint8_t index, bool enable) |
| Function for setting the request for the specified domain to keep the SYSCOUNTER active. | |
| NRF_STATIC_INLINE bool | nrf_grtc_sys_counter_active_indexed_check (NRF_GRTC_Type const *p_reg, uint8_t index) |
| Function for checking whether the specified domain requests the SYSCOUNTER to remain active. | |
| NRF_STATIC_INLINE uint32_t | nrf_grtc_event_address_get (NRF_GRTC_Type const *p_reg, nrf_grtc_event_t event) |
| Function for returning the address of an event. | |
| NRF_STATIC_INLINE uint32_t | nrf_grtc_task_address_get (NRF_GRTC_Type const *p_reg, nrf_grtc_task_t task) |
| Function for returning the address of a task. | |
| NRF_STATIC_INLINE void | nrf_grtc_task_trigger (NRF_GRTC_Type *p_reg, nrf_grtc_task_t task) |
| Function for starting a task. | |
| NRF_STATIC_INLINE nrf_grtc_task_t | nrf_grtc_sys_counter_capture_task_get (uint8_t cc_channel) |
| Function for getting the 1 MHz SYSCOUNTER timer capture task associated with the specified channel. | |
| NRF_STATIC_INLINE void | nrf_grtc_sys_counter_compare_event_enable (NRF_GRTC_Type *p_reg, uint8_t cc_channel) |
| Function for enabling SYSCOUNTER compare event. | |
| NRF_STATIC_INLINE void | nrf_grtc_sys_counter_compare_event_disable (NRF_GRTC_Type *p_reg, uint8_t cc_channel) |
| Function for disabling SYSCOUNTER compare event. | |
| NRF_STATIC_INLINE nrf_grtc_event_t | nrf_grtc_sys_counter_compare_event_get (uint8_t cc_channel) |
| Function for getting the SYSCOUNTER compare event associated with the specified compare cc_channel. | |
| NRF_STATIC_INLINE bool | nrf_grtc_sys_counter_cc_enable_check (NRF_GRTC_Type const *p_reg, uint8_t cc_channel) |
| Function for checking whether the specified capture/compare channel is enabled. | |
| NRF_STATIC_INLINE void | nrf_grtc_sys_counter_set (NRF_GRTC_Type *p_reg, bool enable) |
| Function for setting the SYSCOUNTER. | |
| NRF_STATIC_INLINE void | nrf_grtc_sys_counter_auto_mode_set (NRF_GRTC_Type *p_reg, bool enable) |
| Function for setting automatic mode for the SYSCOUNTER. | |
| NRF_STATIC_INLINE bool | nrf_grtc_sys_counter_auto_mode_check (NRF_GRTC_Type *p_reg) |
| Function for checking whether the SYSCOUNTER has automatic mode enabled. | |
| NRF_STATIC_INLINE bool | nrf_grtc_sys_counter_check (NRF_GRTC_Type const *p_reg) |
| Function for checking whether the SYSCOUNTER is in active state. | |
| NRF_STATIC_INLINE void | nrf_grtc_sys_counter_active_state_request_set (NRF_GRTC_Type *p_reg, bool enable) |
| Function for setting the request to keep the SYSCOUNTER active. | |
| NRF_STATIC_INLINE bool | nrf_grtc_sys_counter_active_state_request_check (NRF_GRTC_Type const *p_reg) |
| Function for checking whether the SYSCOUNTER is requested to remain active. | |
| NRF_STATIC_INLINE uint32_t | nrf_grtc_sys_counter_active_state_request_get (NRF_GRTC_Type const *p_reg, uint32_t mask) |
| Function for getting the domains that requested the SYSCOUNTER to remain active. | |
| NRF_STATIC_INLINE void | nrf_grtc_sys_counter_interval_set (NRF_GRTC_Type *p_reg, uint32_t value) |
| Function for setting the periodic compare event for capture/compare channel 0. | |
| NRF_STATIC_INLINE uint32_t | nrf_grtc_sys_counter_interval_get (NRF_GRTC_Type const *p_reg) |
| Function for getting the value of interval for periodic capture/compare event for channel 0. | |
| NRF_STATIC_INLINE void | nrf_grtc_sys_counter_minterval_set (NRF_GRTC_Type *p_reg, uint8_t cc_channel, uint32_t value) |
| Function for setting the periodic compare value of channel for the SYSCOUNTER. | |
| NRF_STATIC_INLINE uint32_t | nrf_grtc_sys_counter_minterval_get (NRF_GRTC_Type const *p_reg, uint8_t cc_channel) |
| Function for getting the value of interval for periodic capture/compare event of channel for the SYSCOUNTER. | |
| NRF_STATIC_INLINE void | nrf_grtc_timeout_set (NRF_GRTC_Type *p_reg, uint32_t value) |
| Function for setting the timeout value for GRTC. | |
| NRF_STATIC_INLINE uint32_t | nrf_grtc_timeout_get (NRF_GRTC_Type const *p_reg) |
| Function for getting the value of the timeout value for GRTC. | |
| NRF_STATIC_INLINE void | nrf_grtc_waketime_set (NRF_GRTC_Type *p_reg, uint32_t value) |
| Function for setting the wake time value for GRTC. | |
| NRF_STATIC_INLINE uint32_t | nrf_grtc_waketime_get (NRF_GRTC_Type const *p_reg) |
| Function for getting the wake time value. | |
| NRF_STATIC_INLINE void | nrf_grtc_pwm_compare_set (NRF_GRTC_Type *p_reg, uint32_t value) |
| Function for setting the PWM compare value. | |
| NRF_STATIC_INLINE uint32_t | nrf_grtc_pwm_compare_get (NRF_GRTC_Type const *p_reg) |
| Function for getting the PWM compare value. | |
| NRF_STATIC_INLINE void | nrf_grtc_clkout_set (NRF_GRTC_Type *p_reg, nrf_grtc_clkout_t clkout, bool enable) |
| Function for setting the specified clock source to be connected to output pin. | |
| NRF_STATIC_INLINE bool | nrf_grtc_clkout_enable_check (NRF_GRTC_Type const *p_reg, nrf_grtc_clkout_t clkout) |
| Function for checking whether clock source is connected to clkout pin. | |
| NRF_STATIC_INLINE void | nrf_grtc_clkout_divider_set (NRF_GRTC_Type *p_reg, uint32_t value) |
| Function for setting the fast clock divisor value of clock output. | |
| NRF_STATIC_INLINE uint32_t | nrf_grtc_clkout_divider_get (NRF_GRTC_Type const *p_reg) |
| Function for getting the fast clock divisor value of clock output. | |
| NRF_STATIC_INLINE void | nrf_grtc_clksel_set (NRF_GRTC_Type *p_reg, nrf_grtc_clksel_t clksel) |
| Function for setting the clock source for the GRTC low-frequency clock. | |
| NRF_STATIC_INLINE nrf_grtc_clksel_t | nrf_grtc_clksel_get (NRF_GRTC_Type const *p_reg) |
| Function for getting the clock source of the GRTC low-frequency clock. | |
Hardware access layer for managing the Global Real Time Counter (GRTC) peripheral.
| #define NRF_GRTC_CHANNEL_INT_MASK | ( | ch | ) |
Macro for creating the interrupt bitmask for the specified compare channel.
| enum nrf_grtc_clkout_t |
| enum nrf_grtc_clksel_t |
| enum nrf_grtc_event_t |
GRTC events.
| enum nrf_grtc_int_mask_t |
GRTC interrupts.
| enum nrf_grtc_task_t |
GRTC tasks.
| NRF_STATIC_INLINE uint32_t nrf_grtc_clkout_divider_get | ( | NRF_GRTC_Type const * | p_reg | ) |
Function for getting the fast clock divisor value of clock output.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| Fast | clock divisor value. |
| NRF_STATIC_INLINE void nrf_grtc_clkout_divider_set | ( | NRF_GRTC_Type * | p_reg, |
| uint32_t | value ) |
Function for setting the fast clock divisor value of clock output.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | value | Fast clock divisor value. |
| NRF_STATIC_INLINE bool nrf_grtc_clkout_enable_check | ( | NRF_GRTC_Type const * | p_reg, |
| nrf_grtc_clkout_t | clkout ) |
Function for checking whether clock source is connected to clkout pin.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | clkout | Selected clkout source. |
| True | if the clkout source is enabled, false otherwise. |
| NRF_STATIC_INLINE void nrf_grtc_clkout_set | ( | NRF_GRTC_Type * | p_reg, |
| nrf_grtc_clkout_t | clkout, | ||
| bool | enable ) |
Function for setting the specified clock source to be connected to output pin.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | clkout | Selected clkout source. |
| [in] | enable | True if the clkout source is to be enabled, false otherwise. |
| NRF_STATIC_INLINE nrf_grtc_clksel_t nrf_grtc_clksel_get | ( | NRF_GRTC_Type const * | p_reg | ) |
Function for getting the clock source of the GRTC low-frequency clock.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE void nrf_grtc_clksel_set | ( | NRF_GRTC_Type * | p_reg, |
| nrf_grtc_clksel_t | clksel ) |
Function for setting the clock source for the GRTC low-frequency clock.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | clksel | Selected clock source. |
| NRF_STATIC_INLINE uint32_t nrf_grtc_event_address_get | ( | NRF_GRTC_Type const * | p_reg, |
| nrf_grtc_event_t | event ) |
Function for returning the address of an event.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Requested event. |
| NRF_STATIC_INLINE bool nrf_grtc_event_check | ( | NRF_GRTC_Type const * | p_reg, |
| nrf_grtc_event_t | event ) |
Function for retrieving the state of the GRTC 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_grtc_event_clear | ( | NRF_GRTC_Type * | p_reg, |
| nrf_grtc_event_t | event ) |
Function for clearing an event.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event to be cleared. |
| NRF_STATIC_INLINE void nrf_grtc_event_disable | ( | NRF_GRTC_Type * | p_reg, |
| uint32_t | mask ) |
Function for disabling events.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of event flags to be disabled. |
| NRF_STATIC_INLINE void nrf_grtc_event_enable | ( | NRF_GRTC_Type * | p_reg, |
| uint32_t | mask ) |
Function for enabling events.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of event flags to be enabled. |
| NRF_STATIC_INLINE void nrf_grtc_int_disable | ( | NRF_GRTC_Type * | p_reg, |
| uint32_t | mask ) |
Function for disabling specified interrupts.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be disabled. Use nrf_grtc_int_mask_t values for bit masking. |
| NRF_STATIC_INLINE void nrf_grtc_int_enable | ( | NRF_GRTC_Type * | p_reg, |
| uint32_t | mask ) |
Function for enabling specified interrupts.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be enabled. Use nrf_grtc_int_mask_t values for bit masking. |
| NRF_STATIC_INLINE uint32_t nrf_grtc_int_enable_check | ( | NRF_GRTC_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_grtc_int_mask_t values for bit masking. |
| NRF_STATIC_INLINE void nrf_grtc_int_group_disable | ( | NRF_GRTC_Type * | p_reg, |
| uint8_t | group_idx, | ||
| uint32_t | mask ) |
Function for disabling interrupts in the specified group.
group_idx might be valid. Refer to the Product Specification for more information.| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | group_idx | Index of interrupt group to be disabled. |
| [in] | mask | Mask of interrupts to be disabled. Use nrf_grtc_int_mask_t values for bit masking. |
| NRF_STATIC_INLINE void nrf_grtc_int_group_enable | ( | NRF_GRTC_Type * | p_reg, |
| uint8_t | group_idx, | ||
| uint32_t | mask ) |
Function for enabling interrupts in the specified group.
group_idx might be valid. Refer to the Product Specification for more information.| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | group_idx | Index of interrupt group to be enabled. |
| [in] | mask | Mask of interrupts to be enabled. Use nrf_grtc_int_mask_t values for bit masking. |
| NRF_STATIC_INLINE uint32_t nrf_grtc_int_group_enable_check | ( | NRF_GRTC_Type const * | p_reg, |
| uint8_t | group_idx, | ||
| uint32_t | mask ) |
Function for checking if the specified interrupts from a given group are enabled.
group_idx might be valid. Refer to the Product Specification for more information.| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | group_idx | Index of interrupt group to be checked. |
| [in] | mask | Mask of interrupts to be checked. Use nrf_grtc_int_mask_t values for bit masking. |
| NRF_STATIC_INLINE uint32_t nrf_grtc_int_pending_get | ( | NRF_GRTC_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 void nrf_grtc_publish_clear | ( | NRF_GRTC_Type * | p_reg, |
| nrf_grtc_event_t | event ) |
Function for clearing the publish configuration for a given GRTC 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_grtc_publish_get | ( | NRF_GRTC_Type const * | p_reg, |
| nrf_grtc_event_t | event ) |
Function for getting the publish configuration for a given GRTC 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_grtc_publish_set | ( | NRF_GRTC_Type * | p_reg, |
| nrf_grtc_event_t | event, | ||
| uint8_t | channel ) |
Function for setting the publish configuration for a given GRTC 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_grtc_pwm_compare_get | ( | NRF_GRTC_Type const * | p_reg | ) |
Function for getting the PWM compare value.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| Value | of PWM compare. |
| NRF_STATIC_INLINE void nrf_grtc_pwm_compare_set | ( | NRF_GRTC_Type * | p_reg, |
| uint32_t | value ) |
Function for setting the PWM compare value.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | value | PWM compare value. |
| NRF_STATIC_INLINE uint64_t nrf_grtc_rt_counter_cc_get | ( | NRF_GRTC_Type const * | p_reg | ) |
Function for returning the compare value for the RTCOUNTER.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE void nrf_grtc_rt_counter_cc_set | ( | NRF_GRTC_Type * | p_reg, |
| uint64_t | cc_value, | ||
| bool | sync ) |
Function for setting a compare value for the RTCOUNTER.
sync parameter is true then the process of capturing the value lasts up to two 32 kHz cycles. If the sync parameter is false then the capturing the value will occur on the following rising edge of 32 kHz clock. In this case it is user's responsibility to execute the function between the 32 kHz rising edges.| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | cc_value | Compare value to be set in 32 kHz units. |
| [in] | sync | True if the internal synchronization mechanism shall be used, false otherwise. |
| NRF_STATIC_INLINE uint32_t nrf_grtc_rt_counter_high_get | ( | NRF_GRTC_Type const * | p_reg | ) |
Function for returning the higher 32-bits of RTCOUNTER value.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE uint32_t nrf_grtc_rt_counter_low_get | ( | NRF_GRTC_Type const * | p_reg | ) |
Function for returning the lower 32-bits of RTCOUNTER value.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE void nrf_grtc_shorts_disable | ( | NRF_GRTC_Type * | p_reg, |
| uint32_t | mask ) |
Function for disabling the specified shortcuts.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Bitmask of shortcuts to be disabled. |
| NRF_STATIC_INLINE void nrf_grtc_shorts_enable | ( | NRF_GRTC_Type * | p_reg, |
| uint32_t | mask ) |
Function for enabling the specified shortcuts.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Bitmask of shortcuts to be enabled. |
| NRF_STATIC_INLINE void nrf_grtc_shorts_set | ( | NRF_GRTC_Type * | p_reg, |
| uint32_t | mask ) |
Function for setting the specified shortcuts.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Bitmask of shortcuts to be set. |
| NRF_STATIC_INLINE void nrf_grtc_subscribe_clear | ( | NRF_GRTC_Type * | p_reg, |
| nrf_grtc_task_t | task ) |
Function for clearing the subscribe configuration for a given GRTC 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_grtc_subscribe_get | ( | NRF_GRTC_Type const * | p_reg, |
| nrf_grtc_task_t | task ) |
Function for getting the subscribe configuration for a given GRTC 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_grtc_subscribe_set | ( | NRF_GRTC_Type * | p_reg, |
| nrf_grtc_task_t | task, | ||
| uint8_t | channel ) |
Function for setting the subscribe configuration for a given GRTC 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 bool nrf_grtc_sys_counter_active_check | ( | NRF_GRTC_Type const * | p_reg | ) |
Function for checking whether the SYSCOUNTER is requested to remain active.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| True | if SYSCOUNTER channel is requested to remain active, false otherwise. |
| NRF_STATIC_INLINE bool nrf_grtc_sys_counter_active_indexed_check | ( | NRF_GRTC_Type const * | p_reg, |
| uint8_t | index ) |
Function for checking whether the specified domain requests the SYSCOUNTER to remain active.
index might be valid. Refer to the Product Specification for more information.| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | index | Index of the domain for which the SYSCOUNTER active request is to be checked. |
| True | if the specified domain requests the SYSCOUNTER to remain active, false otherwise. |
| NRF_STATIC_INLINE void nrf_grtc_sys_counter_active_indexed_set | ( | NRF_GRTC_Type * | p_reg, |
| uint8_t | index, | ||
| bool | enable ) |
Function for setting the request for the specified domain to keep the SYSCOUNTER active.
index might be valid. Refer to the Product Specification for more information.| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | index | Index of the domain for which the SYSCOUNTER active request is to be set. |
| [in] | enable | True if the SYSCOUNTER for the specified domain is to be kept active, false otherwise. |
| NRF_STATIC_INLINE void nrf_grtc_sys_counter_active_set | ( | NRF_GRTC_Type * | p_reg, |
| bool | enable ) |
Function for setting the request to keep the SYSCOUNTER active.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | enable | True if the SYSCOUNTER channel is to be kept active, false otherwise. |
| NRF_STATIC_INLINE bool nrf_grtc_sys_counter_active_state_request_check | ( | NRF_GRTC_Type const * | p_reg | ) |
Function for checking whether the SYSCOUNTER is requested to remain active.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| True | if request for keeping the SYSCOUNTER is active, false otherwise. |
| NRF_STATIC_INLINE uint32_t nrf_grtc_sys_counter_active_state_request_get | ( | NRF_GRTC_Type const * | p_reg, |
| uint32_t | mask ) |
Function for getting the domains that requested the SYSCOUNTER to remain active.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Domains mask. |
| Bitmask | of domains that keep the SYSCOUNTER active. |
| NRF_STATIC_INLINE void nrf_grtc_sys_counter_active_state_request_set | ( | NRF_GRTC_Type * | p_reg, |
| bool | enable ) |
Function for setting the request to keep the SYSCOUNTER active.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | enable | True if the automatic mode is to be enabled, false otherwise. |
| NRF_STATIC_INLINE bool nrf_grtc_sys_counter_auto_mode_check | ( | NRF_GRTC_Type * | p_reg | ) |
Function for checking whether the SYSCOUNTER has automatic mode enabled.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE void nrf_grtc_sys_counter_auto_mode_set | ( | NRF_GRTC_Type * | p_reg, |
| bool | enable ) |
Function for setting automatic mode for the SYSCOUNTER.
enable is false then the SYSCOUNTER remains active when KEEPRUNNING is set, or any task register, INT register or SYSCOUNTER register is being accessed. When enable is true then in addition the SYSCOUNTER remains active when any local CPU that is not sleeping keeps the SYSCOUNTER active.| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | enable | True if the automatic mode is to be enabled, false otherwise. |
| NRF_STATIC_INLINE nrf_grtc_task_t nrf_grtc_sys_counter_capture_task_get | ( | uint8_t | cc_channel | ) |
Function for getting the 1 MHz SYSCOUNTER timer capture task associated with the specified channel.
| [in] | cc_channel | Capture channel. |
| NRF_STATIC_INLINE void nrf_grtc_sys_counter_cc_add_set | ( | NRF_GRTC_Type * | p_reg, |
| uint8_t | cc_channel, | ||
| uint32_t | value, | ||
| nrf_grtc_cc_add_reference_t | reference ) |
Function for setting the value to be added to capture/compare register for the SYSCOUNTER.
reference value equals NRF_GRTC_CC_ADD_REFERENCE_SYSCOUNTER then the final value of capture/compare register is a sum of SYSCOUNTER current value and value. When reference value equals NRF_GRTC_CC_ADD_REFERENCE_CC then the final value of capture/compare register is a sum of current capture/compare value and value. If the capture/compare register overflows after this write, then the corresponding event is generated immediately.| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | cc_channel | The specified capture/compare channel. |
| [in] | value | Value to be added in 1 MHz units. |
| [in] | reference | Configuration of adding mode. |
| NRF_STATIC_INLINE bool nrf_grtc_sys_counter_cc_enable_check | ( | NRF_GRTC_Type const * | p_reg, |
| uint8_t | cc_channel ) |
Function for checking whether the specified capture/compare channel is enabled.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | cc_channel | Channel to be checked. |
| true | Specified channel is enabled. |
| false | Specified channel is disabled. |
| NRF_STATIC_INLINE uint64_t nrf_grtc_sys_counter_cc_get | ( | NRF_GRTC_Type const * | p_reg, |
| uint8_t | cc_channel ) |
Function for getting the capture/compare value of channel for the SYSCOUNTER.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | cc_channel | The specified capture/compare channel. |
| NRF_STATIC_INLINE void nrf_grtc_sys_counter_cc_set | ( | NRF_GRTC_Type * | p_reg, |
| uint8_t | cc_channel, | ||
| uint64_t | cc_value ) |
Function for setting the compare value of channel for the SYSCOUNTER.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | cc_channel | The specified capture/compare channel. |
| [in] | cc_value | Compare value to be set in 1 MHz units. |
| NRF_STATIC_INLINE bool nrf_grtc_sys_counter_check | ( | NRF_GRTC_Type const * | p_reg | ) |
Function for checking whether the SYSCOUNTER is in active state.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| True | if the SYSCOUNTER is active, false otherwise. |
| NRF_STATIC_INLINE void nrf_grtc_sys_counter_compare_event_disable | ( | NRF_GRTC_Type * | p_reg, |
| uint8_t | cc_channel ) |
Function for disabling SYSCOUNTER compare event.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | cc_channel | Channel number of compare event to be disabled. |
| NRF_STATIC_INLINE void nrf_grtc_sys_counter_compare_event_enable | ( | NRF_GRTC_Type * | p_reg, |
| uint8_t | cc_channel ) |
Function for enabling SYSCOUNTER compare event.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | cc_channel | Channel number of compare event to be enabled. |
| NRF_STATIC_INLINE nrf_grtc_event_t nrf_grtc_sys_counter_compare_event_get | ( | uint8_t | cc_channel | ) |
Function for getting the SYSCOUNTER compare event associated with the specified compare cc_channel.
| [in] | cc_channel | Compare channel number. |
| NRF_STATIC_INLINE uint64_t nrf_grtc_sys_counter_get | ( | NRF_GRTC_Type const * | p_reg | ) |
Function for returning the 64-bit SYSCOUNTER value.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE uint32_t nrf_grtc_sys_counter_high_get | ( | NRF_GRTC_Type const * | p_reg | ) |
Function for returning the higher 32-bits of SYSCOUNTER value.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE uint32_t nrf_grtc_sys_counter_high_indexed_get | ( | NRF_GRTC_Type const * | p_reg, |
| uint8_t | index ) |
Function for returning the higher 32-bits of SYSCOUNTER value of the specified index.
index might be valid. Refer to the Product Specification for more information.| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | index | Index of the domain for which the higher part of the SYSCOUNTER is to be read. |
| NRF_STATIC_INLINE uint64_t nrf_grtc_sys_counter_indexed_get | ( | NRF_GRTC_Type const * | p_reg, |
| uint8_t | index ) |
Function for returning the 64-bit SYSCOUNTER value of the specified index.
index might be valid. Refer to the Product Specification for more information.| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | index | Index of the domain for which the SYSCOUNTER value is to be read. |
| NRF_STATIC_INLINE uint32_t nrf_grtc_sys_counter_interval_get | ( | NRF_GRTC_Type const * | p_reg | ) |
Function for getting the value of interval for periodic capture/compare event for channel 0.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| Value | of the interval in 1 MHz units. |
| NRF_STATIC_INLINE void nrf_grtc_sys_counter_interval_set | ( | NRF_GRTC_Type * | p_reg, |
| uint32_t | value ) |
Function for setting the periodic compare event for capture/compare channel 0.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | value | Period value in 1 MHz units. |
| NRF_STATIC_INLINE uint32_t nrf_grtc_sys_counter_low_get | ( | NRF_GRTC_Type const * | p_reg | ) |
Function for returning the lower 32-bits of SYSCOUNTER value.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_STATIC_INLINE uint32_t nrf_grtc_sys_counter_low_indexed_get | ( | NRF_GRTC_Type const * | p_reg, |
| uint8_t | index ) |
Function for returning the lower 32-bits of SYSCOUNTER value of the specified index.
index might be valid. Refer to the Product Specification for more information.| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | index | Index of the domain for which the lower part of the SYSCOUNTER is to be read. |
| NRF_STATIC_INLINE uint32_t nrf_grtc_sys_counter_minterval_get | ( | NRF_GRTC_Type const * | p_reg, |
| uint8_t | cc_channel ) |
Function for getting the value of interval for periodic capture/compare event of channel for the SYSCOUNTER.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | cc_channel | The specified capture/compare channel. |
| Value | of the interval in 1 MHz units. |
| NRF_STATIC_INLINE void nrf_grtc_sys_counter_minterval_set | ( | NRF_GRTC_Type * | p_reg, |
| uint8_t | cc_channel, | ||
| uint32_t | value ) |
Function for setting the periodic compare value of channel for the SYSCOUNTER.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | cc_channel | The specified capture/compare channel. |
| [in] | value | Period value in 1 MHz units. |
| NRF_STATIC_INLINE bool nrf_grtc_sys_counter_overflow_check | ( | NRF_GRTC_Type const * | p_reg | ) |
Function for checking whether the lower 32-bits of SYSCOUNTER overflowed after last execution of nrf_grtc_sys_counter_low_get.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| True | if the lower 32-bits of SYSCOUNTER overflowed, false otherwise. |
| NRF_STATIC_INLINE bool nrf_grtc_sys_counter_overflow_indexed_check | ( | NRF_GRTC_Type const * | p_reg, |
| uint8_t | index ) |
Function for checking whether the lower 32-bits of SYSCOUNTER overflowed after last execution of nrf_grtc_sys_counter_low_indexed_get.
index might be valid. Refer to the Product Specification for more information.| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | index | Index of the domain for which the SYSCOUNTER overflow is to be checked. |
| True | if the lower 32-bits of the specified SYSCOUNTER overflowed, false otherwise. |
| NRF_STATIC_INLINE void nrf_grtc_sys_counter_set | ( | NRF_GRTC_Type * | p_reg, |
| bool | enable ) |
Function for setting the SYSCOUNTER.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | enable | True if SYSCOUNTER is to be enabled, false otherwise. |
| NRF_STATIC_INLINE uint32_t nrf_grtc_task_address_get | ( | NRF_GRTC_Type const * | p_reg, |
| nrf_grtc_task_t | task ) |
Function for returning the address of a task.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Requested task. |
| NRF_STATIC_INLINE void nrf_grtc_task_trigger | ( | NRF_GRTC_Type * | p_reg, |
| nrf_grtc_task_t | task ) |
Function for starting a task.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Requested task. |
| NRF_STATIC_INLINE uint32_t nrf_grtc_timeout_get | ( | NRF_GRTC_Type const * | p_reg | ) |
Function for getting the value of the timeout value for GRTC.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| Value | of the timeout in 32 kHz units. |
| NRF_STATIC_INLINE void nrf_grtc_timeout_set | ( | NRF_GRTC_Type * | p_reg, |
| uint32_t | value ) |
Function for setting the timeout value for GRTC.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | value | Timeout value in 32 kHz units. |
| NRF_STATIC_INLINE uint32_t nrf_grtc_waketime_get | ( | NRF_GRTC_Type const * | p_reg | ) |
Function for getting the wake time value.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| Value | of wake time in 32 kHz units. |
| NRF_STATIC_INLINE void nrf_grtc_waketime_set | ( | NRF_GRTC_Type * | p_reg, |
| uint32_t | value ) |
Function for setting the wake time value for GRTC.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | value | Wake time value in 32 kHz units. |