LRCCONF HAL

group nrf_lrcconf_hal

Hardware access layer for managing the Local Resource Controller Configuration (LRCCONF) peripheral.

Defines

NRF_LRCCONF_CLK_COUNT

Number of clocks supported by LRCCONF.

NRF_LRCCONF_AXI_WAITSTATES_ARRAY_SIZE

Size of AXI bridge waitstates array.

Enums

enum nrf_lrcconf_task_t

Tasks.

Values:

enumerator NRF_LRCCONF_TASK_CLKSTART_0

Request the clock source for clock 0.

enumerator NRF_LRCCONF_TASK_CLKSTART_1

Request the clock source for clock 1.

enumerator NRF_LRCCONF_TASK_CLKSTART_2

Request the clock source for clock 2.

enumerator NRF_LRCCONF_TASK_CLKSTART_3

Request the clock source for clock 3.

enumerator NRF_LRCCONF_TASK_CLKSTART_4

Request the clock source for clock 4.

enumerator NRF_LRCCONF_TASK_CLKSTART_5

Request the clock source for clock 5.

enumerator NRF_LRCCONF_TASK_CLKSTART_6

Request the clock source for clock 6.

enumerator NRF_LRCCONF_TASK_CLKSTART_7

Request the clock source for clock 7.

enumerator NRF_LRCCONF_TASK_CLKSTOP_0

Stop requesting the clock source for clock 0.

enumerator NRF_LRCCONF_TASK_CLKSTOP_1

Stop requesting the clock source for clock 1.

enumerator NRF_LRCCONF_TASK_CLKSTOP_2

Stop requesting the clock source for clock 2.

enumerator NRF_LRCCONF_TASK_CLKSTOP_3

Stop requesting the clock source for clock 3.

enumerator NRF_LRCCONF_TASK_CLKSTOP_4

Stop requesting the clock source for clock 4.

enumerator NRF_LRCCONF_TASK_CLKSTOP_5

Stop requesting the clock source for clock 5.

enumerator NRF_LRCCONF_TASK_CLKSTOP_6

Stop requesting the clock source for clock 6.

enumerator NRF_LRCCONF_TASK_CLKSTOP_7

Stop requesting the clock source for clock 7.

enumerator NRF_LRCCONF_TASK_CONSTLAT_ENABLE

Enable constant latency mode.

enumerator NRF_LRCCONF_TASK_CONSTLAT_DISABLE

Disable constant latency mode.

enumerator NRF_LRCCONF_TASK_SYSTEMOFFNOTREADY

Indicate being not ready to system off .

enumerator NRF_LRCCONF_TASK_SYSTEMOFFREADY

Indicate being ready to system off .

enum nrf_lrcconf_event_t

Events.

Values:

enumerator NRF_LRCCONF_EVENT_CLKSTARTED_0

Clock 0 started.

enumerator NRF_LRCCONF_EVENT_CLKSTARTED_1

Clock 1 started.

enumerator NRF_LRCCONF_EVENT_CLKSTARTED_2

Clock 2 started.

enumerator NRF_LRCCONF_EVENT_CLKSTARTED_3

Clock 3 started.

enumerator NRF_LRCCONF_EVENT_CLKSTARTED_4

Clock 4 started.

enumerator NRF_LRCCONF_EVENT_CLKSTARTED_5

Clock 5 started.

enumerator NRF_LRCCONF_EVENT_CLKSTARTED_6

Clock 6 started.

enumerator NRF_LRCCONF_EVENT_CLKSTARTED_7

Clock 7 started.

enum nrf_lrcconf_clk_src_t

Clock sources.

Values:

enumerator NRF_LRCCONF_CLK_SRC_OPEN_LOOP

Open loop mode.

enumerator NRF_LRCCONF_CLK_SRC_CLOSED_LOOP

Closed loop mode.

enum nrf_lrcconf_power_domain_mask_t

Power domain mask.

Values:

enumerator NRF_LRCCONF_POWER_MAIN

Mask for main power domain.

enumerator NRF_LRCCONF_POWER_DOMAIN_0

Mask for power domain 0.

enumerator NRF_LRCCONF_POWER_DOMAIN_1

Mask for power domain 1.

enumerator NRF_LRCCONF_POWER_DOMAIN_2

Mask for power domain 2.

enumerator NRF_LRCCONF_POWER_DOMAIN_3

Mask for power domain 3.

enumerator NRF_LRCCONF_POWER_DOMAIN_4

Mask for power domain 4.

enumerator NRF_LRCCONF_POWER_DOMAIN_5

Mask for power domain 5.

enumerator NRF_LRCCONF_POWER_DOMAIN_6

Mask for power domain 6.

enumerator NRF_LRCCONF_POWER_DOMAIN_7

Mask for power domain 7.

Functions

NRF_STATIC_INLINE void nrf_lrcconf_task_trigger(NRF_LRCCONF_Type *p_reg, nrf_lrcconf_task_t task)

Function for starting a task.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • task[in] Requested task.

NRF_STATIC_INLINE uint32_t nrf_lrcconf_task_address_get(NRF_LRCCONF_Type const *p_reg, nrf_lrcconf_task_t task)

Function for returning the address of a task.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • task[in] Requested task.

Returns:

Address of the requested task register.

NRF_STATIC_INLINE uint32_t nrf_lrcconf_event_address_get(NRF_LRCCONF_Type const *p_reg, nrf_lrcconf_event_t event)

Function for returning the address of an event.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • event[in] Requested event.

Returns:

Address of the requested event register.

NRF_STATIC_INLINE void nrf_lrcconf_event_clear(NRF_LRCCONF_Type *p_reg, nrf_lrcconf_event_t event)

