nrfx 3.3
Data Structures | Macros | Enumerations | Functions
MRAMC HAL

Hardware access layer for managing the Magnetoresistive Random Access Memory Controller (MRAMC) peripheral. More...

Data Structures

struct  nrf_mramc_ecc_t
 Error Correction Code (ECC) information. More...
 
struct  nrf_mramc_config_t
 MRAMC configuration structure. More...
 
struct  nrf_mramc_waitstates_t
 Waitstates for MRAM read access. More...
 
struct  nrf_mramc_readynext_timeout_t
 Preload timeout value for waiting for a next write. More...
 
struct  nrf_mramc_lowavgcurr_t
 Preload timeout value for low average current in case of read, write, and erase. More...
 
struct  nrf_mramc_power_autopowerdown_t
 Structure for configurating the automatic power-down feature using the inactive time period of MRAM. More...
 
struct  nrf_mramc_power_conf_t
 Mask for the various voltages supplies when initiating power-up/down. More...
 
struct  nrf_mramc_config_nvr_t
 Configuration structure for NVR page n. More...
 

Macros

#define NRF_MRAMC_HAS_CONFIGNVR_PAGE_UPPER_PROTECT   1
 Symbol indicating whether CONFIGNVR.PAGE[n] registers have upper part of NVR page read and write protection fields.
 
#define NRF_MRAMC_HAS_CONFIGNVR_PAGE_LOWER_PROTECT   1
 Symbol indicating whether CONFIGNVR.PAGE[n] registers have lower part of NVR page read and write protection fields.
 
#define NRF_MRAMC_HAS_POWER_VREFVPR   0
 Symbol indicating whether the POWER_MASK register has a joined VREFVPR field.
 

Enumerations

enum  nrf_mramc_event_t {
  NRF_MRAMC_EVENT_READY = offsetof(NRF_MRAMC_Type, EVENTS_READY) ,
  NRF_MRAMC_EVENT_READYNEXT = offsetof(NRF_MRAMC_Type, EVENTS_READYNEXT) ,
  NRF_MRAMC_EVENT_ECCERROR = offsetof(NRF_MRAMC_Type, EVENTS_ECCERROR) ,
  NRF_MRAMC_EVENT_ECCERRORCORR = offsetof(NRF_MRAMC_Type, EVENTS_ECCERRORCORR) ,
  NRF_MRAMC_EVENT_TRIMCONFIGREQ = offsetof(NRF_MRAMC_Type, EVENTS_TRIMCONFIGREQ) ,
  NRF_MRAMC_EVENT_ACCESSERR = offsetof(NRF_MRAMC_Type, EVENTS_ACCESSERR)
}
 MRAMC events. More...
 
enum  nrf_mramc_int_mask_t {
  NRF_MRAMC_INT_READY_MASK = MRAMC_INTENSET_READY_Msk ,
  NRF_MRAMC_INT_READYNEXT_MASK = MRAMC_INTENSET_READYNEXT_Msk ,
  NRF_MRAMC_INT_ECCERROR_MASK = MRAMC_INTENSET_ECCERROR_Msk ,
  NRF_MRAMC_INT_ECCERRORCORR_MASK = MRAMC_INTENSET_ECCERRORCORR_Msk ,
  NRF_MRAMC_INT_TRIMCONFIGREQ_MASK = MRAMC_INTENSET_TRIMCONFIGREQ_Msk ,
  NRF_MRAMC_INT_ACCESSERR_MASK = MRAMC_INTENSET_ACCESSERR_Msk
}
 MRAMC interrupts. More...
 
enum  nrf_mramc_mode_write_t {
  NRF_MRAMC_MODE_WRITE_DISABLE = MRAMC_CONFIG_WEN_DisableWrite ,
  NRF_MRAMC_MODE_WRITE_NORMAL = MRAMC_CONFIG_WEN_EnableNormalWrite ,
  NRF_MRAMC_MODE_WRITE_DIRECT = MRAMC_CONFIG_WEN_EnableDirectWrite
}
 Write enable (WEN) settings. More...
 
enum  nrf_mramc_mode_erase_t {
  NRF_MRAMC_MODE_ERASE_DISABLE = MRAMC_CONFIG_EEN_DisableErase ,
  NRF_MRAMC_MODE_ERASE_PAGE = MRAMC_CONFIG_EEN_EnablePageErase ,
  NRF_MRAMC_MODE_ERASE_WORD = MRAMC_CONFIG_EEN_EnableWordErase
}
 Erase enable (EEN) settings. More...
 
enum  nrf_mramc_power_init_t {
  NRF_MRAMC_POWER_INIT_MODE_NO_OPERATION = MRAMC_POWER_INIT_MODE_NoOperation ,
  NRF_MRAMC_POWER_INIT_MODE_UP = MRAMC_POWER_INIT_MODE_PowerUp ,
  NRF_MRAMC_POWER_INIT_MODE_DOWN = MRAMC_POWER_INIT_MODE_PowerDown ,
  NRF_MRAMC_POWER_INIT_MODE_DOWN_TRIM_RET = MRAMC_POWER_INIT_MODE_PowerDownTrimRet
}
 Power mode settings. More...
 
