nrfx 4.5.0
Loading...
Searching...
No Matches
RRAMC HAL

Hardware access layer for managing the the Resistive Random Access Memory Controller (RRAMC) peripheral. More...

Data Structures

struct  nrf_rramc_config_t
 RRAMC configuration structure. More...
 
struct  nrf_rramc_ready_next_timeout_t
 Preload timeout value for waiting for a next write. More...
 
struct  nrf_rramc_power_t
 Power configuration. More...
 
struct  nrf_rramc_region_config_t
 RRAMC region configuration. More...
 

Macros

#define NRF_RRAMC_HAS_SECURE_CONFIG   1
 Symbol indicating whether RRAM controller has secure-only access configuration.
 
#define NRF_RRAMC_HAS_LP_MODE_NAP   1
 Symbol indicating whether RRAM controller has nap mode.
 
#define NRF_RRAMC_HAS_LP_MODE_POWER_DOWN   1
 Symbol indicating whether RRAM controller has power down mode.
 
#define NRF_RRAMC_HAS_WRITE_SUSPEND   1
 Symbol indicating whether RRAM controller has write suspend feature.
 
#define NRF_RRAMC_HAS_TRIGGER_POF   1
 Symbol indicating whether RRAM controller has power failure trigger feature.
 
#define NRF_RRAMC_HAS_CLEAR_POF   1
 Symbol indicating whether RRAM controller has power failure clear feature.
 
#define NRF_RRAMC_HAS_ECC_ERROR   1
 Symbol indicating whether RRAM controller has ECC error feature.
 
#define NRF_RRAMC_HAS_READ_ERROR   1
 Symbol indicating whether RRAM controller has read error feature.
 
#define NRF_RRAMC_CONFIG_WRITE_BUFF_SIZE_MAX   RRAMC_CONFIG_WRITEBUFSIZE_Max
 Maximum size of a write-buffer in number of 128-bit words.
 
#define NRF_RRAMC_READYNEXTTIMEOUT_MAX   RRAMC_READYNEXTTIMEOUT_VALUE_Max
 Maximum preload timeout value for waiting for a next write.
 
#define NRF_RRAMC_REGION_CONFIG_PERM_MASK
 RRAMC region permissions bitmask.
 

Enumerations

enum  nrf_rramc_task_t {
  NRF_RRAMC_TASK_WAKEUP = offsetof(NRF_RRAMC_Type, TASKS_WAKEUP) ,
  NRF_RRAMC_TASK_COMMIT_WRITEBUF = offsetof(NRF_RRAMC_Type, TASKS_COMMITWRITEBUF) ,
  NRF_RRAMC_TASK_TRIGGER_POF = offsetof(NRF_RRAMC_Type, TASKS_TRIGGERPOF) ,
  NRF_RRAMC_TASK_CLEAR_POF = offsetof(NRF_RRAMC_Type, TASKS_CLEARPOF)
}
 RRAMC tasks. More...
 
enum  nrf_rramc_event_t {
  NRF_RRAMC_EVENT_WOKENUP = offsetof(NRF_RRAMC_Type, EVENTS_WOKENUP) ,
  NRF_RRAMC_EVENT_READY = offsetof(NRF_RRAMC_Type, EVENTS_READY) ,
  NRF_RRAMC_EVENT_READY_NEXT = offsetof(NRF_RRAMC_Type, EVENTS_READYNEXT) ,
  NRF_RRAMC_EVENT_ERROR_ACCESS = offsetof(NRF_RRAMC_Type, EVENTS_ACCESSERROR) ,
  NRF_RRAMC_EVENT_ERROR_ECC = offsetof(NRF_RRAMC_Type, EVENTS_ECCERROR) ,
  NRF_RRAMC_EVENT_ERROR_READ = offsetof(NRF_RRAMC_Type, EVENTS_READERROR)
}
 RRAMC events. More...
 
enum  nrf_rramc_int_mask_t {
  NRF_RRAMC_INT_WOKENUP_MASK = RRAMC_INTENSET_WOKENUP_Msk ,
  NRF_RRAMC_INT_READY_MASK = RRAMC_INTENSET_READY_Msk ,
  NRF_RRAMC_INT_READY_NEXT_MASK = RRAMC_INTENSET_READYNEXT_Msk ,
  NRF_RRAMC_INT_ERROR_ACCESS_MASK = RRAMC_INTENSET_ACCESSERROR_Msk ,
  NRF_RRAMC_INT_ERROR_ECC_MASK = RRAMC_INTENSET_ECCERROR_Msk ,
  NRF_RRAMC_INT_ERROR_READ_MASK = RRAMC_INTENSET_READERROR_Msk ,
  NRF_RRAMC_ALL_INTS_MASK
}
 RRAMC interrupts. More...
 
