nrfx 4.5.0
Loading...
Searching...
No Matches
MRAMC HALY

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

Data Structures

struct  nrfy_mramc_config_t
 MRAMC configuration structure. More...
 

Macros

#define NRFY_MRAMC_BITS_IN_BYTE   8
 Value representing how many bits in a byte.
 
#define NRFY_MRAMC_BYTES_IN_WORD   4
 Value representing the number of bytes in a word.
 
#define NRFY_MRAMC_WORDS_IN_BUS_SIZE   NRF_MRAMC_BUS_SIZE / (NRFY_MRAMC_BITS_IN_BYTE * NRFY_MRAMC_BYTES_IN_WORD)
 Value representing the number of words in bus width.
 
#define NRFY_MRAMC_WORD_AFTER_ERASED   UINT32_MAX
 MRAMC erase value.
 
#define NRFY_MRAMC_MRAM_BASE_ADDRESS   NRF_MEMORY_FLASH_BASE
 Value representing resistive random access memory (MRAM) base address.
 
#define NRFY_MRAMC_READYNEXTTIMEOUT_DEFAULT   NRF_MRAMC_READYNEXTTIMEOUT_DEFAULT
 Default value for waiting for a next write.
 
#define NRFY_MRAMC_HAS_POWER_MASK   1
 
#define NRFY_MRAMC_HAS_CONFIGNVR_PAGE_UPPER_PROTECT   1
 
#define NRFY_MRAMC_HAS_CONFIGNVR_PAGE_LOWER_PROTECT   1
 

Functions

NRFY_STATIC_INLINE void nrfy_mramc_configure (NRF_MRAMC_Type *p_reg, nrfy_mramc_config_t const *p_config)
 Function for configuring the MRAMC.
 
NRFY_STATIC_INLINE void nrfy_mramc_int_init (NRF_MRAMC_Type *p_reg, uint32_t mask, uint8_t irq_priority, bool enable)
 Function for initializing the specified MRAMC interrupts.
 
NRFY_STATIC_INLINE void nrfy_mramc_int_uninit (NRF_MRAMC_Type *p_reg)
 Function for uninitializing the MRAMC interrupts.
 
NRFY_STATIC_INLINE uint32_t nrfy_mramc_events_process (NRF_MRAMC_Type *p_reg, uint32_t mask)
 Function for processing the specified MRAMC events.
 
NRFY_STATIC_INLINE void nrfy_mramc_word_write (NRF_MRAMC_Type *p_reg, uint32_t address, uint32_t value)
 Function for writing a 32-bit word to MRAM.
 
NRFY_STATIC_INLINE void nrfy_mramc_words_write (NRF_MRAMC_Type *p_reg, uint32_t address, void const *src, uint32_t num_words)
 Function for writing consecutive 32-bit words to MRAM.
 
NRFY_STATIC_INLINE uint32_t nrfy_mramc_word_read (uint32_t address)
 Function for reading a 32-bit word from the MRAM.
 
NRFY_STATIC_INLINE void nrfy_mramc_buffer_read (void *dst, uint32_t address, uint32_t num_bytes)
 Function for reading a given number of bytes from the MRAM into the specified buffer.
 
NRFY_STATIC_INLINE void nrfy_mramc_erase (uint32_t address, uint32_t num_words)
 Function for erasing in MRAM.
 
NRFY_STATIC_INLINE void nrfy_mramc_confignvr_perm_set (NRF_MRAMC_Type *p_reg, bool enable, uint8_t page)
 Function for setting CONFIGNVR read and write permission.
 
NRFY_STATIC_INLINE void nrfy_mramc_event_clear (NRF_MRAMC_Type *p_reg, nrf_mramc_event_t event)
 
NRFY_STATIC_INLINE bool nrfy_mramc_event_check (NRF_MRAMC_Type const *p_reg, nrf_mramc_event_t event)
 
NRFY_STATIC_INLINE uint32_t nrfy_mramc_event_address_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_event_t event)
 