Function for clearing an event.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • event[in] Event to be cleared.

NRF_STATIC_INLINE bool nrf_lrcconf_event_check(NRF_LRCCONF_Type const *p_reg, nrf_lrcconf_event_t event)

Function for retrieving the state of the specified event.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • event[in] Event to be checked.

Return values:
  • true – The event has been generated.

  • false – The event has not been generated.

NRF_STATIC_INLINE nrf_lrcconf_task_t nrf_lrcconf_clkstart_task_get(uint8_t index)

Function for getting CLKSTART task by its index.

Parameters:
  • index[in] Index of the CLKSTART task.

Returns:

CLKSTART task.

NRF_STATIC_INLINE nrf_lrcconf_task_t nrf_lrcconf_clkstop_task_get(uint8_t index)

Function for getting CLKSTOP task by its index.

Parameters:
  • index[in] Index of the CLKSTOP task.

Returns:

CLKSTOP task.

NRF_STATIC_INLINE nrf_lrcconf_event_t nrf_lrcconf_clkstarted_event_get(uint8_t index)

Function for getting CLKSTARTED event by its index.

Parameters:
  • index[in] Index of the CLKSTARTED event.

Returns:

CLKSTARTED event.

NRF_STATIC_INLINE nrf_lrcconf_power_domain_mask_t nrf_lrcconf_power_domain_on_get(uint8_t index)

Function for getting power domain on mask by its index.

Parameters:
  • index[in] Index of the domain.

Returns:

Enum value for domain.

NRF_STATIC_INLINE bool nrf_lrcconf_clock_run_status_check(NRF_LRCCONF_Type const *p_reg, uint8_t clock)

Function for retrieving the status indicating whether TASK_CLKSTART task has been triggered.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • clock[in] Clock index.

Return values:
  • true – Clock start task has been triggered.

  • false – Clock start task has not been triggered.

NRF_STATIC_INLINE nrf_lrcconf_clk_src_t nrf_lrcconf_clock_source_get(NRF_LRCCONF_Type const *p_reg, uint8_t clock)

Function for retrieving the source of the specified clock.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • clock[in] Clock index.

Returns:

Clock source.

NRF_STATIC_INLINE void nrf_lrcconf_clock_always_run_force_set(NRF_LRCCONF_Type *p_reg, uint8_t clock, bool alwaysrun)

Function for setting the specified clock to remain running.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • clock[in] Clock index.

  • alwaysrun[in] True if forcing the clock to remain on is to be enabled, false otherwise.

NRF_STATIC_INLINE bool nrf_lrcconf_clock_always_run_check(NRF_LRCCONF_Type const *p_reg, uint8_t clock)

Function for checking if the specified clock is configured to remain running.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • clock[in] Clock index.

Return values:
  • true – The clock is configured to remain on.

  • false – The clock is not configured to remain on.

NRF_STATIC_INLINE void nrf_lrcconf_clock_source_set(NRF_LRCCONF_Type *p_reg, uint8_t clock, nrf_lrcconf_clk_src_t source)

Function for setting the source of the specified clock.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • clock[in] Clock index.

  • source[in] Clock source to be set.

NRF_STATIC_INLINE bool nrf_lrcconf_constlatstat_check(NRF_LRCCONF_Type const *p_reg)

Function for checking the status of constant latency.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

Return values:
  • true – Constant latency enabled.

  • false – Constant latency disabled, low power enabled.

NRF_STATIC_INLINE void nrf_lrcconf_poweron_force_set(NRF_LRCCONF_Type *p_reg, nrf_lrcconf_power_domain_mask_t domain_mask, bool alwayson)

Function for setting the power domain to remain on.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • domain_mask[in] Mask of power domains to remain on.

  • alwayson[in] True if forcing the power domain to remain on is to be enabled, false otherwise.

NRF_STATIC_INLINE bool nrf_lrcconf_poweron_force_check(NRF_LRCCONF_Type const *p_reg, nrf_lrcconf_power_domain_mask_t domain)

Function for checking if the power domain is configured to remain on.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • domain[in] Power domain to be checked.

Return values:
  • true – The domain is configured to remain on.

  • false – The domain is not configured to remain on.

NRF_STATIC_INLINE void nrf_lrcconf_retain_set(NRF_LRCCONF_Type *p_reg, nrf_lrcconf_power_domain_mask_t domain_mask, bool retain)

Function for setting the power domain to be retained in System ON idle.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • domain_mask[in] Mask of power domains to be retained.

  • retain[in] True if power domain retention is to be enabled, flase otherwise.

NRF_STATIC_INLINE bool nrf_lrcconf_retain_check(NRF_LRCCONF_Type const *p_reg, nrf_lrcconf_power_domain_mask_t domain)

Function for checking if the power domain is configured to be retained in System ON idle.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • domain[in] Power domain to be checked.

Return values:
  • true – The domain is configured to be retained.

  • false – The domain is not configured to be retained.

NRF_STATIC_INLINE void nrf_lrcconf_axi_waitstates_set(NRF_LRCCONF_Type *p_reg, uint8_t domain, uint8_t waitstates_num)

Function for setting the waitstates for the AXI bridge connection.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • domain[in] Functional domain identifier.

  • waitstates_num[in] Number of waitstates.

NRF_STATIC_INLINE uint8_t nrf_lrcconf_axi_waitstates_get(NRF_LRCCONF_Type const *p_reg, uint8_t domain)

Function for getting the waitstates for the AXI bridge connection.

Parameters:
  • p_reg[in] Pointer to the structure of registers of the peripheral.

  • domain[in] Functional domain identifier.

Returns:

Number of waitstates