enum  nrf_rramc_lp_mode_t {
  NRF_RRAMC_LP_POWER_DOWN = RRAMC_POWER_LOWPOWERCONFIG_MODE_PowerDown ,
  NRF_RRAMC_LP_STANDBY = RRAMC_POWER_LOWPOWERCONFIG_MODE_Standby ,
  NRF_RRAMC_LP_NAP = RRAMC_POWER_LOWPOWERCONFIG_MODE_NAP ,
  NRF_RRAMC_LP_POWER_OFF = RRAMC_POWER_LOWPOWERCONFIG_MODE_PowerOff
}
 RRAMC low power modes. More...
 
enum  nrf_rramc_region_perm_mask_t {
  NRF_RRAMC_REGION_PERM_READ_MASK = RRAMC_REGION_CONFIG_READ_Msk ,
  NRF_RRAMC_REGION_PERM_WRITE_MASK = RRAMC_REGION_CONFIG_WRITE_Msk ,
  NRF_RRAMC_REGION_PERM_EXECUTE_MASK = RRAMC_REGION_CONFIG_EXECUTE_Msk ,
  NRF_RRAMC_REGION_PERM_SECURE_MASK = RRAMC_REGION_CONFIG_SECURE_Msk
}
 RRAMC region permissions mask. More...
 

Functions

NRF_STATIC_INLINE void nrf_rramc_task_trigger (NRF_RRAMC_Type *p_reg, nrf_rramc_task_t task)
 Function for activating the specified RRAMC task.
 
NRF_STATIC_INLINE uint32_t nrf_rramc_task_address_get (NRF_RRAMC_Type const *p_reg, nrf_rramc_task_t task)
 Function for getting the address of the specified RRAMC task register.
 
NRF_STATIC_INLINE void nrf_rramc_event_clear (NRF_RRAMC_Type *p_reg, nrf_rramc_event_t event)
 Function for clearing the specified RRAMC event.
 
NRF_STATIC_INLINE bool nrf_rramc_event_check (NRF_RRAMC_Type const *p_reg, nrf_rramc_event_t event)
 Function for retrieving the state of the RRAMC event.
 
NRF_STATIC_INLINE uint32_t nrf_rramc_event_address_get (NRF_RRAMC_Type const *p_reg, nrf_rramc_event_t event)
 Function for getting the address of the specified RRAMC event register.
 
NRF_STATIC_INLINE void nrf_rramc_int_enable (NRF_RRAMC_Type *p_reg, uint32_t mask)
 Function for enabling the specified interrupts.
 
NRF_STATIC_INLINE void nrf_rramc_int_disable (NRF_RRAMC_Type *p_reg, uint32_t mask)
 Function for disabling the specified interrupts.
 
NRF_STATIC_INLINE uint32_t nrf_rramc_int_enable_check (NRF_RRAMC_Type const *p_reg, uint32_t mask)
 Function for checking if the specified interrupts are enabled.
 
NRF_STATIC_INLINE uint32_t nrf_rramc_int_pending_get (NRF_RRAMC_Type const *p_reg)
 Function for getting the state of pending interrupts.
 
NRF_STATIC_INLINE void nrf_rramc_subscribe_set (NRF_RRAMC_Type *p_reg, nrf_rramc_task_t task, uint8_t channel)
 Function for setting the subscribe configuration for a wakeup RRAMC task.
 
NRF_STATIC_INLINE void nrf_rramc_subscribe_clear (NRF_RRAMC_Type *p_reg, nrf_rramc_task_t task)
 Function for clearing the subscribe configuration for a wakeup RRAMC task.
 
NRF_STATIC_INLINE uint32_t nrf_rramc_subscribe_get (NRF_RRAMC_Type const *p_reg, nrf_rramc_task_t task)
 Function for getting the subscribe configuration for a given RRAMC task.
 
NRF_STATIC_INLINE void nrf_rramc_publish_set (NRF_RRAMC_Type *p_reg, nrf_rramc_event_t event, uint8_t channel)
 Function for setting the publish configuration for a wokenup RRAMC event.
 