NRFY_STATIC_INLINE void nrfy_mramc_int_enable (NRF_MRAMC_Type *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE void nrfy_mramc_int_disable (NRF_MRAMC_Type *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE uint32_t nrfy_mramc_int_enable_check (NRF_MRAMC_Type const *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE uint32_t nrfy_mramc_int_pending_get (NRF_MRAMC_Type const *p_reg)
 
NRFY_STATIC_INLINE bool nrfy_mramc_ready_get (NRF_MRAMC_Type *p_reg)
 
NRFY_STATIC_INLINE bool nrfy_mramc_readynext_get (NRF_MRAMC_Type *p_reg)
 
NRFY_STATIC_INLINE void nrfy_mramc_ecc_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_ecc_t *p_data)
 
NRFY_STATIC_INLINE void nrfy_mramc_ecc_error_clear (NRF_MRAMC_Type *p_reg)
 
NRFY_STATIC_INLINE void nrfy_mramc_ecc_corr_clear (NRF_MRAMC_Type *p_reg)
 
NRFY_STATIC_INLINE void nrfy_mramc_config_set (NRF_MRAMC_Type *p_reg, nrf_mramc_config_t const *p_config)
 
NRFY_STATIC_INLINE void nrfy_mramc_config_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_config_t *p_config)
 
NRFY_STATIC_INLINE void nrfy_mramc_autoreadmode_set (NRF_MRAMC_Type *p_reg, uint16_t timeout)
 
NRFY_STATIC_INLINE uint16_t nrfy_mramc_autoreadmode_get (NRF_MRAMC_Type const *p_reg)
 
NRFY_STATIC_INLINE void nrfy_mramc_waitstates_set (NRF_MRAMC_Type *p_reg, nrf_mramc_waitstates_t const *p_data)
 
NRFY_STATIC_INLINE void nrfy_mramc_waitstates_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_waitstates_t *p_data)
 
NRFY_STATIC_INLINE void nrfy_mramc_readynext_timeout_set (NRF_MRAMC_Type *p_reg, nrf_mramc_readynext_timeout_t const *p_data)
 
NRFY_STATIC_INLINE void nrfy_mramc_readynext_timeout_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_readynext_timeout_t *p_data)
 
NRFY_STATIC_INLINE void nrfy_mramc_lowavgcurr_set (NRF_MRAMC_Type *p_reg, nrf_mramc_lowavgcurr_t const *p_data)
 
NRFY_STATIC_INLINE void nrfy_mramc_lowavgcurr_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_lowavgcurr_t *p_data)
 
NRFY_STATIC_INLINE void nrfy_mramc_power_init_set (NRF_MRAMC_Type *p_reg, nrf_mramc_power_init_t mode)
 
NRFY_STATIC_INLINE nrf_mramc_power_init_t nrfy_mramc_power_init_get (NRF_MRAMC_Type const *p_reg)
 
NRFY_STATIC_INLINE void nrfy_mramc_power_autopowerdown_set (NRF_MRAMC_Type *p_reg, nrf_mramc_power_autopowerdown_t const *p_data)
 
NRFY_STATIC_INLINE void nrfy_mramc_power_autopowerdown_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_power_autopowerdown_t *p_data)
 
NRFY_STATIC_INLINE void nrfy_mramc_power_mask_set (NRF_MRAMC_Type *p_reg, nrf_mramc_power_conf_t const *p_data)
 
NRFY_STATIC_INLINE void nrfy_mramc_power_mask_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_power_conf_t *p_data)
 
NRFY_STATIC_INLINE nrf_mramc_power_status_t nrfy_mramc_power_status_get (NRF_MRAMC_Type const *p_reg)
 
NRFY_STATIC_INLINE void nrfy_mramc_powerup_ack_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_power_conf_t *p_data)
 
NRFY_STATIC_INLINE void nrfy_mramc_powerdown_ack_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_power_conf_t *p_data)
 
NRFY_STATIC_INLINE void nrfy_mramc_power_force_on_set (NRF_MRAMC_Type *p_reg, nrf_mramc_power_conf_t const *p_data)
 
NRFY_STATIC_INLINE void nrfy_mramc_power_force_on_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_power_conf_t *p_data)
 
