nrfx 3.3
Macros | Functions
GRTC HALY

Hardware access layer with cache and barrier support for managing the GRTC peripheral. More...

Macros

#define NRFY_GRTC_HAS_EXTENDED   1
 
#define NRFY_GRTC_HAS_RTCOUNTER   1
 
#define NRFY_GRTC_HAS_SYSCOUNTER_ARRAY   1
 
#define NRFY_GRTC_HAS_PWM   1
 
#define NRFY_GRTC_HAS_CLKOUT   1
 
#define NRFY_GRTC_HAS_CLKSEL   1
 

Functions

NRFY_STATIC_INLINE void nrfy_grtc_int_init (NRF_GRTC_Type *p_reg, uint32_t mask, uint8_t irq_priority, bool enable)
 Function for initializing the specified GRTC interrupts.
 
NRFY_STATIC_INLINE void nrfy_grtc_int_uninit (NRF_GRTC_Type *p_reg)
 Function for uninitializing the GRTC interrupts.
 
NRFY_STATIC_INLINE uint32_t nrfy_grtc_events_process (NRF_GRTC_Type *p_reg, uint32_t mask)
 Function for processing the specified GRTC events.
 
NRFY_STATIC_INLINE void nrfy_grtc_prepare (NRF_GRTC_Type *p_reg, bool busy_wait)
 Function for preparing the GRTC peripheral.
 
NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_start (NRF_GRTC_Type *p_reg, bool busy_wait)
 Function for starting the SYSCOUNTER.
 
NRFY_STATIC_INLINE uint64_t nrfy_grtc_sys_counter_get (NRF_GRTC_Type const *p_reg)
 Function for returning the SYSCOUNTER 1 MHz value.
 
NRFY_STATIC_INLINE bool nrfy_grtc_sys_conter_ready_check (NRF_GRTC_Type const *p_reg)
 Function for checking whether SYSCOUNTER value is ready to be read.
 
NRFY_STATIC_INLINE uint64_t nrfy_grtc_rt_counter_get (NRF_GRTC_Type const *p_reg)
 Function for returning the RTCOUNTER 32 kHz value.
 
NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_compare_event_int_clear_enable (NRF_GRTC_Type *p_reg, uint8_t channel, bool enable)
 Function for enabling the GRTC compare event and optionally associated interrupt.
 
NRFY_STATIC_INLINE bool nrfy_grtc_sys_counter_compare_event_check (NRF_GRTC_Type const *p_reg, uint8_t cc_channel)
 Function for retrieving the state of the compare GRTC event.
 
NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_compare_event_clear (NRF_GRTC_Type *p_reg, uint8_t cc_channel)
 Function for clearing a compare GRTC event.
 
NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_capture_subscribe_set (NRF_GRTC_Type *p_reg, uint8_t cc_channel, uint8_t channel)
 Function for setting the subscribe configuration for a given GRTC capture channel.
 
NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_capture_subscribe_clear (NRF_GRTC_Type *p_reg, uint8_t cc_channel)
 Function for clearing the subscribe configuration for a given GRTC capture channel.
 
NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_compare_publish_set (NRF_GRTC_Type *p_reg, uint8_t cc_channel, uint8_t channel)
 Function for setting the publish configuration for a given GRTC compare channel.
 
NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_compare_publish_clear (NRF_GRTC_Type *p_reg, uint8_t cc_channel)
 Function for clearing the publish configuration for a given GRTC compare channel.
 
NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_cc_set (NRF_GRTC_Type *p_reg, uint8_t cc_channel, uint64_t cc_value)
 
NRFY_STATIC_INLINE uint64_t nrfy_grtc_sys_counter_cc_get (NRF_GRTC_Type const *p_reg, uint8_t cc_channel)
 
NRFY_STATIC_INLINE void nrfy_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)
 
NRFY_STATIC_INLINE void nrfy_grtc_rt_counter_cc_set (NRF_GRTC_Type *p_reg, uint64_t cc_value, bool sync)
 
NRFY_STATIC_INLINE uint64_t nrfy_grtc_rt_counter_cc_get (NRF_GRTC_Type const *p_reg)
 