NRF_STATIC_INLINE void nrf_rramc_publish_clear (NRF_RRAMC_Type *p_reg, nrf_rramc_event_t event)
 Function for clearing the publish configuration for a wokenup RRAMC event.
 
NRF_STATIC_INLINE uint32_t nrf_rramc_publish_get (NRF_RRAMC_Type const *p_reg, nrf_rramc_event_t event)
 Function for getting the publish configuration for a given RRAMC event.
 
NRF_STATIC_INLINE bool nrf_rramc_ready_check (NRF_RRAMC_Type const *p_reg)
 Function for checking current RRAMC operation status.
 
NRF_STATIC_INLINE bool nrf_rramc_write_ready_check (NRF_RRAMC_Type const *p_reg)
 Function for checking whether RRAMC is ready to accept a new write operation.
 
NRF_STATIC_INLINE uint32_t nrf_rramc_error_access_addr_get (NRF_RRAMC_Type const *p_reg)
 Fuction for checking the address of the first access error.
 
NRF_STATIC_INLINE bool nrf_rramc_empty_buffer_check (NRF_RRAMC_Type const *p_reg)
 Function for checking whether the internal write-buffer has been committed to RRAM and is now empty.
 
NRF_STATIC_INLINE void nrf_rramc_config_get (NRF_RRAMC_Type const *p_reg, nrf_rramc_config_t *p_config)
 Function for getting the RRAMC peripheral configuration.
 
NRF_STATIC_INLINE void nrf_rramc_config_set (NRF_RRAMC_Type *p_reg, nrf_rramc_config_t const *p_config)
 Function for setting the RRAMC peripheral configuration.
 
NRF_STATIC_INLINE void nrf_rramc_ready_next_timeout_get (NRF_RRAMC_Type const *p_reg, nrf_rramc_ready_next_timeout_t *p_config)
 Function for getting preload timeout value for waiting for a next write.
 
NRF_STATIC_INLINE void nrf_rramc_ready_next_timeout_set (NRF_RRAMC_Type *p_reg, nrf_rramc_ready_next_timeout_t const *p_config)
 Function for setting preload timeout value for waiting for a next write.
 
NRF_STATIC_INLINE void nrf_rramc_power_config_get (NRF_RRAMC_Type const *p_reg, nrf_rramc_power_t *p_config)
 Function for getting the RRAMC power configuration.
 
NRF_STATIC_INLINE void nrf_rramc_power_config_set (NRF_RRAMC_Type *p_reg, nrf_rramc_power_t const *p_config)
 Function for setting the RRAMC power configuration.
 
NRF_STATIC_INLINE bool nrf_rramc_erase_all_check (NRF_RRAMC_Type const *p_reg)
 Function for checking if the erasing operation of the whole RRAM main block has been started.
 
NRF_STATIC_INLINE void nrf_rramc_erase_all_set (NRF_RRAMC_Type *p_reg)
 Function for erasing whole RRAM main block, that includes the SICR and the UICR.
 
NRF_STATIC_INLINE void nrf_rramc_region_config_set (NRF_RRAMC_Type *p_reg, uint8_t region, nrf_rramc_region_config_t const *p_config)
 Function for setting the configuration of the specified RRAMC region.
 
NRF_STATIC_INLINE void nrf_rramc_region_config_get (NRF_RRAMC_Type const *p_reg, uint8_t region, nrf_rramc_region_config_t *p_config)
 Function for getting the configuration of the specified RRAMC region.
 
NRF_STATIC_INLINE uint32_t nrf_rramc_region_config_raw_get (NRF_RRAMC_Type const *p_reg, uint8_t region)
 Function for getting the raw configuration of the specified RRAMC region.
 
NRF_STATIC_INLINE void nrf_rramc_byte_write (uint32_t address, uint8_t value)
 Function for writing a byte to RRAM memory.
 
NRF_STATIC_INLINE void nrf_rramc_halfword_write (uint32_t address, uint16_t value)
 Function for writing a halfword to RRAM memory.
 
NRF_STATIC_INLINE void nrf_rramc_word_write (uint32_t address, uint32_t value)
 Function for writing a word to RRAM memory.
 
NRF_STATIC_INLINE void nrf_rramc_buffer_write (uint32_t address, void *src, uint32_t num_bytes)
 Function for writing a given number of bytes from a specified buffer into RRAM memory.
 
