MEMCONF HAL
- group nrf_memconf_hal
Hardware access layer for managing the Memory Configuration (MEMCONF) peripheral.
Defines
-
NRF_MEMCONF_HAS_RET2
Symbol indicating whether the second retention configuration register is present.
-
NRF_MEMCONF_HAS_REPAIR
Symbol indicating whether the repair configuration for RAM blocks is present.
-
NRF_MEMCONF_HAS_TRIM
Symbol indicating whether the trim configuration is present.
-
NRF_MEMCONF_POWERBLOCK_COUNT
Symbol specifying maximum number of available power blocks.
-
NRF_MEMCONF_POWERBLOCK_RAMBLOCK_CONTROL_COUNT
Symbol specifying maximum number of control RAM blocks.
-
NRF_MEMCONF_POWERBLOCK_RAMBLOCK_RET_COUNT
Symbol specifying maximum number of retention RAM blocks.
-
NRF_MEMCONF_POWERBLOCK_RAMBLOCK_RET2_COUNT
Symbol specifying maximum number of second bank retention RAM blocks.
-
NRF_MEMCONF_BLOCKTYPE_TRIM_MEMTRIM_MASK
Symbol specifying bitmask collecting all memory read and write margin trims.
-
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.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
power_id – [in] Power block index.
ramblock – [in] RAM block index.
enable – [in] True if RAM block is to be enabled, false otherwise.
-
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:
p_reg – [in] Pointer to the structure of registers of the peripheral.
power_id – [in] Power block index.
ramblock_mask – [in] Mask of RAM blocks.
enable – [in] True if RAM blocks are to be enabled, false otherwise.
-
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:
p_reg – [in] Pointer to the structure of registers of the peripheral.
power_id – [in] Power block index.
ramblock – [in] RAM block index.
- Return values:
true – RAM block is enabled.
false – RAM block is disabled.
-
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:
p_reg – [in] Pointer to the structure of registers of the peripheral.
power_id – [in] Power block index.
ramblock – [in] RAM block index.
enable – [in] True if RAM block retention is to be enabled, false otherwise.
-
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:
p_reg – [in] Pointer to the structure of registers of the peripheral.
power_id – [in] Power block index.
ramblock_mask – [in] Mask of RAM blocks.
enable – [in] True if retention for RAM blocks is to be enabled, false otherwise.
-
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:
p_reg – [in] Pointer to the structure of registers of the peripheral.
power_id – [in] Power block index.
ramblock – [in] RAM block index.
- Return values:
true – RAM block is enabled.
false – RAM block is disabled.
-
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:
p_reg – [in] Pointer to the structure of registers of the peripheral.
power_id – [in] Power block index.
ramblock – [in] RAM block index.
enable – [in] True if RAM block retention is to be enabled, false otherwise.
-
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:
p_reg – [in] Pointer to the structure of registers of the peripheral.
power_id – [in] Power block index.
ramblock – [in] RAM block index.
- Return values:
true – RAM block is enabled.
false – RAM block is disabled.
-
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:
p_reg – [in] Pointer to the structure of registers of the peripheral.
bitline – [in] Bitline to be enabled/disabled.
enable – [in] True if bitline is to be enabled, false otherwise.
-
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:
p_reg – [in] Pointer to the structure of registers of the peripheral.
bitline – [in] Bitline index.
- Returns:
Status of requested 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.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
bitline – [in] Bitline index.
address – [in] Addres for given bitline.
-
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:
p_reg – [in] Pointer to the structure of registers of the peripheral.
bitline – [in] Bitline index.
- Returns:
Address of requested bitline.
-
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:
p_reg – [in] Pointer to the structure of registers of the peripheral.
trim_id – [in] Trim index.
trim_val – [in] 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.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
trim_id – [in] Trim index.
- Returns:
Requested 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.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
trim_id – [in] Trim index.
trim_val – [in] 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.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
trim_id – [in] Trim index.
- Returns:
Requested trim value.
-
NRF_MEMCONF_HAS_RET2