nrfx 3.3
Macros | Functions
MEMCONF HAL

Hardware access layer for managing the Memory Configuration (MEMCONF) peripheral. More...

Macros

#define NRF_MEMCONF_HAS_RET2   1
 Symbol indicating whether the second retention configuration register is present.
 
#define NRF_MEMCONF_HAS_REPAIR   1
 Symbol indicating whether the repair configuration for RAM blocks is present.
 
#define NRF_MEMCONF_HAS_TRIM   1
 Symbol indicating whether the trim configuration is present.
 
#define NRF_MEMCONF_POWERBLOCK_COUNT   MEMCONF_POWER_MaxCount
 Symbol specifying maximum number of available power blocks.
 
#define NRF_MEMCONF_POWERBLOCK_RAMBLOCK_CONTROL_COUNT   MEMCONF_POWER_CONTROL_MEM31_Pos
 Symbol specifying maximum number of control RAM blocks.
 
#define NRF_MEMCONF_POWERBLOCK_RAMBLOCK_RET_COUNT   MEMCONF_POWER_RET_MEM31_Pos
 Symbol specifying maximum number of retention RAM blocks.
 
#define NRF_MEMCONF_POWERBLOCK_RAMBLOCK_RET2_COUNT   MEMCONF_POWER_RET2_MEM31_Pos
 Symbol specifying maximum number of second bank retention RAM blocks.
 
#define NRF_MEMCONF_BLOCKTYPE_TRIM_MEMTRIM_MASK
 Symbol specifying bitmask collecting all memory read and write margin trims.
 
#define NRF_MEMCONF_BLOCKTYPE_TRIM_MEMRETTRIM_MASK
 Symbol specifying bitmask collecting all memory retention trims.
 

Functions

NRF_STATIC_INLINE void nrf_memconf_ramblock_control_enable_set (NRF_MEMCONF_Type *p_reg, uint8_t power_id, uint8_t ramblock, bool enable)
 Function for enabling or disabling given RAM block.
 
NRF_STATIC_INLINE void nrf_memconf_ramblock_control_mask_enable_set (NRF_MEMCONF_Type *p_reg, uint8_t power_id, uint32_t ramblock_mask, bool enable)
 Function for enabling or disabling specified RAM blocks.
 
NRF_STATIC_INLINE bool nrf_memconf_ramblock_control_enable_check (NRF_MEMCONF_Type const *p_reg, uint8_t power_id, uint8_t ramblock)
 Function for checking whether given RAM block is enabled.
 
NRF_STATIC_INLINE void nrf_memconf_ramblock_ret_enable_set (NRF_MEMCONF_Type *p_reg, uint8_t power_id, uint8_t ramblock, bool enable)
 Function for enabling or disabling the retention for given RAM block.
 
NRF_STATIC_INLINE void nrf_memconf_ramblock_ret_mask_enable_set (NRF_MEMCONF_Type *p_reg, uint8_t power_id, uint32_t ramblock_mask, bool enable)
 Function for enabling or disabling retention for the specified RAM blocks.
 
NRF_STATIC_INLINE bool nrf_memconf_ramblock_ret_enable_check (NRF_MEMCONF_Type const *p_reg, uint8_t power_id, uint8_t ramblock)
 Function for checking whether the retention of specified RAM block is enabled.
 
NRF_STATIC_INLINE void nrf_memconf_ramblock_ret2_enable_set (NRF_MEMCONF_Type *p_reg, uint8_t power_id, uint8_t ramblock, bool enable)
 Function for enabling or disabling the retention within the second bank for given RAM block.
 
NRF_STATIC_INLINE bool nrf_memconf_ramblock_ret2_enable_check (NRF_MEMCONF_Type const *p_reg, uint8_t power_id, uint8_t ramblock)
 Function for checking whether the retention of second bank in specified RAM block is enabled.
 