NRFY_STATIC_INLINE void nrfy_mramc_power_force_off_set (NRF_MRAMC_Type *p_reg, nrf_mramc_power_conf_t const *p_data)
 
NRFY_STATIC_INLINE void nrfy_mramc_power_force_off_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_power_conf_t *p_data)
 
NRFY_STATIC_INLINE void nrfy_mramc_trim_datain_set (NRF_MRAMC_Type *p_reg, uint32_t data)
 
NRFY_STATIC_INLINE uint32_t nrfy_mramc_trim_datain_get (NRF_MRAMC_Type const *p_reg)
 
NRFY_STATIC_INLINE uint32_t nrfy_mramc_trim_dataout_get (NRF_MRAMC_Type const *p_reg)
 
NRFY_STATIC_INLINE void nrfy_mramc_trim_count_set (NRF_MRAMC_Type *p_reg, uint32_t bits)
 
NRF_STATIC_INLINE uint32_t nrfy_mramc_trim_count_get (NRF_MRAMC_Type const *p_reg)
 
NRFY_STATIC_INLINE void nrfy_mramc_trim_start (NRF_MRAMC_Type *p_reg)
 
NRFY_STATIC_INLINE bool nrfy_mramc_trim_start_get (NRF_MRAMC_Type const *p_reg)
 
NRFY_STATIC_INLINE bool nrfy_mramc_trim_ready_get (NRF_MRAMC_Type const *p_reg)
 
NRFY_STATIC_INLINE void nrfy_mramc_trim_done_set (NRF_MRAMC_Type *p_reg)
 
NRFY_STATIC_INLINE nrf_mramc_trim_t nrfy_mramc_trim_done_get (NRF_MRAMC_Type const *p_reg)
 
NRFY_STATIC_INLINE void nrfy_mramc_erase_word_set (NRF_MRAMC_Type *p_reg, uint32_t address)
 
NRFY_STATIC_INLINE void nrfy_mramc_erase_area_set (NRF_MRAMC_Type *p_reg, uint32_t address, uint32_t size)
 
NRFY_STATIC_INLINE void nrfy_mramc_erase_area_get (NRF_MRAMC_Type *p_reg, uint32_t *p_address, uint32_t *p_size)
 
NRFY_STATIC_INLINE void nrfy_mramc_erase_all (NRF_MRAMC_Type *p_reg)
 
NRFY_STATIC_INLINE bool nrfy_mramc_erase_all_get (NRF_MRAMC_Type const *p_reg)
 
NRFY_STATIC_INLINE void nrfy_mramc_erase_word_lock_set (NRF_MRAMC_Type *p_reg, bool lock)
 
NRFY_STATIC_INLINE bool nrfy_mramc_erase_word_lock_get (NRF_MRAMC_Type const *p_reg)
 
NRFY_STATIC_INLINE void nrfy_mramc_erase_area_lock_set (NRF_MRAMC_Type *p_reg, bool lock)
 
NRFY_STATIC_INLINE bool nrfy_mramc_erase_area_lock_get (NRF_MRAMC_Type const *p_reg)
 
NRFY_STATIC_INLINE void nrfy_mramc_erase_all_lock_set (NRF_MRAMC_Type *p_reg, bool lock)
 
NRFY_STATIC_INLINE bool nrfy_mramc_erase_all_lock_get (NRF_MRAMC_Type const *p_reg)
 
NRFY_STATIC_INLINE void nrfy_mramc_config_nvr_set (NRF_MRAMC_Type *p_reg, nrf_mramc_config_nvr_t const *p_data, uint8_t page)
 
NRF_STATIC_INLINE void nrfy_mramc_config_nvr_get (NRF_MRAMC_Type const *p_reg, nrf_mramc_config_nvr_t *p_data, uint8_t page)
 

Detailed Description

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

Note
Extended Hardware Access Layer (HALY) is deprecated.

Macro Definition Documentation

◆ NRFY_MRAMC_HAS_CONFIGNVR_PAGE_LOWER_PROTECT