enum  nrf_mramc_power_status_t {
  NRF_MRAMC_POWER_STATUS_OFF = MRAMC_POWER_STATUS_STATE_Off ,
  NRF_MRAMC_POWER_STATUS_POWER_UP_SEQ = MRAMC_POWER_STATUS_STATE_PowerUpSeq ,
  NRF_MRAMC_POWER_STATUS_TRIM_CFG_SEQ = MRAMC_POWER_STATUS_STATE_TrimConfigSeq ,
  NRF_MRAMC_POWER_STATUS_TRIM_CFG_WAIT = MRAMC_POWER_STATUS_STATE_TrimConfigWait ,
  NRF_MRAMC_POWER_STATUS_TRIM_CFG_DONE = MRAMC_POWER_STATUS_STATE_TrimConfigDone ,
  NRF_MRAMC_POWER_STATUS_STANDBY = MRAMC_POWER_STATUS_STATE_Standby ,
  NRF_MRAMC_POWER_STATUS_POWER_DOWN_SEQ = MRAMC_POWER_STATUS_STATE_PowerDownSeq ,
  NRF_MRAMC_POWER_STATUS_OFF_TRIM_RETAIN = MRAMC_POWER_STATUS_STATE_OffTrimRetain
}
 Power mode status. More...
 
enum  nrf_mramc_trim_t {
  NRF_MRAMC_TRIM_READ_UNKNOWN = MRAMC_TRIM_DONE_TRIMCOMPLETED_TrimUnknown ,
  NRF_MRAMC_TRIM_READ_COMPLETED = MRAMC_TRIM_DONE_TRIMCOMPLETED_TrimCompleted
}
 Trim configuration is completed - values for read operation. More...
 

Functions

NRF_STATIC_INLINE void nrf_mramc_event_clear (NRF_MRAMC_Type *p_reg, nrf_mramc_event_t event)
 Function for clearing the specified MRAMC event.
 
NRF_STATIC_INLINE bool nrf_mramc_event_check (NRF_MRAMC_Type const *p_reg, nrf_mramc_event_t event)
 Function for retrieving the state of the MRAMC event.
 
NRF_STATIC_INLINE uint32_t nrf_mramc_event_address_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_event_t event)
 Function for getting the address of the specified MRAMC event register.
 
NRF_STATIC_INLINE void nrf_mramc_int_enable (NRF_MRAMC_Type *p_reg, uint32_t mask)
 Function for enabling the specified interrupts.
 
NRF_STATIC_INLINE void nrf_mramc_int_disable (NRF_MRAMC_Type *p_reg, uint32_t mask)
 Function for disabling the specified interrupts.
 
NRF_STATIC_INLINE uint32_t nrf_mramc_int_enable_check (NRF_MRAMC_Type const *p_reg, uint32_t mask)
 Function for checking if the specified interrupts are enabled.
 
NRF_STATIC_INLINE uint32_t nrf_mramc_int_pending_get (NRF_MRAMC_Type const *p_reg)
 Function for retrieving the state of pending interrupts.
 
NRF_STATIC_INLINE bool nrf_mramc_ready_get (NRF_MRAMC_Type const *p_reg)
 Function for checking current MRAMC operation status.
 
NRF_STATIC_INLINE bool nrf_mramc_readynext_get (NRF_MRAMC_Type const *p_reg)
 Function for checking READYNEXT register status.
 
NRF_STATIC_INLINE void nrf_mramc_ecc_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_ecc_t *p_data)
 Function for getting Error Correction Code (ECC) information.
 
NRF_STATIC_INLINE void nrf_mramc_ecc_error_clear (NRF_MRAMC_Type *p_reg)
 Function for clearing flag indicating detected error which could not be corrected.
 
NRF_STATIC_INLINE void nrf_mramc_ecc_corr_clear (NRF_MRAMC_Type *p_reg)
 Function for clearing flag indicating detected error which was corrected.
 
NRF_STATIC_INLINE void nrf_mramc_config_set (NRF_MRAMC_Type *p_reg, nrf_mramc_config_t const *p_config)
 Function for setting the MRAMC peripheral configuration.
 
NRF_STATIC_INLINE void nrf_mramc_config_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_config_t *p_config)
 Function for getting the MRAMC peripheral configuration.
 
NRF_STATIC_INLINE void nrf_mramc_autoreadmode_set (NRF_MRAMC_Type *p_reg, uint16_t timeout)
 Function for setting the timeout value for automatic read mode.
 
NRF_STATIC_INLINE uint16_t nrf_mramc_autoreadmode_get (NRF_MRAMC_Type const *p_reg)
 Function for getting the timeout value for automatic read mode.
 
NRF_STATIC_INLINE void nrf_mramc_waitstates_set (NRF_MRAMC_Type *p_reg, nrf_mramc_waitstates_t const *p_data)
 Function for setting wait states for MRAM read access.
 
NRF_STATIC_INLINE void nrf_mramc_waitstates_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_waitstates_t *p_data)
 Function for reading wait states for MRAM read access.
 