NRF_STATIC_INLINE void nrf_memconf_bitline_enable_set (NRF_MEMCONF_Type *p_reg, uint8_t bitline, bool enable)
 Function for enabling or disabling given bitline.
 
NRF_STATIC_INLINE bool nrf_memconf_bitline_enable_check (NRF_MEMCONF_Type const *p_reg, uint8_t bitline)
 Function for getting enable status for given bitline.
 
NRF_STATIC_INLINE void nrf_memconf_bitline_address_set (NRF_MEMCONF_Type *p_reg, uint8_t bitline, uint8_t address)
 Function for setting bitline address.
 
NRF_STATIC_INLINE uint32_t nrf_memconf_bitline_address_get (NRF_MEMCONF_Type const *p_reg, uint8_t bitline)
 Function for getting bitline address.
 
NRF_STATIC_INLINE void nrf_memconf_memtrim_set (NRF_MEMCONF_Type *p_reg, uint8_t trim_id, uint16_t trim_val)
 Function for setting memory trim value.
 
NRF_STATIC_INLINE uint16_t nrf_memconf_memtrim_get (NRF_MEMCONF_Type const *p_reg, uint8_t trim_id)
 Function for getting memory trim value.
 
NRF_STATIC_INLINE void nrf_memconf_rettrim_set (NRF_MEMCONF_Type *p_reg, uint8_t trim_id, uint16_t trim_val)
 Function for setting retention trim value.
 
NRF_STATIC_INLINE uint16_t nrf_memconf_rettrim_get (NRF_MEMCONF_Type const *p_reg, uint8_t trim_id)
 Function for getting retention trim value.
 

Detailed Description

Hardware access layer for managing the Memory Configuration (MEMCONF) peripheral.

Macro Definition Documentation

◆ NRF_MEMCONF_BLOCKTYPE_TRIM_MEMRETTRIM_MASK

#define NRF_MEMCONF_BLOCKTYPE_TRIM_MEMRETTRIM_MASK
Value:
(MEMCONF_BLOCKTYPE_TRIM_MEMRETTRIM0_Msk | MEMCONF_BLOCKTYPE_TRIM_MEMRETTRIM1_Msk | \
MEMCONF_BLOCKTYPE_TRIM_MEMRETTRIM2_Msk | MEMCONF_BLOCKTYPE_TRIM_MEMRETTRIM3_Msk | \
MEMCONF_BLOCKTYPE_TRIM_MEMRETTRIM4_Msk | MEMCONF_BLOCKTYPE_TRIM_MEMRETTRIM5_Msk | \
MEMCONF_BLOCKTYPE_TRIM_MEMRETTRIM6_Msk | MEMCONF_BLOCKTYPE_TRIM_MEMRETTRIM7_Msk | \
MEMCONF_BLOCKTYPE_TRIM_MEMRETTRIM8_Msk | MEMCONF_BLOCKTYPE_TRIM_MEMRETTRIM9_Msk | \
MEMCONF_BLOCKTYPE_TRIM_MEMRETTRIM10_Msk | MEMCONF_BLOCKTYPE_TRIM_MEMRETTRIM11_Msk | \
MEMCONF_BLOCKTYPE_TRIM_MEMRETTRIM12_Msk | MEMCONF_BLOCKTYPE_TRIM_MEMRETTRIM13_Msk | \
MEMCONF_BLOCKTYPE_TRIM_MEMRETTRIM14_Msk | MEMCONF_BLOCKTYPE_TRIM_MEMRETTRIM15_Msk)

Symbol specifying bitmask collecting all memory retention trims.

◆ NRF_MEMCONF_BLOCKTYPE_TRIM_MEMTRIM_MASK