NRFY_STATIC_INLINE void nrfy_grtc_int_enable (NRF_GRTC_Type *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE void nrfy_grtc_int_disable (NRF_GRTC_Type *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE uint32_t nrfy_grtc_int_enable_check (NRF_GRTC_Type const *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE uint32_t nrfy_grtc_int_pending_get (NRF_GRTC_Type const *p_reg)
 
NRFY_STATIC_INLINE void nrfy_grtc_shorts_enable (NRF_GRTC_Type *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE void nrfy_grtc_shorts_disable (NRF_GRTC_Type *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE void nrfy_grtc_shorts_set (NRF_GRTC_Type *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE void nrfy_grtc_subscribe_set (NRF_GRTC_Type *p_reg, nrf_grtc_task_t task, uint8_t channel)
 
NRFY_STATIC_INLINE void nrfy_grtc_subscribe_clear (NRF_GRTC_Type *p_reg, nrf_grtc_task_t task)
 
NRFY_STATIC_INLINE void nrfy_grtc_publish_set (NRF_GRTC_Type *p_reg, nrf_grtc_event_t event, uint8_t channel)
 
NRFY_STATIC_INLINE void nrfy_grtc_publish_clear (NRF_GRTC_Type *p_reg, nrf_grtc_event_t event)
 
NRFY_STATIC_INLINE bool nrfy_grtc_event_check (NRF_GRTC_Type const *p_reg, nrf_grtc_event_t event)
 
NRFY_STATIC_INLINE void nrfy_grtc_event_clear (NRF_GRTC_Type *p_reg, nrf_grtc_event_t event)
 
NRFY_STATIC_INLINE bool nrfy_grtc_sys_counter_overflow_check (NRF_GRTC_Type const *p_reg)
 
NRFY_STATIC_INLINE uint32_t nrfy_grtc_event_address_get (NRF_GRTC_Type const *p_reg, nrf_grtc_event_t event)
 
NRFY_STATIC_INLINE uint32_t nrfy_grtc_task_address_get (NRF_GRTC_Type const *p_reg, nrf_grtc_task_t task)
 
NRFY_STATIC_INLINE void nrfy_grtc_task_trigger (NRF_GRTC_Type *p_reg, nrf_grtc_task_t task)
 
NRFY_STATIC_INLINE nrf_grtc_task_t nrfy_grtc_sys_counter_capture_task_get (uint8_t cc_channel)
 
NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_compare_event_enable (NRF_GRTC_Type *p_reg, uint8_t cc_channel)
 
NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_compare_event_disable (NRF_GRTC_Type *p_reg, uint8_t cc_channel)
 
NRFY_STATIC_INLINE nrf_grtc_event_t nrfy_grtc_sys_counter_compare_event_get (uint8_t cc_channel)
 
NRFY_STATIC_INLINE bool nrfy_grtc_sys_counter_cc_enable_check (NRF_GRTC_Type const *p_reg, uint8_t cc_channel)
 
NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_set (NRF_GRTC_Type *p_reg, bool enable)
 
NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_auto_mode_set (NRF_GRTC_Type *p_reg, bool enable)
 
NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_active_set (NRF_GRTC_Type *p_reg, bool enable)
 
NRFY_STATIC_INLINE bool nrfy_grtc_sys_counter_active_check (NRF_GRTC_Type const *p_reg)
 
NRFY_STATIC_INLINE bool nrfy_grtc_sys_counter_check (NRF_GRTC_Type *p_reg)
 
NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_active_state_request_set (NRF_GRTC_Type *p_reg, bool enable)
 
NRFY_STATIC_INLINE bool nrfy_grtc_sys_counter_active_state_request_check (NRF_GRTC_Type const *p_reg)
 
NRFY_STATIC_INLINE uint32_t nrfy_grtc_sys_counter_active_state_request_get (NRF_GRTC_Type const *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_interval_set (NRF_GRTC_Type *p_reg, uint32_t value)
 
NRFY_STATIC_INLINE uint32_t nrfy_grtc_sys_counter_interval_get (NRF_GRTC_Type const *p_reg)
 
NRFY_STATIC_INLINE void nrfy_grtc_timeout_set (NRF_GRTC_Type *p_reg, uint32_t value)
 
NRFY_STATIC_INLINE uint32_t nrfy_grtc_timeout_get (NRF_GRTC_Type const *p_reg)
 
NRFY_STATIC_INLINE void nrfy_grtc_waketime_set (NRF_GRTC_Type *p_reg, uint32_t value)
 
NRFY_STATIC_INLINE uint32_t nrfy_grtc_waketime_get (NRF_GRTC_Type const *p_reg)
 
NRFY_STATIC_INLINE void nrfy_grtc_pwm_compare_set (NRF_GRTC_Type *p_reg, uint32_t value)
 
NRFY_STATIC_INLINE uint32_t nrfy_grtc_pwm_compare_get (NRF_GRTC_Type const *p_reg)
 
NRFY_STATIC_INLINE void nrfy_grtc_clkout_set (NRF_GRTC_Type *p_reg, nrf_grtc_clkout_t clkout, bool enable)
 
NRFY_STATIC_INLINE bool nrfy_grtc_clkout_enable_check (NRF_GRTC_Type const *p_reg, nrf_grtc_clkout_t clkout)
 
NRFY_STATIC_INLINE void nrfy_grtc_clkout_divider_set (NRF_GRTC_Type *p_reg, uint32_t value)
 
NRFY_STATIC_INLINE uint32_t nrfy_grtc_clkout_divider_get (NRF_GRTC_Type const *p_reg)
 
NRF_STATIC_INLINE void nrfy_grtc_clksel_set (NRF_GRTC_Type *p_reg, nrf_grtc_clksel_t clksel)
 
NRF_STATIC_INLINE nrf_grtc_clksel_t nrfy_grtc_clksel_get (NRF_GRTC_Type const *p_reg)
 

Detailed Description

Hardware access layer with cache and barrier support for managing the GRTC peripheral.

Macro Definition Documentation

◆ NRFY_GRTC_HAS_CLKOUT

#define NRFY_GRTC_HAS_CLKOUT   1
See also
NRF_GRTC_HAS_CLKOUT Symbol indicating whether GRTC has clock output registers.

◆ NRFY_GRTC_HAS_CLKSEL

#define NRFY_GRTC_HAS_CLKSEL   1
See also
NRF_GRTC_HAS_CLKSEL Symbol indicating whether GRTC has clock source selection.

◆ NRFY_GRTC_HAS_EXTENDED

#define NRFY_GRTC_HAS_EXTENDED   1
See also
NRF_GRTC_HAS_EXTENDED Symbol indicating whether GRTC has extended functionality.

◆ NRFY_GRTC_HAS_PWM

#define NRFY_GRTC_HAS_PWM   1
See also
NRF_GRTC_HAS_CLKOUT Symbol indicating whether GRTC has clock output registers.

◆ NRFY_GRTC_HAS_RTCOUNTER

#define NRFY_GRTC_HAS_RTCOUNTER   1
See also
NRF_GRTC_HAS_RTCOUNTER

◆ NRFY_GRTC_HAS_SYSCOUNTER_ARRAY

#define NRFY_GRTC_HAS_SYSCOUNTER_ARRAY   1
See also
NRF_GRTC_HAS_SYSCOUNTER_ARRAY Symbol indicating whether GRTC has multiple SYSCOUNTER registers.

Function Documentation

◆ nrfy_grtc_clkout_divider_get()

NRFY_STATIC_INLINE uint32_t nrfy_grtc_clkout_divider_get ( NRF_GRTC_Type const *  p_reg)
See also
nrf_grtc_clkout_divider_get Function for getting the fast clock divisor value of clock output.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
Fastclock divisor value.

◆ nrfy_grtc_clkout_divider_set()

NRFY_STATIC_INLINE void nrfy_grtc_clkout_divider_set ( NRF_GRTC_Type *  p_reg,
uint32_t  value 
)
See also
nrf_grtc_clkout_divider_set Function for setting the fast clock divisor value of clock output.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]valueFast clock divisor value.

◆ nrfy_grtc_clkout_enable_check()

NRFY_STATIC_INLINE bool nrfy_grtc_clkout_enable_check ( NRF_GRTC_Type const *  p_reg,
nrf_grtc_clkout_t  clkout 
)
See also
nrf_grtc_clkout_enable_check Function for checking whether clock source is connected to clkout pin.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]clkoutSelected clkout source.
Return values
Trueif the clkout source is enabled, false otherwise.

◆ nrfy_grtc_clkout_set()

NRFY_STATIC_INLINE void nrfy_grtc_clkout_set ( NRF_GRTC_Type *  p_reg,
nrf_grtc_clkout_t  clkout,
bool  enable 
)
See also
nrf_grtc_clkout_set Function for setting the specified clock source to be connected to output pin.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]clkoutSelected clkout source.
[in]enableTrue if the clkout source is to be enabled, false otherwise.

◆ nrfy_grtc_clksel_get()

NRF_STATIC_INLINE nrf_grtc_clksel_t nrfy_grtc_clksel_get ( NRF_GRTC_Type const *  p_reg)
See also
nrf_grtc_clksel_get Function for getting the clock source of the GRTC low-frequency clock.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Clock source configuration.

◆ nrfy_grtc_clksel_set()

NRF_STATIC_INLINE void nrfy_grtc_clksel_set ( NRF_GRTC_Type *  p_reg,
nrf_grtc_clksel_t  clksel 
)
See also
nrf_grtc_clksel_set Function for setting the clock source for the GRTC low-frequency clock.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]clkselSelected clock source.

◆ nrfy_grtc_event_address_get()

NRFY_STATIC_INLINE uint32_t nrfy_grtc_event_address_get ( NRF_GRTC_Type const *  p_reg,
nrf_grtc_event_t  event 
)
See also
nrf_grtc_event_address_get Function for returning the address of an event.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventRequested event.
Returns
Address of the requested event register.

◆ nrfy_grtc_event_check()

NRFY_STATIC_INLINE bool nrfy_grtc_event_check ( NRF_GRTC_Type const *  p_reg,
nrf_grtc_event_t  event 
)
See also
nrf_grtc_event_check Function for retrieving the state of the GRTC event.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent to be checked.
Return values
trueThe event has been generated.
falseThe event has not been generated.

◆ nrfy_grtc_event_clear()

NRFY_STATIC_INLINE void nrfy_grtc_event_clear ( NRF_GRTC_Type *  p_reg,
nrf_grtc_event_t  event 
)
See also
nrf_grtc_event_clear Function for clearing an event.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent to be cleared.

◆ nrfy_grtc_events_process()

NRFY_STATIC_INLINE uint32_t nrfy_grtc_events_process ( NRF_GRTC_Type *  p_reg,
uint32_t  mask 
)

Function for processing the specified GRTC events.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of events to be processed, created by NRFY_EVENT_TO_INT_BITMASK().
Returns
Mask of events that were generated and processed. To be checked against the result of NRFY_EVENT_TO_INT_BITMASK().

◆ nrfy_grtc_int_disable()

NRFY_STATIC_INLINE void nrfy_grtc_int_disable ( NRF_GRTC_Type *  p_reg,
uint32_t  mask 
)
See also
nrf_grtc_int_disable Function for disabling specified interrupts.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be disabled. Use nrf_grtc_int_mask_t values for bit masking.

◆ nrfy_grtc_int_enable()

NRFY_STATIC_INLINE void nrfy_grtc_int_enable ( NRF_GRTC_Type *  p_reg,
uint32_t  mask 
)
See also
nrf_grtc_int_enable Function for enabling specified interrupts.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be enabled. Use nrf_grtc_int_mask_t values for bit masking.

◆ nrfy_grtc_int_enable_check()

NRFY_STATIC_INLINE uint32_t nrfy_grtc_int_enable_check ( NRF_GRTC_Type const *  p_reg,
uint32_t  mask 
)
See also
nrf_grtc_int_enable_check Function for checking if the specified interrupts are enabled.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be checked. Use nrf_grtc_int_mask_t values for bit masking.
Returns
Mask of enabled interrupts.

◆ nrfy_grtc_int_init()

NRFY_STATIC_INLINE void nrfy_grtc_int_init ( NRF_GRTC_Type *  p_reg,
uint32_t  mask,
uint8_t  irq_priority,
bool  enable 
)

Function for initializing the specified GRTC interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be initialized.
[in]irq_priorityInterrupt priority.
[in]enableTrue if the interrupts are to be enabled, false otherwise.

◆ nrfy_grtc_int_pending_get()

NRFY_STATIC_INLINE uint32_t nrfy_grtc_int_pending_get ( NRF_GRTC_Type const *  p_reg)
See also
nrf_grtc_int_pending_get Function for retrieving the state of pending interrupts.
Note
States of pending interrupt are saved as a bitmask. One set at particular position means that interrupt for event is pending.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Bitmask with information about pending interrupts. Use nrf_grtc_int_mask_t values for bit masking.

◆ nrfy_grtc_int_uninit()

NRFY_STATIC_INLINE void nrfy_grtc_int_uninit ( NRF_GRTC_Type *  p_reg)

Function for uninitializing the GRTC interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.

◆ nrfy_grtc_prepare()

NRFY_STATIC_INLINE void nrfy_grtc_prepare ( NRF_GRTC_Type *  p_reg,
bool  busy_wait 
)

Function for preparing the GRTC peripheral.

Note
This function clears all shorts, interrupts, resets and starts the GRTC.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]busy_waitTrue if wait for synchronization operation is to be performed, false otherwise.

◆ nrfy_grtc_publish_clear()

NRFY_STATIC_INLINE void nrfy_grtc_publish_clear ( NRF_GRTC_Type *  p_reg,
nrf_grtc_event_t  event 
)
See also
nrf_grtc_publish_clear Function for clearing the publish configuration for a given GRTC event.
Note
Not every event has its corresponding publish register. Refer to the Product Specification for more information.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent for which to clear the configuration.

◆ nrfy_grtc_publish_set()

NRFY_STATIC_INLINE void nrfy_grtc_publish_set ( NRF_GRTC_Type *  p_reg,
nrf_grtc_event_t  event,
uint8_t  channel 
)
See also
nrf_grtc_publish_set Function for setting the publish configuration for a given GRTC event.
Note
Not every event has its corresponding publish register. Refer to the Product Specification for more information.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent for which to set the configuration.
[in]channelChannel through which to publish the event.

◆ nrfy_grtc_pwm_compare_get()

NRFY_STATIC_INLINE uint32_t nrfy_grtc_pwm_compare_get ( NRF_GRTC_Type const *  p_reg)
See also
nrf_grtc_pwm_compare_get Function for getting the PWM compare value.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
Valueof PWM compare.

◆ nrfy_grtc_pwm_compare_set()

NRFY_STATIC_INLINE void nrfy_grtc_pwm_compare_set ( NRF_GRTC_Type *  p_reg,
uint32_t  value 
)
See also
nrf_grtc_pwm_compare_set Function for setting the PWM compare value.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]valuePWM compare value.

◆ nrfy_grtc_rt_counter_cc_get()

NRFY_STATIC_INLINE uint64_t nrfy_grtc_rt_counter_cc_get ( NRF_GRTC_Type const *  p_reg)
See also
nrf_grtc_rt_counter_cc_get Function for returning the compare value for the RTCOUNTER.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Value from the capture/compare register in 32 kHz units.

◆ nrfy_grtc_rt_counter_cc_set()

NRFY_STATIC_INLINE void nrfy_grtc_rt_counter_cc_set ( NRF_GRTC_Type *  p_reg,
uint64_t  cc_value,
bool  sync 
)
See also
nrf_grtc_rt_counter_cc_set Function for setting a compare value for the RTCOUNTER.
Note
The internal synchronization mechanism ensures that the desired value will be properly latched by the GRTC. However when 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.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]cc_valueCompare value to be set in 32 kHz units.
[in]syncTrue if the internal synchronization mechanism shall be used, false otherwise.