NRF_STATIC_INLINE void nrf_mramc_readynext_timeout_set (NRF_MRAMC_Type *p_reg, nrf_mramc_readynext_timeout_t const *p_data)
 Function for setting preload timeout value for waiting for a next write.
 
NRF_STATIC_INLINE void nrf_mramc_readynext_timeout_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_readynext_timeout_t *p_data)
 Function for reading preload timeout value for waiting for a next write.
 
NRF_STATIC_INLINE void nrf_mramc_lowavgcurr_set (NRF_MRAMC_Type *p_reg, nrf_mramc_lowavgcurr_t const *p_data)
 Function for setting preload timeout value for low average current in case of read, write and erase.
 
NRF_STATIC_INLINE void nrf_mramc_lowavgcurr_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_lowavgcurr_t *p_data)
 Function for getting preload timeout value for low average current in case of read, write and erase.
 
NRF_STATIC_INLINE void nrf_mramc_power_init_set (NRF_MRAMC_Type *p_reg, nrf_mramc_power_init_t mode)
 Function for setting power-up/down sequence.
 
NRF_STATIC_INLINE nrf_mramc_power_init_t nrf_mramc_power_init_get (NRF_MRAMC_Type const *p_reg)
 Function for getting power-up/down sequence.
 
NRF_STATIC_INLINE void nrf_mramc_power_autopowerdown_set (NRF_MRAMC_Type *p_reg, nrf_mramc_power_autopowerdown_t const *p_data)
 Function for setting automatic power-down feature using the inactive time period of MRAM.
 
NRF_STATIC_INLINE void nrf_mramc_power_autopowerdown_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_power_autopowerdown_t *p_data)
 Function for getting automatic power-down feature using the inactive time period of MRAM.
 
NRF_STATIC_INLINE void nrf_mramc_power_mask_set (NRF_MRAMC_Type *p_reg, nrf_mramc_power_conf_t const *p_data)
 Function for setting mask for the various voltages supplies when initiating power-up/down.
 
NRF_STATIC_INLINE void nrf_mramc_power_mask_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_power_conf_t *p_data)
 Function for getting mask for the various voltages supplies when initiating power-up/down.
 
NRF_STATIC_INLINE nrf_mramc_power_status_t nrf_mramc_power_status_get (NRF_MRAMC_Type const *p_reg)
 Function for getting the power mode status.
 
NRF_STATIC_INLINE void nrf_mramc_powerup_ack_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_power_conf_t *p_data)
 Function for getting status of the power control signals acknowledgement during power-up sequence.
 
NRF_STATIC_INLINE void nrf_mramc_powerdown_ack_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_power_conf_t *p_data)
 Function for getting status of the power control signals acknowledgement during power-down sequence.
 
NRF_STATIC_INLINE void nrf_mramc_power_force_on_set (NRF_MRAMC_Type *p_reg, nrf_mramc_power_conf_t const *p_data)
 Function for setting the configuration of force ON signal of the power supply.
 
NRF_STATIC_INLINE void nrf_mramc_power_force_on_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_power_conf_t *p_data)
 Function for getting force ON the power supply.
 
NRF_STATIC_INLINE void nrf_mramc_power_force_off_set (NRF_MRAMC_Type *p_reg, nrf_mramc_power_conf_t const *p_data)
 Function for setting force OFF the power supply.
 
NRF_STATIC_INLINE void nrf_mramc_power_force_off_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_power_conf_t *p_data)
 Function for getting force OFF the power supply.
 
NRF_STATIC_INLINE void nrf_mramc_trim_datain_set (NRF_MRAMC_Type *p_reg, uint32_t data)
 Function for setting data to be written to the MRAM trim configuration.
 
NRF_STATIC_INLINE uint32_t nrf_mramc_trim_datain_get (NRF_MRAMC_Type const *p_reg)
 Function for getting data written to the MRAM trim configuration.
 
NRF_STATIC_INLINE uint32_t nrf_mramc_trim_dataout_get (NRF_MRAMC_Type const *p_reg)
 Function for getting data read from the MRAM trim configuration.
 
NRF_STATIC_INLINE void nrf_mramc_trim_count_set (NRF_MRAMC_Type *p_reg, uint32_t bits)
 Function for setting number of bits in the current data to be written to and read from the trim configuration.
 
NRF_STATIC_INLINE uint32_t nrf_mramc_trim_count_get (NRF_MRAMC_Type const *p_reg)
 Function for getting number of bits in the current data to be written to and read from the trim configuration.
 
NRF_STATIC_INLINE void nrf_mramc_trim_start (NRF_MRAMC_Type *p_reg)
 Function for setting start shifting data for trim configuration.
 
NRF_STATIC_INLINE bool nrf_mramc_trim_start_get (NRF_MRAMC_Type const *p_reg)
 Function for getting start shifting data for trim configuration.
 
NRF_STATIC_INLINE bool nrf_mramc_trim_ready_get (NRF_MRAMC_Type const *p_reg)
 Function for getting status of shifting the MRAM trim configuration data.
 
NRF_STATIC_INLINE void nrf_mramc_trim_done_set (NRF_MRAMC_Type *p_reg)
 Function for indicating to the MRAMC that the whole MRAM trim configuration data write is completed.
 