#define NRF_MEMCONF_BLOCKTYPE_TRIM_MEMTRIM_MASK
Value:
(MEMCONF_BLOCKTYPE_TRIM_MEMTRIM0_Msk | MEMCONF_BLOCKTYPE_TRIM_MEMTRIM1_Msk | \
MEMCONF_BLOCKTYPE_TRIM_MEMTRIM2_Msk | MEMCONF_BLOCKTYPE_TRIM_MEMTRIM3_Msk | \
MEMCONF_BLOCKTYPE_TRIM_MEMTRIM4_Msk | MEMCONF_BLOCKTYPE_TRIM_MEMTRIM5_Msk | \
MEMCONF_BLOCKTYPE_TRIM_MEMTRIM6_Msk | MEMCONF_BLOCKTYPE_TRIM_MEMTRIM7_Msk | \
MEMCONF_BLOCKTYPE_TRIM_MEMTRIM8_Msk | MEMCONF_BLOCKTYPE_TRIM_MEMTRIM9_Msk | \
MEMCONF_BLOCKTYPE_TRIM_MEMTRIM10_Msk | MEMCONF_BLOCKTYPE_TRIM_MEMTRIM11_Msk | \
MEMCONF_BLOCKTYPE_TRIM_MEMTRIM12_Msk | MEMCONF_BLOCKTYPE_TRIM_MEMTRIM13_Msk | \
MEMCONF_BLOCKTYPE_TRIM_MEMTRIM14_Msk | MEMCONF_BLOCKTYPE_TRIM_MEMTRIM15_Msk)

Symbol specifying bitmask collecting all memory read and write margin trims.

Function Documentation

◆ nrf_memconf_bitline_address_get()

NRF_STATIC_INLINE uint32_t nrf_memconf_bitline_address_get ( NRF_MEMCONF_Type const *  p_reg,
uint8_t  bitline 
)

Function for getting bitline address.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]bitlineBitline index.
Returns
Address of requested bitline.

◆ nrf_memconf_bitline_address_set()

NRF_STATIC_INLINE void nrf_memconf_bitline_address_set ( NRF_MEMCONF_Type *  p_reg,
uint8_t  bitline,
uint8_t  address 
)

Function for setting bitline address.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]bitlineBitline index.
[in]addressAddres for given bitline.

◆ nrf_memconf_bitline_enable_check()

NRF_STATIC_INLINE bool nrf_memconf_bitline_enable_check ( NRF_MEMCONF_Type const *  p_reg,
uint8_t  bitline 
)

Function for getting enable status for given bitline.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]bitlineBitline index.
Returns
Status of requested bitline.

◆ nrf_memconf_bitline_enable_set()

NRF_STATIC_INLINE void nrf_memconf_bitline_enable_set ( NRF_MEMCONF_Type *  p_reg,
uint8_t  bitline,
bool  enable 
)

Function for enabling or disabling given bitline.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]bitlineBitline to be enabled/disabled.
[in]enableTrue if bitline is to be enabled, false otherwise.

◆ nrf_memconf_memtrim_get()

NRF_STATIC_INLINE uint16_t nrf_memconf_memtrim_get ( NRF_MEMCONF_Type const *  p_reg,
uint8_t  trim_id 
)

Function for getting memory trim value.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]trim_idTrim index.
Returns
Requested trim value.

◆ nrf_memconf_memtrim_set()

NRF_STATIC_INLINE void nrf_memconf_memtrim_set ( NRF_MEMCONF_Type *  p_reg,
uint8_t  trim_id,
uint16_t  trim_val 
)

Function for setting memory trim value.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]trim_idTrim index.
[in]trim_valTrim value.

◆ nrf_memconf_ramblock_control_enable_check()

NRF_STATIC_INLINE bool nrf_memconf_ramblock_control_enable_check ( NRF_MEMCONF_Type const *  p_reg,
uint8_t  power_id,
uint8_t  ramblock 
)

Function for checking whether given RAM block is enabled.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]power_idPower block index.
[in]ramblockRAM block index.
Return values
trueRAM block is enabled.
falseRAM block is disabled.

◆ nrf_memconf_ramblock_control_enable_set()

NRF_STATIC_INLINE void nrf_memconf_ramblock_control_enable_set ( NRF_MEMCONF_Type *  p_reg,
uint8_t  power_id,
uint8_t  ramblock,
bool  enable 
)