#define NRFY_MRAMC_HAS_CONFIGNVR_PAGE_LOWER_PROTECT   1
See also
NRF_MRAMC_HAS_CONFIGNVR_PAGE_LOWER_PROTECT Symbol indicating whether CONFIGNVR.PAGE[n] registers have lower part of NVR page read and write protection fields.

◆ NRFY_MRAMC_HAS_CONFIGNVR_PAGE_UPPER_PROTECT

#define NRFY_MRAMC_HAS_CONFIGNVR_PAGE_UPPER_PROTECT   1
See also
NRF_MRAMC_HAS_CONFIGNVR_PAGE_UPPER_PROTECT Symbol indicating whether CONFIGNVR.PAGE[n] registers have upper part of NVR page read and write protection fields.

◆ NRFY_MRAMC_HAS_POWER_MASK

#define NRFY_MRAMC_HAS_POWER_MASK   1
See also
NRF_MRAMC_HAS_POWER_MASK Symbol indicating whether the POWER_MASK register is present.

◆ NRFY_MRAMC_WORDS_IN_BUS_SIZE

#define NRFY_MRAMC_WORDS_IN_BUS_SIZE   NRF_MRAMC_BUS_SIZE / (NRFY_MRAMC_BITS_IN_BYTE * NRFY_MRAMC_BYTES_IN_WORD)

Value representing the number of words in bus width.

MRAM register bus width is 128-bits, which means that 4 words can be written in one bus width.

Function Documentation

◆ nrfy_mramc_autoreadmode_get()

NRFY_STATIC_INLINE uint16_t nrfy_mramc_autoreadmode_get ( NRF_MRAMC_Type const * p_reg)
See also
nrf_mramc_autoreadmode_get 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.

◆ nrfy_mramc_autoreadmode_set()

NRFY_STATIC_INLINE void nrfy_mramc_autoreadmode_set ( NRF_MRAMC_Type * p_reg,
uint16_t timeout )
See also
nrf_mramc_autoreadmode_set 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.

◆ nrfy_mramc_buffer_read()

NRFY_STATIC_INLINE void nrfy_mramc_buffer_read ( void * dst,
uint32_t address,
uint32_t num_bytes )

Function for reading a given number of bytes from the MRAM into the specified buffer.

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

◆ nrfy_mramc_config_get()

NRFY_STATIC_INLINE void nrfy_mramc_config_get ( NRF_MRAMC_Type const * p_reg,
nrf_mramc_config_t * p_config )
See also
nrf_mramc_config_get 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.

◆ nrfy_mramc_config_nvr_get()

NRF_STATIC_INLINE void nrfy_mramc_config_nvr_get ( NRF_MRAMC_Type const * p_reg,
nrf_mramc_config_nvr_t * p_data,
uint8_t page )
See also
nrf_mramc_config_nvr_get 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].

◆ nrfy_mramc_config_nvr_set()

NRFY_STATIC_INLINE void nrfy_mramc_config_nvr_set ( NRF_MRAMC_Type * p_reg,
nrf_mramc_config_nvr_t const * p_data,
uint8_t page )
See also
nrf_mramc_config_nvr_set 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].

◆ nrfy_mramc_config_set()

NRFY_STATIC_INLINE void nrfy_mramc_config_set ( NRF_MRAMC_Type * p_reg,
nrf_mramc_config_t const * p_config )
See also
nrf_mramc_config_set 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.

◆ nrfy_mramc_confignvr_perm_set()

NRFY_STATIC_INLINE void nrfy_mramc_confignvr_perm_set ( NRF_MRAMC_Type * p_reg,
bool enable,
uint8_t page )

Function for setting CONFIGNVR read and write permission.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]enableTrue to enable write and erase permission of CONFIGNVR.PAGE[n], false to disable.
[in]pagePage number [0...n].

◆ nrfy_mramc_configure()

NRFY_STATIC_INLINE void nrfy_mramc_configure ( NRF_MRAMC_Type * p_reg,
nrfy_mramc_config_t const * p_config )

Function for configuring the MRAMC.

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

◆ nrfy_mramc_ecc_corr_clear()