◆ nrfy_grtc_rt_counter_get()

NRFY_STATIC_INLINE uint64_t nrfy_grtc_rt_counter_get ( NRF_GRTC_Type const *  p_reg)

Function for returning the RTCOUNTER 32 kHz value.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
RTCOUNTER value.

◆ nrfy_grtc_shorts_disable()

NRFY_STATIC_INLINE void nrfy_grtc_shorts_disable ( NRF_GRTC_Type *  p_reg,
uint32_t  mask 
)
See also
nrf_grtc_shorts_disable Function for disabling the specified shortcuts.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskBitmask of shortcuts to be disabled.

◆ nrfy_grtc_shorts_enable()

NRFY_STATIC_INLINE void nrfy_grtc_shorts_enable ( NRF_GRTC_Type *  p_reg,
uint32_t  mask 
)
See also
nrf_grtc_shorts_enable Function for enabling the specified shortcuts.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskBitmask of shortcuts to be enabled.

◆ nrfy_grtc_shorts_set()

NRFY_STATIC_INLINE void nrfy_grtc_shorts_set ( NRF_GRTC_Type *  p_reg,
uint32_t  mask 
)
See also
nrf_grtc_shorts_set Function for setting the specified shortcuts.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskBitmask of shortcuts to be set.

◆ nrfy_grtc_subscribe_clear()