NRF_STATIC_INLINE nrf_mramc_trim_t nrf_mramc_trim_done_get (NRF_MRAMC_Type const *p_reg)
 Function for getting trim configuration data status.
 
NRF_STATIC_INLINE void nrf_mramc_erase_word_set (NRF_MRAMC_Type *p_reg, uint32_t address)
 Function for erasing a 32-bit word in the MRAM main block.
 
NRF_STATIC_INLINE uint32_t nrf_mramc_erase_word_get (NRF_MRAMC_Type const *p_reg)
 Function for getting address of word in the MRAM main block to be erased.
 
NRF_STATIC_INLINE void nrf_mramc_erase_area_set (NRF_MRAMC_Type *p_reg, uint32_t address, uint32_t size)
 Function for erasing an area in the MRAM main block.
 
NRF_STATIC_INLINE void nrf_mramc_erase_area_get (NRF_MRAMC_Type const *p_reg, uint32_t *p_address, uint32_t *p_size)
 Function for getting address and size of the area to be erased in the MRAM main block.
 
NRF_STATIC_INLINE void nrf_mramc_erase_all (NRF_MRAMC_Type *p_reg)
 Function for erasing erasing whole MRAM main block and the first NVR page.
 
NRF_STATIC_INLINE bool nrf_mramc_erase_all_get (NRF_MRAMC_Type const *p_reg)
 Function for getting ERASE.ERASEALL register value.
 
NRF_STATIC_INLINE void nrf_mramc_erase_word_lock_set (NRF_MRAMC_Type *p_reg, bool lock)
 Function for setting the eraseword lock status.
 
NRF_STATIC_INLINE bool nrf_mramc_erase_word_lock_get (NRF_MRAMC_Type const *p_reg)
 Function for getting the eraseword lock status.
 
NRF_STATIC_INLINE void nrf_mramc_erase_area_lock_set (NRF_MRAMC_Type *p_reg, bool lock)
 Function for setting the erasearea lock status.
 
NRF_STATIC_INLINE bool nrf_mramc_erase_area_lock_get (NRF_MRAMC_Type const *p_reg)
 Function for getting the erasearea lock status.
 
NRF_STATIC_INLINE void nrf_mramc_erase_all_lock_set (NRF_MRAMC_Type *p_reg, bool lock)
 Function for setting the eraseall lock status.
 
NRF_STATIC_INLINE bool nrf_mramc_erase_all_lock_get (NRF_MRAMC_Type const *p_reg)
 Function for getting the eraseall lock status.
 
NRF_STATIC_INLINE void nrf_mramc_config_nvr_set (NRF_MRAMC_Type *p_reg, nrf_mramc_config_nvr_t const *p_data, uint8_t page)
 Function for configuring the specified NVR page.
 
NRF_STATIC_INLINE void nrf_mramc_config_nvr_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_config_nvr_t *p_data, uint8_t page)
 Function for getting the configuring of the specified NVR page.
 

Detailed Description

Hardware access layer for managing the Magnetoresistive Random Access Memory Controller (MRAMC) peripheral.

Enumeration Type Documentation

◆ nrf_mramc_event_t

MRAMC events.

Enumerator
NRF_MRAMC_EVENT_READY 

Current operation is completed.

NRF_MRAMC_EVENT_READYNEXT 

Ready to accept a new write operation.

NRF_MRAMC_EVENT_ECCERROR 

ECC error detected but not corrected.

NRF_MRAMC_EVENT_ECCERRORCORR 

ECC error detected and corrected.

NRF_MRAMC_EVENT_TRIMCONFIGREQ 

MRAM trim configuration request. The MRAMC is ready for the MRAM trim configuration.

NRF_MRAMC_EVENT_ACCESSERR 

MRAM access error.

◆ nrf_mramc_int_mask_t

MRAMC interrupts.

Enumerator
NRF_MRAMC_INT_READY_MASK 

Interrupt on READY event.

NRF_MRAMC_INT_READYNEXT_MASK 

Interrupt on READYNEXT event.

NRF_MRAMC_INT_ECCERROR_MASK 

Interrupt on ECCERROR event.

NRF_MRAMC_INT_ECCERRORCORR_MASK 

Interrupt on ECCERRORCORR event.

NRF_MRAMC_INT_TRIMCONFIGREQ_MASK 

Interrupt on TRIMCONFIGREQ event.

NRF_MRAMC_INT_ACCESSERR_MASK 

Interrupt on ACCESSERR event.

◆ nrf_mramc_mode_erase_t

Erase enable (EEN) settings.

Enumerator
NRF_MRAMC_MODE_ERASE_DISABLE 

Erase is disabled but read is allowed.

NRF_MRAMC_MODE_ERASE_PAGE 

Erase page and read are allowed.

NRF_MRAMC_MODE_ERASE_WORD 

Erase word and read are allowed.

◆ nrf_mramc_mode_write_t

Write enable (WEN) settings.

Enumerator
NRF_MRAMC_MODE_WRITE_DISABLE 

Write is disabled.

NRF_MRAMC_MODE_WRITE_NORMAL 