NRFY_STATIC_INLINE void nrfy_mramc_ecc_corr_clear ( NRF_MRAMC_Type * p_reg)
See also
nrf_mramc_ecc_corr_clear Function for clearing flag indicating detected error which was corrected.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.

◆ nrfy_mramc_ecc_error_clear()

NRFY_STATIC_INLINE void nrfy_mramc_ecc_error_clear ( NRF_MRAMC_Type * p_reg)
See also
nrf_mramc_ecc_error_clear Function for clearing flag indicating detected error which could not be corrected.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.

◆ nrfy_mramc_ecc_get()

NRFY_STATIC_INLINE void nrfy_mramc_ecc_get ( NRF_MRAMC_Type const * p_reg,
nrf_mramc_ecc_t * p_data )
See also
nrf_mramc_ecc_get 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.

◆ nrfy_mramc_erase()

NRFY_STATIC_INLINE void nrfy_mramc_erase ( uint32_t address,
uint32_t num_words )

Function for erasing in MRAM.

Parameters
[in]addressAddress to be erased.
[in]num_wordsNumber of 32-bits words to be erased.

◆ nrfy_mramc_erase_all()

NRFY_STATIC_INLINE void nrfy_mramc_erase_all ( NRF_MRAMC_Type * p_reg)
See also
nrf_mramc_erase_all 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.

◆ nrfy_mramc_erase_all_get()

NRFY_STATIC_INLINE bool nrfy_mramc_erase_all_get ( NRF_MRAMC_Type const * p_reg)
See also
nrf_mramc_erase_all_get 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.

◆ nrfy_mramc_erase_all_lock_get()

NRFY_STATIC_INLINE bool nrfy_mramc_erase_all_lock_get ( NRF_MRAMC_Type const * p_reg)
See also
nrf_mramc_erase_all_lock_get 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.

◆ nrfy_mramc_erase_all_lock_set()

NRFY_STATIC_INLINE void nrfy_mramc_erase_all_lock_set ( NRF_MRAMC_Type * p_reg,
bool lock )
See also
nrf_mramc_erase_all_lock_set 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.

◆ nrfy_mramc_erase_area_get()

NRFY_STATIC_INLINE void nrfy_mramc_erase_area_get ( NRF_MRAMC_Type * p_reg,
uint32_t * p_address,
uint32_t * p_size )
See also
nrf_mramc_erase_area_get 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.

◆ nrfy_mramc_erase_area_lock_get()

NRFY_STATIC_INLINE bool nrfy_mramc_erase_area_lock_get ( NRF_MRAMC_Type const * p_reg)
See also
nrf_mramc_erase_area_lock_get 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.

◆ nrfy_mramc_erase_area_lock_set()

NRFY_STATIC_INLINE void nrfy_mramc_erase_area_lock_set ( NRF_MRAMC_Type * p_reg,
bool lock )
See also
nrf_mramc_erase_area_lock_set 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.

◆ nrfy_mramc_erase_area_set()

NRFY_STATIC_INLINE void nrfy_mramc_erase_area_set ( NRF_MRAMC_Type * p_reg,
uint32_t address,
uint32_t size )
See also
nrf_mramc_erase_area_set 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.

◆ nrfy_mramc_erase_word_lock_get()

NRFY_STATIC_INLINE bool nrfy_mramc_erase_word_lock_get ( NRF_MRAMC_Type const * p_reg)
See also
nrf_mramc_erase_word_lock_get 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.

◆ nrfy_mramc_erase_word_lock_set()

NRFY_STATIC_INLINE void nrfy_mramc_erase_word_lock_set ( NRF_MRAMC_Type * p_reg,
bool lock )
See also
nrf_mramc_erase_word_lock_set 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.

◆ nrfy_mramc_erase_word_set()

NRFY_STATIC_INLINE void nrfy_mramc_erase_word_set ( NRF_MRAMC_Type * p_reg,
uint32_t address )
See also
nrf_mramc_erase_word_set 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.

◆ nrfy_mramc_event_address_get()