NRF_STATIC_INLINE uint8_t nrf_rramc_byte_read (uint32_t address)
 Function for reading a byte from the RRAM memory.
 
NRF_STATIC_INLINE uint16_t nrf_rramc_halfword_read (uint32_t address)
 Function for reading a halfword from the RRAM memory.
 
NRF_STATIC_INLINE uint32_t nrf_rramc_word_read (uint32_t address)
 Function for reading a word from the RRAM memory.
 
NRF_STATIC_INLINE void nrf_rramc_buffer_read (void *dst, uint32_t address, uint32_t num_bytes)
 Function for reading a given number of bytes from RRAM memory into a specified buffer.
 
NRF_STATIC_INLINE void nrf_rramc_lp_mode_set (NRF_RRAMC_Type *p_reg, nrf_rramc_lp_mode_t mode)
 Function for setting RRAMC low power mode.
 

Detailed Description

Hardware access layer for managing the the Resistive Random Access Memory Controller (RRAMC) peripheral.

Macro Definition Documentation

◆ NRF_RRAMC_REGION_CONFIG_PERM_MASK

#define NRF_RRAMC_REGION_CONFIG_PERM_MASK
Value:
(RRAMC_REGION_CONFIG_READ_Msk | \
RRAMC_REGION_CONFIG_WRITE_Msk | \
RRAMC_REGION_CONFIG_EXECUTE_Msk | \
NRFX_COND_CODE_1(NRF_RRAMC_HAS_SECURE_CONFIG, \
(RRAMC_REGION_CONFIG_SECURE_Msk), (0))) \
#define NRF_RRAMC_HAS_SECURE_CONFIG
Symbol indicating whether RRAM controller has secure-only access configuration.
Definition nrf_rramc.h:53

RRAMC region permissions bitmask.

Enumeration Type Documentation

◆ nrf_rramc_event_t

RRAMC events.

Enumerator
NRF_RRAMC_EVENT_WOKENUP 

The RRAM is woken up from low power mode.

NRF_RRAMC_EVENT_READY 

RRAMC is ready.

NRF_RRAMC_EVENT_READY_NEXT 

Ready to accept a new write operation.

NRF_RRAMC_EVENT_ERROR_ACCESS 

RRAM access error.

NRF_RRAMC_EVENT_ERROR_ECC 

RRAM ECC error.

NRF_RRAMC_EVENT_ERROR_READ 

RRAM read error.

◆ nrf_rramc_int_mask_t

RRAMC interrupts.

Enumerator
NRF_RRAMC_INT_WOKENUP_MASK 

Interrupt on WOKENUP event.

NRF_RRAMC_INT_READY_MASK 

Interrupt on READY event.

NRF_RRAMC_INT_READY_NEXT_MASK 

Interrupt on READYNEXT event.

NRF_RRAMC_INT_ERROR_ACCESS_MASK 

Interrupt on ACCESSERROR event.

NRF_RRAMC_INT_ERROR_ECC_MASK 

Interrupt on ECCERROR event.

NRF_RRAMC_INT_ERROR_READ_MASK 

Interrupt on READERROR event.

NRF_RRAMC_ALL_INTS_MASK 

All RRAMC interrupts.

All RRAMC interrupts.

◆ nrf_rramc_lp_mode_t

RRAMC low power modes.

Enumerator
NRF_RRAMC_LP_POWER_DOWN 

The RRAM goes into power down mode.

NRF_RRAMC_LP_STANDBY 

The RRAM automatically goes into standby mode while the RRAM is not being accessed.

NRF_RRAMC_LP_NAP 

The RRAM goes into NAP mode.

NRF_RRAMC_LP_POWER_OFF 

The RRAM is powered off.

◆ nrf_rramc_region_perm_mask_t

RRAMC region permissions mask.

Note
When bit is set, the selected action is allowed.
Enumerator
NRF_RRAMC_REGION_PERM_READ_MASK 

Read access.

NRF_RRAMC_REGION_PERM_WRITE_MASK 

Write access.

NRF_RRAMC_REGION_PERM_EXECUTE_MASK 

Software execute.

NRF_RRAMC_REGION_PERM_SECURE_MASK 

Secure-only access.

◆ nrf_rramc_task_t

RRAMC tasks.

Enumerator
NRF_RRAMC_TASK_WAKEUP 

Wakeup the RRAM from low power mode.

NRF_RRAMC_TASK_COMMIT_WRITEBUF 