NRFY_STATIC_INLINE void nrfy_grtc_subscribe_clear ( NRF_GRTC_Type *  p_reg,
nrf_grtc_task_t  task 
)
See also
nrf_grtc_subscribe_clear Function for clearing the subscribe configuration for a given GRTC task.
Note
Not every task has its corresponding subscribe register. Refer to the Product Specification for more information.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask for which to clear the configuration.

◆ nrfy_grtc_subscribe_set()

NRFY_STATIC_INLINE void nrfy_grtc_subscribe_set ( NRF_GRTC_Type *  p_reg,
nrf_grtc_task_t  task,
uint8_t  channel 
)
See also
nrf_grtc_subscribe_set Function for setting the subscribe configuration for a given GRTC task.
Note
Not every task has its corresponding subscribe register. Refer to the Product Specification for more information.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask for which to set the configuration.
[in]channelChannel through which to subscribe events.

◆ nrfy_grtc_sys_conter_ready_check()

NRFY_STATIC_INLINE bool nrfy_grtc_sys_conter_ready_check ( NRF_GRTC_Type const *  p_reg)

Function for checking whether SYSCOUNTER value is ready to be read.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
True if SYSCOUNTER is ready to be read, false otherwise.

◆ nrfy_grtc_sys_counter_active_check()