NRFY_STATIC_INLINE uint32_t nrfy_mramc_event_address_get ( NRF_MRAMC_Type const * p_reg,
nrf_mramc_event_t event )
See also
nrf_mramc_event_address_get 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.

◆ nrfy_mramc_event_check()

NRFY_STATIC_INLINE bool nrfy_mramc_event_check ( NRF_MRAMC_Type const * p_reg,
nrf_mramc_event_t event )
See also
nrf_mramc_event_check 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.

◆ nrfy_mramc_event_clear()

NRFY_STATIC_INLINE void nrfy_mramc_event_clear ( NRF_MRAMC_Type * p_reg,
nrf_mramc_event_t event )
See also
nrf_mramc_event_clear Function for clearing the specified MRAMC event.
Parameters
[in]p_regPointer to the peripheral register structure.
[in]eventEvent to clear.

◆ nrfy_mramc_events_process()

NRFY_STATIC_INLINE uint32_t nrfy_mramc_events_process ( NRF_MRAMC_Type * p_reg,
uint32_t mask )

Function for processing the specified MRAMC events.

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

◆ nrfy_mramc_int_disable()

NRFY_STATIC_INLINE void nrfy_mramc_int_disable ( NRF_MRAMC_Type * p_reg,
uint32_t mask )
See also
nrf_mramc_int_disable 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.

◆ nrfy_mramc_int_enable()

NRFY_STATIC_INLINE void nrfy_mramc_int_enable ( NRF_MRAMC_Type * p_reg,
uint32_t mask )
See also
nrf_mramc_int_enable 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.

◆ nrfy_mramc_int_enable_check()

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

◆ nrfy_mramc_int_init()

NRFY_STATIC_INLINE void nrfy_mramc_int_init ( NRF_MRAMC_Type * p_reg,
uint32_t mask,
uint8_t irq_priority,
bool enable )

Function for initializing the specified MRAMC interrupts.

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

◆ nrfy_mramc_int_pending_get()

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

◆ nrfy_mramc_int_uninit()

NRFY_STATIC_INLINE void nrfy_mramc_int_uninit ( NRF_MRAMC_Type * p_reg)

Function for uninitializing the MRAMC interrupts.

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

◆ nrfy_mramc_lowavgcurr_get()

NRFY_STATIC_INLINE void nrfy_mramc_lowavgcurr_get ( NRF_MRAMC_Type const * p_reg,
nrf_mramc_lowavgcurr_t * p_data )
See also
nrf_mramc_lowavgcurr_get 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.

◆ nrfy_mramc_lowavgcurr_set()

NRFY_STATIC_INLINE void nrfy_mramc_lowavgcurr_set ( NRF_MRAMC_Type * p_reg,
nrf_mramc_lowavgcurr_t const * p_data )
See also
nrf_mramc_lowavgcurr_set 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.

◆ nrfy_mramc_power_autopowerdown_get()

NRFY_STATIC_INLINE void nrfy_mramc_power_autopowerdown_get ( NRF_MRAMC_Type const * p_reg,
nrf_mramc_power_autopowerdown_t * p_data )
See also
nrf_mramc_power_autopowerdown_get 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.

◆ nrfy_mramc_power_autopowerdown_set()

NRFY_STATIC_INLINE void nrfy_mramc_power_autopowerdown_set ( NRF_MRAMC_Type * p_reg,
nrf_mramc_power_autopowerdown_t const * p_data )
See also
nrf_mramc_power_autopowerdown_set 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.

◆ nrfy_mramc_power_force_off_get()

NRFY_STATIC_INLINE void nrfy_mramc_power_force_off_get ( NRF_MRAMC_Type const * p_reg,
nrf_mramc_power_conf_t * p_data )
See also
nrf_mramc_power_force_off_get 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.

◆ nrfy_mramc_power_force_off_set()

NRFY_STATIC_INLINE void nrfy_mramc_power_force_off_set ( NRF_MRAMC_Type * p_reg,
nrf_mramc_power_conf_t const * p_data )
See also
nrf_mramc_power_force_off_set 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.

◆ nrfy_mramc_power_force_on_get()