Commit the data stored in internal write-buffer to RRAM.

NRF_RRAMC_TASK_TRIGGER_POF 

Trigger power failure.

NRF_RRAMC_TASK_CLEAR_POF 

Clear power failure.

Function Documentation

◆ nrf_rramc_buffer_read()

NRF_STATIC_INLINE void nrf_rramc_buffer_read ( void * dst,
uint32_t address,
uint32_t num_bytes )

Function for reading a given number of bytes from RRAM memory into a specified buffer.

Parameters
[in]dstPointer to the buffer to store the data.
[in]addressAddress of the first byte to read.
[in]num_bytesNumber of bytes to read.

◆ nrf_rramc_buffer_write()

NRF_STATIC_INLINE void nrf_rramc_buffer_write ( uint32_t address,
void * src,
uint32_t num_bytes )

Function for writing a given number of bytes from a specified buffer into RRAM memory.

Note
If write buffer is enabled, new data might not be immediately committed to the target memory.
Warning
Before calling this function, the caller must ensure that write mode is enabled using nrf_rramc_config_set.
Parameters
[in]addressDestination address in RRAM.
[in]srcPointer to the buffer from where data will be copied.
[in]num_bytesNumber of bytes to write.

◆ nrf_rramc_byte_read()

NRF_STATIC_INLINE uint8_t nrf_rramc_byte_read ( uint32_t address)

Function for reading a byte from the RRAM memory.

Parameters
[in]addressAddress of the byte to read.
Returns
Value read from RRAM memory.

◆ nrf_rramc_byte_write()

NRF_STATIC_INLINE void nrf_rramc_byte_write ( uint32_t address,
uint8_t value )

Function for writing a byte to RRAM memory.

Note
If write buffer is enabled, new data might not be immediately committed to the target memory.
Warning
Before calling this function, the caller must ensure that write mode is enabled using nrf_rramc_config_set.
Parameters
[in]addressAddress of the byte to write.
[in]valueValue to write.

◆ nrf_rramc_config_get()

NRF_STATIC_INLINE void nrf_rramc_config_get ( NRF_RRAMC_Type const * p_reg,
nrf_rramc_config_t * p_config )

Function for getting the RRAMC peripheral configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_configPointer to the structure to be filled with RRAMC configuration data.

◆ nrf_rramc_config_set()

NRF_STATIC_INLINE void nrf_rramc_config_set ( NRF_RRAMC_Type * p_reg,
nrf_rramc_config_t const * p_config )

Function for setting the RRAMC peripheral configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_configPointer to the structure with configuration to be set.

◆ nrf_rramc_empty_buffer_check()

NRF_STATIC_INLINE bool nrf_rramc_empty_buffer_check ( NRF_RRAMC_Type const * p_reg)

Function for checking whether the internal write-buffer has been committed to RRAM and is now empty.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueThe internal write-buffer is empty and has no content that needs to be commited.
falseThe internal write-buffer has data that needs to be committed.

◆ nrf_rramc_erase_all_check()

NRF_STATIC_INLINE bool nrf_rramc_erase_all_check ( NRF_RRAMC_Type const * p_reg)

Function for checking if the erasing operation of the whole RRAM main block has been started.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueErase of chip started.
falseNo operation.

◆ nrf_rramc_erase_all_set()

NRF_STATIC_INLINE void nrf_rramc_erase_all_set ( NRF_RRAMC_Type * p_reg)

Function for erasing whole RRAM main block, that includes the SICR and the UICR.

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

◆ nrf_rramc_error_access_addr_get()

NRF_STATIC_INLINE uint32_t nrf_rramc_error_access_addr_get ( NRF_RRAMC_Type const * p_reg)

Fuction for checking the address of the first access error.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Access error address.

◆ nrf_rramc_event_address_get()

NRF_STATIC_INLINE uint32_t nrf_rramc_event_address_get ( NRF_RRAMC_Type const * p_reg,
nrf_rramc_event_t event )

Function for getting the address of the specified RRAMC event register.

Parameters
[in]p_regPointer to the peripheral register structure.
[in]eventRequested event.
Returns
Address of the specified event register.

◆ nrf_rramc_event_check()

NRF_STATIC_INLINE bool nrf_rramc_event_check ( NRF_RRAMC_Type const * p_reg,
nrf_rramc_event_t event )

Function for retrieving the state of the RRAMC 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.

◆ nrf_rramc_event_clear()