Normal write is enabled.

NRF_MRAMC_MODE_WRITE_DIRECT 

Direct write is enabled.

◆ nrf_mramc_power_init_t

Power mode settings.

Enumerator
NRF_MRAMC_POWER_INIT_MODE_NO_OPERATION 

No change in power mode.

NRF_MRAMC_POWER_INIT_MODE_UP 

Triggers power-up sequence.

NRF_MRAMC_POWER_INIT_MODE_DOWN 

Initiates power-down sequence.

NRF_MRAMC_POWER_INIT_MODE_DOWN_TRIM_RET 

Initiates power-down sequence with trim retained.

◆ nrf_mramc_power_status_t

Power mode status.

Enumerator
NRF_MRAMC_POWER_STATUS_OFF 

MRAM is OFF.

NRF_MRAMC_POWER_STATUS_POWER_UP_SEQ 

MRAM power-up sequence is active.

NRF_MRAMC_POWER_STATUS_TRIM_CFG_SEQ 

Request for the MRAM trim configuration.

NRF_MRAMC_POWER_STATUS_TRIM_CFG_WAIT 

Waiting for the MRAM trim configuration to complete.

NRF_MRAMC_POWER_STATUS_TRIM_CFG_DONE 

The MRAM trim configuration to completed (This is momentary state).

NRF_MRAMC_POWER_STATUS_STANDBY 

MRAM is in standby mode.

NRF_MRAMC_POWER_STATUS_POWER_DOWN_SEQ 

MRAM power-down sequence is active.

NRF_MRAMC_POWER_STATUS_OFF_TRIM_RETAIN 

MRAM is OFF with trim configuration in retain.

◆ nrf_mramc_trim_t

Trim configuration is completed - values for read operation.

Enumerator
NRF_MRAMC_TRIM_READ_UNKNOWN 

Read: Trim configuration is unknown.

NRF_MRAMC_TRIM_READ_COMPLETED 

Read: Trim configuration data write is completed.

Function Documentation

◆ nrf_mramc_autoreadmode_get()

NRF_STATIC_INLINE uint16_t nrf_mramc_autoreadmode_get ( NRF_MRAMC_Type const *  p_reg)

Function for getting the timeout value for automatic read mode.

Note
The timeout value is number of MRAMC clock cycles. This feature is disabled when the value is 0.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Timeout value.

◆ nrf_mramc_autoreadmode_set()

NRF_STATIC_INLINE void nrf_mramc_autoreadmode_set ( NRF_MRAMC_Type *  p_reg,
uint16_t  timeout 
)

Function for setting the timeout value for automatic read mode.

Note
The timeout value is number of MRAMC clock cycles. This feature is disabled when the value is 0. The CONFIG is updated on timeout. Timeout value must be in range: 0-4095.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]timeoutTimeout value.

◆ nrf_mramc_config_get()

NRF_STATIC_INLINE void nrf_mramc_config_get ( NRF_MRAMC_Type const *  p_reg,
nrf_mramc_config_t p_config 
)

Function for getting the MRAMC peripheral configuration.

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

◆ nrf_mramc_config_nvr_get()

NRF_STATIC_INLINE void nrf_mramc_config_nvr_get ( NRF_MRAMC_Type const *  p_reg,
nrf_mramc_config_nvr_t p_data,
uint8_t  page 
)

Function for getting the configuring of the specified NVR page.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_dataPointer to the settings data.
[in]pagePage number [0...3].

◆ nrf_mramc_config_nvr_set()

NRF_STATIC_INLINE void nrf_mramc_config_nvr_set ( NRF_MRAMC_Type *  p_reg,
nrf_mramc_config_nvr_t const *  p_data,
uint8_t  page 
)

Function for configuring the specified NVR page.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_dataPointer to the settings data.
[in]pagePage number [0...3].

◆ nrf_mramc_config_set()

NRF_STATIC_INLINE void nrf_mramc_config_set ( NRF_MRAMC_Type *  p_reg,
nrf_mramc_config_t const *  p_config 
)

Function for setting the MRAMC peripheral configuration.

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

◆ nrf_mramc_ecc_corr_clear()

NRF_STATIC_INLINE void nrf_mramc_ecc_corr_clear ( NRF_MRAMC_Type *  p_reg)

Function for clearing flag indicating detected error which was corrected.

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

◆ nrf_mramc_ecc_error_clear()

NRF_STATIC_INLINE void nrf_mramc_ecc_error_clear ( NRF_MRAMC_Type *  p_reg)

Function for clearing flag indicating detected error which could not be corrected.

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

◆ nrf_mramc_ecc_get()

NRF_STATIC_INLINE void nrf_mramc_ecc_get ( NRF_MRAMC_Type const *  p_reg,
nrf_mramc_ecc_t p_data 
)

Function for getting Error Correction Code (ECC) information.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_dataPointer to the data structure to be filled with ECC information.

◆ nrf_mramc_erase_all()

NRF_STATIC_INLINE void nrf_mramc_erase_all ( NRF_MRAMC_Type *  p_reg)

Function for erasing erasing whole MRAM main block and the first NVR page.

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