NRFY_STATIC_INLINE bool nrfy_grtc_sys_counter_active_check ( NRF_GRTC_Type const *  p_reg)
See also
nrf_grtc_sys_counter_active_check Function for checking whether the specified SYSCOUNTER channel is requested to remain active.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
Trueif SYSCOUNTER channel is requested to remain active, false otherwise.

◆ nrfy_grtc_sys_counter_active_set()

NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_active_set ( NRF_GRTC_Type *  p_reg,
bool  enable 
)
See also
nrf_grtc_sys_counter_active_set Function for setting the request to keep the specified SYSCOUNTER channel active.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]enableTrue if the SYSCOUNTER channel is to be kept active, false otherwise.

◆ nrfy_grtc_sys_counter_active_state_request_check()

NRFY_STATIC_INLINE bool nrfy_grtc_sys_counter_active_state_request_check ( NRF_GRTC_Type const *  p_reg)
See also
nrf_grtc_sys_counter_active_state_request_check Function for checking whether the SYSCOUNTER is requested to remain active.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
Trueif request for keeping the SYSCOUNTER is active, false otherwise.

◆ nrfy_grtc_sys_counter_active_state_request_get()

NRFY_STATIC_INLINE uint32_t nrfy_grtc_sys_counter_active_state_request_get ( NRF_GRTC_Type const *  p_reg,
uint32_t  mask 
)
See also
nrf_grtc_sys_counter_active_state_request_get Function for getting the domains that requested the SYSCOUNTER to remain active.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskDomains mask.
Return values
Bitmaskof domains that keep the SYSCOUNTER active.