NRF_STATIC_INLINE void nrf_rramc_event_clear ( NRF_RRAMC_Type * p_reg,
nrf_rramc_event_t event )

Function for clearing the specified RRAMC event.

Parameters
[in]p_regPointer to the peripheral register structure.
[in]eventEvent to clear.

◆ nrf_rramc_halfword_read()

NRF_STATIC_INLINE uint16_t nrf_rramc_halfword_read ( uint32_t address)

Function for reading a halfword from the RRAM memory.

Parameters
[in]addressAddress of the halfword to read.
Returns
Value read from RRAM memory.

◆ nrf_rramc_halfword_write()

NRF_STATIC_INLINE void nrf_rramc_halfword_write ( uint32_t address,
uint16_t value )

Function for writing a halfword to RRAM memory.

Note
If write buffer is enabled, new data might not be immediately committed to the target memory.
Warning
Before calling this function, the caller must ensure that write mode is enabled using nrf_rramc_config_set.
Parameters
[in]addressAddress of the halfword to write.
[in]valueValue to write.

◆ nrf_rramc_int_disable()

NRF_STATIC_INLINE void nrf_rramc_int_disable ( NRF_RRAMC_Type * p_reg,
uint32_t mask )

Function for disabling the specified interrupts.

Parameters
[in]p_regPointer to the peripheral register structure.
[in]maskMask of interrupts to be disabled. Use nrf_rramc_int_mask_t values for bit masking.

◆ nrf_rramc_int_enable()

NRF_STATIC_INLINE void nrf_rramc_int_enable ( NRF_RRAMC_Type * p_reg,
uint32_t mask )

Function for enabling the specified interrupts.

Parameters
[in]p_regPointer to the peripheral register structure.
[in]maskMask of interrupts to be enabled. Use nrf_rramc_int_mask_t values for bit masking.

◆ nrf_rramc_int_enable_check()

NRF_STATIC_INLINE uint32_t nrf_rramc_int_enable_check ( NRF_RRAMC_Type const * p_reg,
uint32_t mask )

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_rramc_int_mask_t values for bit masking.
Returns
Mask of enabled interrupts.

◆ nrf_rramc_int_pending_get()

NRF_STATIC_INLINE uint32_t nrf_rramc_int_pending_get ( NRF_RRAMC_Type const * p_reg)

Function for getting 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_rramc_int_mask_t values for bit masking.

◆ nrf_rramc_lp_mode_set()

NRF_STATIC_INLINE void nrf_rramc_lp_mode_set ( NRF_RRAMC_Type * p_reg,
nrf_rramc_lp_mode_t mode )

Function for setting RRAMC low power mode.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]modeRRAMC low power mode.

◆ nrf_rramc_power_config_get()

NRF_STATIC_INLINE void nrf_rramc_power_config_get ( NRF_RRAMC_Type const * p_reg,
nrf_rramc_power_t * p_config )

Function for getting the RRAMC power configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_configPointer to the structure to be filled with information about power configuration.

◆ nrf_rramc_power_config_set()

NRF_STATIC_INLINE void nrf_rramc_power_config_set ( NRF_RRAMC_Type * p_reg,
nrf_rramc_power_t const * p_config )

Function for setting the RRAMC power configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_configPointer to the structure filled with information about power configuration.

◆ nrf_rramc_publish_clear()

NRF_STATIC_INLINE void nrf_rramc_publish_clear ( NRF_RRAMC_Type * p_reg,
nrf_rramc_event_t event )

Function for clearing the publish configuration for a wokenup RRAMC 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.

◆ nrf_rramc_publish_get()

NRF_STATIC_INLINE uint32_t nrf_rramc_publish_get ( NRF_RRAMC_Type const * p_reg,
nrf_rramc_event_t event )

Function for getting the publish configuration for a given RRAMC event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent for which to read the configuration.
Returns
RRAMC publish configuration.

◆ nrf_rramc_publish_set()

NRF_STATIC_INLINE void nrf_rramc_publish_set ( NRF_RRAMC_Type * p_reg,
nrf_rramc_event_t event,
uint8_t channel )

Function for setting the publish configuration for a wokenup RRAMC 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.

◆ nrf_rramc_ready_check()

NRF_STATIC_INLINE bool nrf_rramc_ready_check ( NRF_RRAMC_Type const * p_reg)

Function for checking current RRAMC operation status.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueCurrent operation is completed, and RRAMC is ready.
falseRRAMC is busy.