◆ nrf_mramc_erase_all_get()

NRF_STATIC_INLINE bool nrf_mramc_erase_all_get ( NRF_MRAMC_Type const *  p_reg)

Function for getting ERASE.ERASEALL register value.

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

◆ nrf_mramc_erase_all_lock_get()

NRF_STATIC_INLINE bool nrf_mramc_erase_all_lock_get ( NRF_MRAMC_Type const *  p_reg)

Function for getting the eraseall lock status.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueLock enabled.
falseLock disabled.

◆ nrf_mramc_erase_all_lock_set()

NRF_STATIC_INLINE void nrf_mramc_erase_all_lock_set ( NRF_MRAMC_Type *  p_reg,
bool  lock 
)

Function for setting the eraseall lock status.

Note
When the lock is enabled, the write to the corresponding erase register is ignored, it remains enabled until the next reset cycle.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]lockSet true to enable or false to disable a lock.

◆ nrf_mramc_erase_area_get()

NRF_STATIC_INLINE void nrf_mramc_erase_area_get ( NRF_MRAMC_Type const *  p_reg,
uint32_t *  p_address,
uint32_t *  p_size 
)

Function for getting address and size of the area to be erased in the MRAM main block.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_addressPointer to the address of the area.
[out]p_sizePointer to the number of MRAM words to be erased.

◆ nrf_mramc_erase_area_lock_get()

NRF_STATIC_INLINE bool nrf_mramc_erase_area_lock_get ( NRF_MRAMC_Type const *  p_reg)

Function for getting the erasearea lock status.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueLock enabled.
falseLock disabled.

◆ nrf_mramc_erase_area_lock_set()

NRF_STATIC_INLINE void nrf_mramc_erase_area_lock_set ( NRF_MRAMC_Type *  p_reg,
bool  lock 
)

Function for setting the erasearea lock status.

Note
When the lock is enabled, the write to the corresponding erase register is ignored, it remains enabled until the next reset cycle.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]lockSet true to enable or false to disable a lock.

◆ nrf_mramc_erase_area_set()

NRF_STATIC_INLINE void nrf_mramc_erase_area_set ( NRF_MRAMC_Type *  p_reg,
uint32_t  address,
uint32_t  size 
)

Function for erasing an area in the MRAM main block.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]addressStart address of the area that needs to be erased in the MRAM.
[in]sizeNumber of MRAM words to be erased.

◆ nrf_mramc_erase_word_get()

NRF_STATIC_INLINE uint32_t nrf_mramc_erase_word_get ( NRF_MRAMC_Type const *  p_reg)

Function for getting address of word in the MRAM main block to be erased.

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

◆ nrf_mramc_erase_word_lock_get()

NRF_STATIC_INLINE bool nrf_mramc_erase_word_lock_get ( NRF_MRAMC_Type const *  p_reg)

Function for getting the eraseword lock status.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueLock enabled.
falseLock disabled.

◆ nrf_mramc_erase_word_lock_set()

NRF_STATIC_INLINE void nrf_mramc_erase_word_lock_set ( NRF_MRAMC_Type *  p_reg,
bool  lock 
)

Function for setting the eraseword lock status.

Note
When the lock is enabled, the write to the corresponding erase register is ignored, it remains enabled until the next reset cycle.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]lockSet true to enable or false to disable a lock.

◆ nrf_mramc_erase_word_set()

NRF_STATIC_INLINE void nrf_mramc_erase_word_set ( NRF_MRAMC_Type *  p_reg,
uint32_t  address 
)

Function for erasing a 32-bit word in the MRAM main block.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]addressAddress of the word that needs to be erased in the MRAM.

◆ nrf_mramc_event_address_get()

NRF_STATIC_INLINE uint32_t nrf_mramc_event_address_get ( NRF_MRAMC_Type const *  p_reg,
nrf_mramc_event_t  event 
)

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

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

◆ nrf_mramc_event_check()

NRF_STATIC_INLINE bool nrf_mramc_event_check ( NRF_MRAMC_Type const *  p_reg,
nrf_mramc_event_t  event 
)

Function for retrieving the state of the MRAMC 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_mramc_event_clear()

NRF_STATIC_INLINE void nrf_mramc_event_clear ( NRF_MRAMC_Type *  p_reg,
nrf_mramc_event_t  event 
)

Function for clearing the specified MRAMC event.

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

◆ nrf_mramc_int_disable()