NRFY_STATIC_INLINE void nrfy_mramc_power_force_on_get ( NRF_MRAMC_Type const * p_reg,
nrf_mramc_power_conf_t * p_data )
See also
nrf_mramc_power_force_on_get 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.

◆ nrfy_mramc_power_force_on_set()

NRFY_STATIC_INLINE void nrfy_mramc_power_force_on_set ( NRF_MRAMC_Type * p_reg,
nrf_mramc_power_conf_t const * p_data )
See also
nrf_mramc_power_force_on_set 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.

◆ nrfy_mramc_power_init_get()

NRFY_STATIC_INLINE nrf_mramc_power_init_t nrfy_mramc_power_init_get ( NRF_MRAMC_Type const * p_reg)
See also
nrf_mramc_power_init_get Function for getting power-up/down sequence.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Power init mode.

◆ nrfy_mramc_power_init_set()

NRFY_STATIC_INLINE void nrfy_mramc_power_init_set ( NRF_MRAMC_Type * p_reg,
nrf_mramc_power_init_t mode )
See also
nrf_mramc_power_init_set Function for setting power-up/down sequence.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]modePower init mode.

◆ nrfy_mramc_power_mask_get()

NRFY_STATIC_INLINE void nrfy_mramc_power_mask_get ( NRF_MRAMC_Type const * p_reg,
nrf_mramc_power_conf_t * p_data )
See also
nrf_mramc_power_mask_get 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.

◆ nrfy_mramc_power_mask_set()

NRFY_STATIC_INLINE void nrfy_mramc_power_mask_set ( NRF_MRAMC_Type * p_reg,
nrf_mramc_power_conf_t const * p_data )
See also
nrf_mramc_power_mask_set 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.

◆ nrfy_mramc_power_status_get()

NRFY_STATIC_INLINE nrf_mramc_power_status_t nrfy_mramc_power_status_get ( NRF_MRAMC_Type const * p_reg)
See also
nrf_mramc_power_status_get 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.

◆ nrfy_mramc_powerdown_ack_get()

NRFY_STATIC_INLINE void nrfy_mramc_powerdown_ack_get ( NRF_MRAMC_Type const * p_reg,
nrf_mramc_power_conf_t * p_data )
See also
nrf_mramc_powerdown_ack_get 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.

◆ nrfy_mramc_powerup_ack_get()

NRFY_STATIC_INLINE void nrfy_mramc_powerup_ack_get ( NRF_MRAMC_Type const * p_reg,
nrf_mramc_power_conf_t * p_data )
See also
nrf_mramc_powerup_ack_get 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.

◆ nrfy_mramc_ready_get()

NRFY_STATIC_INLINE bool nrfy_mramc_ready_get ( NRF_MRAMC_Type * p_reg)
See also
nrf_mramc_ready_get 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.

◆ nrfy_mramc_readynext_get()

NRFY_STATIC_INLINE bool nrfy_mramc_readynext_get ( NRF_MRAMC_Type * p_reg)
See also
nrf_mramc_readynext_get 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.

◆ nrfy_mramc_readynext_timeout_get()

NRFY_STATIC_INLINE void nrfy_mramc_readynext_timeout_get ( NRF_MRAMC_Type const * p_reg,
nrf_mramc_readynext_timeout_t * p_data )
See also
nrf_mramc_readynext_timeout_get 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.

◆ nrfy_mramc_readynext_timeout_set()

NRFY_STATIC_INLINE void nrfy_mramc_readynext_timeout_set ( NRF_MRAMC_Type * p_reg,
nrf_mramc_readynext_timeout_t const * p_data )
See also
nrf_mramc_readynext_timeout_set 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.

◆ nrfy_mramc_trim_count_get()

NRF_STATIC_INLINE uint32_t nrfy_mramc_trim_count_get ( NRF_MRAMC_Type const * p_reg)
See also
nrf_mramc_trim_count_get 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.

◆ nrfy_mramc_trim_count_set()