◆ nrfy_grtc_sys_counter_active_state_request_set()

NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_active_state_request_set ( NRF_GRTC_Type *  p_reg,
bool  enable 
)
See also
nrf_grtc_sys_counter_active_state_request_set Function for setting the request to keep the SYSCOUNTER active.
Note
This function modifies the KEEPRUNNING register, which possesses information whether any local CPU needs keeping the SYSCOUNTER active.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]enableTrue if the automatic mode is to be enabled, false otherwise.

◆ nrfy_grtc_sys_counter_auto_mode_set()

NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_auto_mode_set ( NRF_GRTC_Type *  p_reg,
bool  enable 
)
See also
nrf_grtc_sys_counter_auto_mode_set Function for setting automatic mode for the SYSCOUNTER.
Note
When 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.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]enableTrue if the automatic mode is to be enabled, false otherwise.

◆ nrfy_grtc_sys_counter_capture_subscribe_clear()

NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_capture_subscribe_clear ( NRF_GRTC_Type *  p_reg,
uint8_t  cc_channel 
)

Function for clearing the subscribe configuration for a given GRTC capture channel.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]cc_channelCompare channel for which to clear the configuration.

◆ nrfy_grtc_sys_counter_capture_subscribe_set()

NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_capture_subscribe_set ( NRF_GRTC_Type *  p_reg,
uint8_t  cc_channel,
uint8_t  channel 
)

Function for setting the subscribe configuration for a given GRTC capture channel.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]cc_channelCompare channel for which to set the configuration.
[in]channelChannel through which to subscribe events.

◆ nrfy_grtc_sys_counter_capture_task_get()

NRFY_STATIC_INLINE nrf_grtc_task_t nrfy_grtc_sys_counter_capture_task_get ( uint8_t  cc_channel)
See also
nrf_grtc_sys_counter_capture_task_get Function for getting the 1 MHz SYSCOUNTER timer capture task associated with the specified channel.
Parameters
[in]cc_channelCapture channel.
Returns
Capture task.

◆ nrfy_grtc_sys_counter_cc_add_set()

NRFY_STATIC_INLINE void nrfy_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 
)
See also
nrf_grtc_sys_counter_cc_add_set Function for setting the value to be added to capture/compare register for the SYSCOUNTER.
Note
There are two available configurations of adding operation: When 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.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]cc_channelThe specified capture/compare channel.
[in]valueValue to be added in 1 MHz units.
[in]referenceConfiguration of adding mode.

◆ nrfy_grtc_sys_counter_cc_enable_check()