NRF_STATIC_INLINE void nrf_mramc_int_disable ( NRF_MRAMC_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_mramc_int_mask_t values for bit masking.

◆ nrf_mramc_int_enable()

NRF_STATIC_INLINE void nrf_mramc_int_enable ( NRF_MRAMC_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_mramc_int_mask_t values for bit masking.

◆ nrf_mramc_int_enable_check()

NRF_STATIC_INLINE uint32_t nrf_mramc_int_enable_check ( NRF_MRAMC_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_mramc_int_mask_t values for bit masking.
Returns
Mask of enabled interrupts.

◆ nrf_mramc_int_pending_get()

NRF_STATIC_INLINE uint32_t nrf_mramc_int_pending_get ( NRF_MRAMC_Type const *  p_reg)

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_mramc_int_mask_t values for bit masking.

◆ nrf_mramc_lowavgcurr_get()

NRF_STATIC_INLINE void nrf_mramc_lowavgcurr_get ( NRF_MRAMC_Type const *  p_reg,
nrf_mramc_lowavgcurr_t p_data 
)

Function for getting preload timeout value for low average current in case of read, write and erase.

Note
The timeout value is number of MRAMC clock cycles, feature is disabled when the value is 0.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_dataPointer to the structure to be filled with information about preload timeout value for average current in case of read, write, and errase operation.

◆ nrf_mramc_lowavgcurr_set()

NRF_STATIC_INLINE void nrf_mramc_lowavgcurr_set ( NRF_MRAMC_Type *  p_reg,
nrf_mramc_lowavgcurr_t const *  p_data 
)

Function for setting preload timeout value for low average current in case of read, write and erase.

Note
The timeout value is number of MRAMC clock cycles, feature is disabled when the value is 0.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_dataPointer to the structure filled with information about preload timeout value for average current in case of read, write, and errase operation.

◆ nrf_mramc_power_autopowerdown_get()

NRF_STATIC_INLINE void nrf_mramc_power_autopowerdown_get ( NRF_MRAMC_Type const *  p_reg,
nrf_mramc_power_autopowerdown_t p_data 
)

Function for getting automatic power-down feature using the inactive time period of MRAM.

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

◆ nrf_mramc_power_autopowerdown_set()

NRF_STATIC_INLINE void nrf_mramc_power_autopowerdown_set ( NRF_MRAMC_Type *  p_reg,
nrf_mramc_power_autopowerdown_t const *  p_data 
)

Function for setting automatic power-down feature using the inactive time period of MRAM.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_dataPointer to the structure filled with information about power-down feature configuration.

◆ nrf_mramc_power_force_off_get()

NRF_STATIC_INLINE void nrf_mramc_power_force_off_get ( NRF_MRAMC_Type const *  p_reg,
nrf_mramc_power_conf_t p_data 
)

Function for getting force OFF the power supply.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_dataPointer to the structure to be filled with information about force OFF power supply.

◆ nrf_mramc_power_force_off_set()

NRF_STATIC_INLINE void nrf_mramc_power_force_off_set ( NRF_MRAMC_Type *  p_reg,
nrf_mramc_power_conf_t const *  p_data 
)

Function for setting force OFF the power supply.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_dataPointer to the structure filled with information about force OFF power supply.

◆ nrf_mramc_power_force_on_get()

NRF_STATIC_INLINE void nrf_mramc_power_force_on_get ( NRF_MRAMC_Type const *  p_reg,
nrf_mramc_power_conf_t p_data 
)

Function for getting force ON the power supply.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_dataPointer to the structure to be filled with information about force ON power supply.

◆ nrf_mramc_power_force_on_set()

NRF_STATIC_INLINE void nrf_mramc_power_force_on_set ( NRF_MRAMC_Type *  p_reg,
nrf_mramc_power_conf_t const *  p_data 
)

Function for setting the configuration of force ON signal of the power supply.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_dataPointer to the structure filled with information about force ON power supply.

◆ nrf_mramc_power_init_get()

NRF_STATIC_INLINE nrf_mramc_power_init_t nrf_mramc_power_init_get ( NRF_MRAMC_Type const *  p_reg)

Function for getting power-up/down sequence.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Power init mode.

◆ nrf_mramc_power_init_set()

NRF_STATIC_INLINE void nrf_mramc_power_init_set ( NRF_MRAMC_Type *  p_reg,
nrf_mramc_power_init_t  mode 
)

Function for setting power-up/down sequence.

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

◆ nrf_mramc_power_mask_get()

NRF_STATIC_INLINE void nrf_mramc_power_mask_get ( NRF_MRAMC_Type const *  p_reg,
nrf_mramc_power_conf_t p_data 
)

Function for getting mask for the various voltages supplies when initiating power-up/down.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_dataPointer to the structure to be filled with information about various voltages supplies when initiating power-up/down.

◆ nrf_mramc_power_mask_set()

NRF_STATIC_INLINE void nrf_mramc_power_mask_set ( NRF_MRAMC_Type *  p_reg,
nrf_mramc_power_conf_t const *  p_data 
)

Function for setting mask for the various voltages supplies when initiating power-up/down.

Note
All bits must be set to 0 for normal operation of MRAM. Incorrect usage would result in unknown behavior of MRAM.
Warning
Do not use this function unless you know the consequences.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_dataPointer to the structure filled with information about various voltages supplies when initiating power-up/down.

◆ nrf_mramc_power_status_get()

NRF_STATIC_INLINE nrf_mramc_power_status_t nrf_mramc_power_status_get ( NRF_MRAMC_Type const *  p_reg)

Function for getting the power mode status.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Status of the power mode.

◆ nrf_mramc_powerdown_ack_get()

NRF_STATIC_INLINE void nrf_mramc_powerdown_ack_get ( NRF_MRAMC_Type const *  p_reg,
nrf_mramc_power_conf_t p_data 
)

Function for getting status of the power control signals acknowledgement during power-down sequence.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_dataPointer to the structure to be filled with information about status of the power control signals acknowledgement during power-down sequence.

◆ nrf_mramc_powerup_ack_get()

NRF_STATIC_INLINE void nrf_mramc_powerup_ack_get ( NRF_MRAMC_Type const *  p_reg,
nrf_mramc_power_conf_t p_data 
)

Function for getting status of the power control signals acknowledgement during power-up sequence.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_dataPointer to the structure to be filled with information about status of the power control signals acknowledgement during power-up sequence.

◆ nrf_mramc_ready_get()

NRF_STATIC_INLINE bool nrf_mramc_ready_get ( NRF_MRAMC_Type const *  p_reg)

Function for checking current MRAMC operation status.

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

◆ nrf_mramc_readynext_get()

NRF_STATIC_INLINE bool nrf_mramc_readynext_get ( NRF_MRAMC_Type const *  p_reg)

Function for checking READYNEXT register status.

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

◆ nrf_mramc_readynext_timeout_get()

NRF_STATIC_INLINE void nrf_mramc_readynext_timeout_get ( NRF_MRAMC_Type const *  p_reg,
nrf_mramc_readynext_timeout_t p_data 
)

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

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

◆ nrf_mramc_readynext_timeout_set()

NRF_STATIC_INLINE void nrf_mramc_readynext_timeout_set ( NRF_MRAMC_Type *  p_reg,
nrf_mramc_readynext_timeout_t const *  p_data 
)

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_dataPointer to the structure filled with information about$ preload timeout value.

◆ nrf_mramc_trim_count_get()

NRF_STATIC_INLINE uint32_t nrf_mramc_trim_count_get ( NRF_MRAMC_Type const *  p_reg)

Function for getting number of bits in the current data to be written to and read from the trim configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Number of bits to be written.

◆ nrf_mramc_trim_count_set()

NRF_STATIC_INLINE void nrf_mramc_trim_count_set ( NRF_MRAMC_Type *  p_reg,
uint32_t  bits 
)

Function for setting number of bits in the current data to be written to and read from the trim configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]bitsNumber of bits to be written.

◆ nrf_mramc_trim_datain_get()

NRF_STATIC_INLINE uint32_t nrf_mramc_trim_datain_get ( NRF_MRAMC_Type const *  p_reg)

Function for getting data written to the MRAM trim configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Data written to the MRAM trim configuration.

◆ nrf_mramc_trim_datain_set()

NRF_STATIC_INLINE void nrf_mramc_trim_datain_set ( NRF_MRAMC_Type *  p_reg,
uint32_t  data 
)

Function for setting data to be written to the MRAM trim configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]dataData to be written to the MRAM trim configuration.

◆ nrf_mramc_trim_dataout_get()

NRF_STATIC_INLINE uint32_t nrf_mramc_trim_dataout_get ( NRF_MRAMC_Type const *  p_reg)

Function for getting data read from the MRAM trim configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Data read from the MRAM trim configuration.

◆ nrf_mramc_trim_done_get()

NRF_STATIC_INLINE nrf_mramc_trim_t nrf_mramc_trim_done_get ( NRF_MRAMC_Type const *  p_reg)

Function for getting trim configuration data status.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Trim configuration status.

◆ nrf_mramc_trim_done_set()

NRF_STATIC_INLINE void nrf_mramc_trim_done_set ( NRF_MRAMC_Type *  p_reg)

Function for indicating to the MRAMC that the whole MRAM trim configuration data write is completed.

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

◆ nrf_mramc_trim_ready_get()

NRF_STATIC_INLINE bool nrf_mramc_trim_ready_get ( NRF_MRAMC_Type const *  p_reg)

Function for getting status of shifting the MRAM trim configuration data.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueReady for shifting the next MRAM trim configuration data.
falseShifting the MRAM trim configuration data is in progress.

◆ nrf_mramc_trim_start()

NRF_STATIC_INLINE void nrf_mramc_trim_start ( NRF_MRAMC_Type *  p_reg)

Function for setting start shifting data for trim configuration.

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

◆ nrf_mramc_trim_start_get()

NRF_STATIC_INLINE bool nrf_mramc_trim_start_get ( NRF_MRAMC_Type const *  p_reg)

Function for getting start shifting data for trim configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueStart trim config.
falseNo operation.

◆ nrf_mramc_waitstates_get()

NRF_STATIC_INLINE void nrf_mramc_waitstates_get ( NRF_MRAMC_Type const *  p_reg,
nrf_mramc_waitstates_t p_data 
)

Function for reading wait states for MRAM read access.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_dataPointer to the data structure to be filled with waitstates information for MRAM read access.

◆ nrf_mramc_waitstates_set()

NRF_STATIC_INLINE void nrf_mramc_waitstates_set ( NRF_MRAMC_Type *  p_reg,
nrf_mramc_waitstates_t const *  p_data 
)

Function for setting wait states for MRAM read access.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_dataPointer to the structure filled with information about waitstates for MRAM read access.

Documentation feedback | Developer Zone | Subscribe | Updated