NRFY_STATIC_INLINE void nrfy_mramc_trim_count_set ( NRF_MRAMC_Type * p_reg,
uint32_t bits )
See also
nrf_mramc_trim_count_set 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.

◆ nrfy_mramc_trim_datain_get()

NRFY_STATIC_INLINE uint32_t nrfy_mramc_trim_datain_get ( NRF_MRAMC_Type const * p_reg)
See also
nrf_mramc_trim_datain_get 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.

◆ nrfy_mramc_trim_datain_set()

NRFY_STATIC_INLINE void nrfy_mramc_trim_datain_set ( NRF_MRAMC_Type * p_reg,
uint32_t data )
See also
nrf_mramc_trim_datain_set 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.

◆ nrfy_mramc_trim_dataout_get()

NRFY_STATIC_INLINE uint32_t nrfy_mramc_trim_dataout_get ( NRF_MRAMC_Type const * p_reg)
See also
nrf_mramc_trim_dataout_get 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.

◆ nrfy_mramc_trim_done_get()

NRFY_STATIC_INLINE nrf_mramc_trim_t nrfy_mramc_trim_done_get ( NRF_MRAMC_Type const * p_reg)
See also
nrf_mramc_trim_done_get Function for getting trim configuration data status.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Trim configuration status.

◆ nrfy_mramc_trim_done_set()

NRFY_STATIC_INLINE void nrfy_mramc_trim_done_set ( NRF_MRAMC_Type * p_reg)
See also
nrf_mramc_trim_done_set 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.

◆ nrfy_mramc_trim_ready_get()

NRFY_STATIC_INLINE bool nrfy_mramc_trim_ready_get ( NRF_MRAMC_Type const * p_reg)
See also
nrf_mramc_trim_ready_get 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.

◆ nrfy_mramc_trim_start()

NRFY_STATIC_INLINE void nrfy_mramc_trim_start ( NRF_MRAMC_Type * p_reg)
See also
nrf_mramc_trim_start Function for setting start shifting data for trim configuration.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.

◆ nrfy_mramc_trim_start_get()

NRFY_STATIC_INLINE bool nrfy_mramc_trim_start_get ( NRF_MRAMC_Type const * p_reg)
See also
nrf_mramc_trim_start_get 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.

◆ nrfy_mramc_waitstates_get()

NRFY_STATIC_INLINE void nrfy_mramc_waitstates_get ( NRF_MRAMC_Type const * p_reg,
nrf_mramc_waitstates_t * p_data )
See also
nrf_mramc_waitstates_get 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.

◆ nrfy_mramc_waitstates_set()

NRFY_STATIC_INLINE void nrfy_mramc_waitstates_set ( NRF_MRAMC_Type * p_reg,
nrf_mramc_waitstates_t const * p_data )
See also
nrf_mramc_waitstates_set 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.

◆ nrfy_mramc_word_read()

NRFY_STATIC_INLINE uint32_t nrfy_mramc_word_read ( uint32_t address)

Function for reading a 32-bit word from the MRAM.

Parameters
[in]addressAddress of the word to be read.
Returns
Value read from MRAM.

◆ nrfy_mramc_word_write()

NRFY_STATIC_INLINE void nrfy_mramc_word_write ( NRF_MRAMC_Type * p_reg,
uint32_t address,
uint32_t value )

Function for writing a 32-bit word to MRAM.

Note
Depending on the source of the code being executed, the CPU may be halted during the operation. Refer to the Product Specification for more information.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]addressAddress to where data is to be written. Must be word-aligned.
[in]valueValue to be written.

◆ nrfy_mramc_words_write()

NRFY_STATIC_INLINE void nrfy_mramc_words_write ( NRF_MRAMC_Type * p_reg,
uint32_t address,
void const * src,
uint32_t num_words )

Function for writing consecutive 32-bit words to MRAM.

Function uses direct write mode to write to MRAM directly.

Note
Depending on the source of the code being executed, the CPU may be halted during the operation. Refer to the Product Specification for more information.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]addressAddress to where data is to be written. Must be word-aligned.
[in]srcPointer to data to be copied. Must be word-aligned.
[in]num_wordsNumber of words to be written.