NRFY_STATIC_INLINE bool nrfy_grtc_sys_counter_cc_enable_check ( NRF_GRTC_Type const *  p_reg,
uint8_t  cc_channel 
)
See also
nrf_grtc_sys_counter_cc_enable_check Function for checking whether the specified capture/compare channel is enabled.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]cc_channelChannel to be checked.
Return values
trueSpecified channel is enabled.
falseSpecified channel is disabled.

◆ nrfy_grtc_sys_counter_cc_get()

NRFY_STATIC_INLINE uint64_t nrfy_grtc_sys_counter_cc_get ( NRF_GRTC_Type const *  p_reg,
uint8_t  cc_channel 
)
See also
nrf_grtc_sys_counter_cc_get Function for getting the capture/compare value of channel for the SYSCOUNTER.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]cc_channelThe specified capture/compare channel.
Returns
Value from the specified capture/compare register in 1MHz units.

◆ nrfy_grtc_sys_counter_cc_set()

NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_cc_set ( NRF_GRTC_Type *  p_reg,
uint8_t  cc_channel,
uint64_t  cc_value 
)
See also
nrf_grtc_sys_counter_cc_set Function for setting the compare value of channel for the SYSCOUNTER.
Note
The corresponding event is automatically disabled by hardware during the operation.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]cc_channelThe specified capture/compare channel.
[in]cc_valueCompare value to be set in 1 MHz units.

◆ nrfy_grtc_sys_counter_check()

NRFY_STATIC_INLINE bool nrfy_grtc_sys_counter_check ( NRF_GRTC_Type *  p_reg)
See also
nrf_grtc_sys_counter_check Function for checking whether the SYSCOUNTER is in active state.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
Trueif the SYSCOUNTER is active, false otherwise.

◆ nrfy_grtc_sys_counter_compare_event_check()

NRFY_STATIC_INLINE bool nrfy_grtc_sys_counter_compare_event_check ( NRF_GRTC_Type const *  p_reg,
uint8_t  cc_channel 
)

Function for retrieving the state of the compare GRTC event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]cc_channelCompare channel of the corresponding event to be checked.
Return values
trueThe event has been generated.
falseThe event has not been generated.

◆ nrfy_grtc_sys_counter_compare_event_clear()

NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_compare_event_clear ( NRF_GRTC_Type *  p_reg,
uint8_t  cc_channel 
)

Function for clearing a compare GRTC event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]cc_channelCompare channel of the corresponding event to be cleared.

◆ nrfy_grtc_sys_counter_compare_event_disable()

NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_compare_event_disable ( NRF_GRTC_Type *  p_reg,
uint8_t  cc_channel 
)
See also
nrf_grtc_sys_counter_compare_event_disable Function for disabling SYSCOUNTER compare event.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]cc_channelChannel number of compare event to be disabled.

◆ nrfy_grtc_sys_counter_compare_event_enable()

NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_compare_event_enable ( NRF_GRTC_Type *  p_reg,
uint8_t  cc_channel 
)
See also
nrf_grtc_sys_counter_compare_event_enable Function for enabling SYSCOUNTER compare event.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]cc_channelChannel number of compare event to be enabled.

◆ nrfy_grtc_sys_counter_compare_event_get()

NRFY_STATIC_INLINE nrf_grtc_event_t nrfy_grtc_sys_counter_compare_event_get ( uint8_t  cc_channel)
See also
nrf_grtc_sys_counter_compare_event_get Function for getting the SYSCOUNTER compare event associated with the specified compare cc_channel.
Parameters
[in]cc_channelCompare channel number.
Returns
Requested compare event.

◆ nrfy_grtc_sys_counter_compare_event_int_clear_enable()

NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_compare_event_int_clear_enable ( NRF_GRTC_Type *  p_reg,
uint8_t  channel,
bool  enable 
)

Function for enabling the GRTC compare event and optionally associated interrupt.

Note
Event is implicitly cleared before enabling the associated interrupt.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]channelChannel representing the GRTC compare event.
[in]enableTrue if associated interrupt is to be enabled, false otherwise.

◆ nrfy_grtc_sys_counter_compare_publish_clear()

NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_compare_publish_clear ( NRF_GRTC_Type *  p_reg,
uint8_t  cc_channel 
)

Function for clearing the publish configuration for a given GRTC compare channel.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]cc_channelCompare channel for which to clear the configuration.

◆ nrfy_grtc_sys_counter_compare_publish_set()

NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_compare_publish_set ( NRF_GRTC_Type *  p_reg,
uint8_t  cc_channel,
uint8_t  channel 
)