Function for enabling or disabling given RAM block.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]power_idPower block index.
[in]ramblockRAM block index.
[in]enableTrue if RAM block is to be enabled, false otherwise.

◆ nrf_memconf_ramblock_control_mask_enable_set()

NRF_STATIC_INLINE void nrf_memconf_ramblock_control_mask_enable_set ( NRF_MEMCONF_Type *  p_reg,
uint8_t  power_id,
uint32_t  ramblock_mask,
bool  enable 
)

Function for enabling or disabling specified RAM blocks.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]power_idPower block index.
[in]ramblock_maskMask of RAM blocks.
[in]enableTrue if RAM blocks are to be enabled, false otherwise.

◆ nrf_memconf_ramblock_ret2_enable_check()

NRF_STATIC_INLINE bool nrf_memconf_ramblock_ret2_enable_check ( NRF_MEMCONF_Type const *  p_reg,
uint8_t  power_id,
uint8_t  ramblock 
)

Function for checking whether the retention of second bank in specified RAM block is enabled.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]power_idPower block index.
[in]ramblockRAM block index.
Return values
trueRAM block is enabled.
falseRAM block is disabled.

◆ nrf_memconf_ramblock_ret2_enable_set()

NRF_STATIC_INLINE void nrf_memconf_ramblock_ret2_enable_set ( NRF_MEMCONF_Type *  p_reg,
uint8_t  power_id,
uint8_t  ramblock,
bool  enable 
)

Function for enabling or disabling the retention within the second bank for given RAM block.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]power_idPower block index.
[in]ramblockRAM block index.
[in]enableTrue if RAM block retention is to be enabled, false otherwise.

◆ nrf_memconf_ramblock_ret_enable_check()

NRF_STATIC_INLINE bool nrf_memconf_ramblock_ret_enable_check ( NRF_MEMCONF_Type const *  p_reg,
uint8_t  power_id,
uint8_t  ramblock 
)

Function for checking whether the retention of specified RAM block is enabled.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]power_idPower block index.
[in]ramblockRAM block index.
Return values
trueRAM block is enabled.
falseRAM block is disabled.

◆ nrf_memconf_ramblock_ret_enable_set()

NRF_STATIC_INLINE void nrf_memconf_ramblock_ret_enable_set ( NRF_MEMCONF_Type *  p_reg,
uint8_t  power_id,
uint8_t  ramblock,
bool  enable 
)

Function for enabling or disabling the retention for given RAM block.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]power_idPower block index.
[in]ramblockRAM block index.
[in]enableTrue if RAM block retention is to be enabled, false otherwise.

◆ nrf_memconf_ramblock_ret_mask_enable_set()

NRF_STATIC_INLINE void nrf_memconf_ramblock_ret_mask_enable_set ( NRF_MEMCONF_Type *  p_reg,
uint8_t  power_id,
uint32_t  ramblock_mask,
bool  enable 
)

Function for enabling or disabling retention for the specified RAM blocks.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]power_idPower block index.
[in]ramblock_maskMask of RAM blocks.
[in]enableTrue if retention for RAM blocks is to be enabled, false otherwise.

◆ nrf_memconf_rettrim_get()

NRF_STATIC_INLINE uint16_t nrf_memconf_rettrim_get ( NRF_MEMCONF_Type const *  p_reg,
uint8_t  trim_id 
)

Function for getting retention trim value.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]trim_idTrim index.
Returns
Requested trim value.

◆ nrf_memconf_rettrim_set()

NRF_STATIC_INLINE void nrf_memconf_rettrim_set ( NRF_MEMCONF_Type *  p_reg,
uint8_t  trim_id,
uint16_t  trim_val 
)

Function for setting retention trim value.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]trim_idTrim index.
[in]trim_valTrim value.

Documentation feedback | Developer Zone | Subscribe | Updated