◆ nrf_rramc_ready_next_timeout_get()

NRF_STATIC_INLINE void nrf_rramc_ready_next_timeout_get ( NRF_RRAMC_Type const * p_reg,
nrf_rramc_ready_next_timeout_t * p_config )

Function for getting preload timeout value for waiting for a next write.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_configPointer to the structure to be filled with information about preload timeout value.

◆ nrf_rramc_ready_next_timeout_set()

NRF_STATIC_INLINE void nrf_rramc_ready_next_timeout_set ( NRF_RRAMC_Type * p_reg,
nrf_rramc_ready_next_timeout_t const * p_config )

Function for setting preload timeout value for waiting for a next write.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_configPointer to the structure filled with information about$ preload timeout value.

◆ nrf_rramc_region_config_get()

NRF_STATIC_INLINE void nrf_rramc_region_config_get ( NRF_RRAMC_Type const * p_reg,
uint8_t region,
nrf_rramc_region_config_t * p_config )

Function for getting the configuration of the specified RRAMC region.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]regionRegion number.
[in]p_configPointer to the structure to be filled with RRAMC region settings.

◆ nrf_rramc_region_config_raw_get()

NRF_STATIC_INLINE uint32_t nrf_rramc_region_config_raw_get ( NRF_RRAMC_Type const * p_reg,
uint8_t region )

Function for getting the raw configuration of the specified RRAMC region.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]regionRegion number.
Returns
Raw configuration.

◆ nrf_rramc_region_config_set()

NRF_STATIC_INLINE void nrf_rramc_region_config_set ( NRF_RRAMC_Type * p_reg,
uint8_t region,
nrf_rramc_region_config_t const * p_config )

Function for setting the configuration of the specified RRAMC region.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]regionRegion number.
[in]p_configPointer to the configuration structure.

◆ nrf_rramc_subscribe_clear()

NRF_STATIC_INLINE void nrf_rramc_subscribe_clear ( NRF_RRAMC_Type * p_reg,
nrf_rramc_task_t task )

Function for clearing the subscribe configuration for a wakeup RRAMC 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.

◆ nrf_rramc_subscribe_get()

NRF_STATIC_INLINE uint32_t nrf_rramc_subscribe_get ( NRF_RRAMC_Type const * p_reg,
nrf_rramc_task_t task )

Function for getting the subscribe configuration for a given RRAMC task.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask for which to read the configuration.
Returns
RRAMC subscribe configuration.

◆ nrf_rramc_subscribe_set()

NRF_STATIC_INLINE void nrf_rramc_subscribe_set ( NRF_RRAMC_Type * p_reg,
nrf_rramc_task_t task,
uint8_t channel )

Function for setting the subscribe configuration for a wakeup RRAMC 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.

◆ nrf_rramc_task_address_get()

NRF_STATIC_INLINE uint32_t nrf_rramc_task_address_get ( NRF_RRAMC_Type const * p_reg,
nrf_rramc_task_t task )

Function for getting the address of the specified RRAMC task register.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskRRAMC task.
Returns
Address of the specified task register.

◆ nrf_rramc_task_trigger()

NRF_STATIC_INLINE void nrf_rramc_task_trigger ( NRF_RRAMC_Type * p_reg,
nrf_rramc_task_t task )

Function for activating the specified RRAMC task.

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

◆ nrf_rramc_word_read()

NRF_STATIC_INLINE uint32_t nrf_rramc_word_read ( uint32_t address)

Function for reading a word from the RRAM memory.

Parameters
[in]addressAddress of the word to read.
Returns
Value read from RRAM memory.

◆ nrf_rramc_word_write()

NRF_STATIC_INLINE void nrf_rramc_word_write ( uint32_t address,
uint32_t value )

Function for writing a word to RRAM memory.

Note
If write buffer is enabled, new data might not be immediately committed to the target memory.
Warning
Before calling this function, the caller must ensure that write mode is enabled using nrf_rramc_config_set.
Parameters
[in]addressAddress of the word to write.
[in]valueValue to write.

◆ nrf_rramc_write_ready_check()

NRF_STATIC_INLINE bool nrf_rramc_write_ready_check ( NRF_RRAMC_Type const * p_reg)

Function for checking whether RRAMC is ready to accept a new write operation.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueRRAMC is ready to accept a new write operation.
falseRRAMC cannot accept any write operation now.