Function for setting the publish configuration for a given GRTC compare channel.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]cc_channelCompare channel for which to set the configuration.
[in]channelChannel through which to publish the event.

◆ nrfy_grtc_sys_counter_get()

NRFY_STATIC_INLINE uint64_t nrfy_grtc_sys_counter_get ( NRF_GRTC_Type const *  p_reg)

Function for returning the SYSCOUNTER 1 MHz value.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
SYSCOUNTER value.

◆ nrfy_grtc_sys_counter_interval_get()

NRFY_STATIC_INLINE uint32_t nrfy_grtc_sys_counter_interval_get ( NRF_GRTC_Type const *  p_reg)
See also
nrf_grtc_sys_counter_interval_get Function for getting the value of interval for periodic capture/compare event for channel 0.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
Valueof the interval in 1 MHz units.

◆ nrfy_grtc_sys_counter_interval_set()

NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_interval_set ( NRF_GRTC_Type *  p_reg,
uint32_t  value 
)
See also
nrf_grtc_sys_counter_interval_set Function for setting the periodic compare event for capture/compare channel 0.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]valuePeriod value in 1 MHz units.

◆ nrfy_grtc_sys_counter_overflow_check()

NRFY_STATIC_INLINE bool nrfy_grtc_sys_counter_overflow_check ( NRF_GRTC_Type const *  p_reg)
See also
nrf_grtc_sys_counter_overflow_check Function for checking whether the lower 32-bits of SYSCOUNTER overflowed after last execution of nrf_grtc_sys_counter_low_get.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
Trueif the lower 32-bits of SYSCOUNTER overflowed, false otherwise.

◆ nrfy_grtc_sys_counter_set()

NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_set ( NRF_GRTC_Type *  p_reg,
bool  enable 
)
See also
nrf_grtc_sys_counter_set Function for setting the SYSCOUNTER.
Note
When the SYSCOUNTER is disabled the GRTC uses RTCOUNTER by default.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]enableTrue if SYSCOUNTER is to be enabled, false otherwise.

◆ nrfy_grtc_sys_counter_start()

NRFY_STATIC_INLINE void nrfy_grtc_sys_counter_start ( NRF_GRTC_Type *  p_reg,
bool  busy_wait 
)

Function for starting the SYSCOUNTER.

Note
This function enables the 1 MHz counter and set it as always active.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]busy_waitTrue if wait for synchronization operation is to be performed, false otherwise.

◆ nrfy_grtc_task_address_get()

NRFY_STATIC_INLINE uint32_t nrfy_grtc_task_address_get ( NRF_GRTC_Type const *  p_reg,
nrf_grtc_task_t  task 
)
See also
nrf_grtc_task_address_get Function for returning the address of a task.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskRequested task.
Returns
Address of the requested task register.

◆ nrfy_grtc_task_trigger()

NRFY_STATIC_INLINE void nrfy_grtc_task_trigger ( NRF_GRTC_Type *  p_reg,
nrf_grtc_task_t  task 
)
See also
nrf_grtc_task_trigger Function for starting a task.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskRequested task.

◆ nrfy_grtc_timeout_get()

NRFY_STATIC_INLINE uint32_t nrfy_grtc_timeout_get ( NRF_GRTC_Type const *  p_reg)
See also
nrf_grtc_timeout_get Function for getting the value of the timeout value for GRTC.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
Valueof the timeout in 32 kHz units.

◆ nrfy_grtc_timeout_set()

NRFY_STATIC_INLINE void nrfy_grtc_timeout_set ( NRF_GRTC_Type *  p_reg,
uint32_t  value 
)
See also
nrf_grtc_timeout_set Function for setting the timeout value for GRTC.
Note
Timeout between all CPUs going to sleep and stopping the SYSCOUNTER.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]valueTimeout value in 32 kHz units.

◆ nrfy_grtc_waketime_get()

NRFY_STATIC_INLINE uint32_t nrfy_grtc_waketime_get ( NRF_GRTC_Type const *  p_reg)
See also
nrf_grtc_waketime_get Function for getting the wake time value.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
Valueof wake time in 32 kHz units.

◆ nrfy_grtc_waketime_set()

NRFY_STATIC_INLINE void nrfy_grtc_waketime_set ( NRF_GRTC_Type *  p_reg,
uint32_t  value 
)
See also
nrf_grtc_waketime_set Function for setting the wake time value for GRTC.
Note
The wake time is maximum number of 32 kHz cycles takes to restore the APB registers when waking from sleep state.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]valueWake time value in 32 kHz units.

Documentation feedback | Developer Zone | Subscribe | Updated