nrfx 3.3
Data Structures | Macros | Enumerations | Functions
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...
 

Macros

#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.
 

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)
}
 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)
}
 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_ALL_INTS_MASK
}
 RRAMC interrupts. 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 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 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.
 

Detailed Description

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

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_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_ALL_INTS_MASK 

All RRAMC interrupts.

◆ 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.

Function Documentation

◆ 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_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_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_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_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_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_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.

Documentation feedback | Developer Zone | Subscribe | Updated