![]() |
nrfx 4.5.0
|
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 the second bank retention RAM blocks. | |
| #define | NRF_MEMCONF_MEMTRIM_MASK_BIT(idx, _) |
| Macro to generate a mask bit for the memory read/write margin MEMCONF trim. | |
| #define | NRF_MEMCONF_MEMRETTRIM_MASK_BIT(idx, _) |
| Macro to generate a mask bit for the memory retention read/write margin MEMCONF trim. | |
| #define | NRF_MEMCONF_MEMTRIM_SIZE_MAX MEMCONF_NMEMTRIM_INTERNAL_SIZE |
| Symbol determining the maximum memory read/write margin trim size across all MEMCONF variants. | |
| #define | NRF_MEMCONF_MEMRETTRIM_SIZE_MAX MEMCONF_NMEMRETTRIM_INTERNAL_SIZE |
| Symbol determining the maximum memory retention read/write margin trim size across all MEMCONF variants. | |
| #define | NRF_MEMCONF_BLOCKTYPE_TRIM_MEMTRIM_MASK (NRFX_LISTIFY(NRF_MEMCONF_MEMTRIM_SIZE_MAX, NRF_MEMCONF_MEMTRIM_MASK_BIT, (|), _)) |
| Symbol specifying bitmask collecting all memory read and write margin trims. | |
| #define | NRF_MEMCONF_BLOCKTYPE_TRIM_MEMRETTRIM_MASK (NRFX_LISTIFY(NRF_MEMCONF_MEMRETTRIM_SIZE_MAX, NRF_MEMCONF_MEMRETTRIM_MASK_BIT, (|), _)) |
| Symbol specifying bitmask collecting all memory retention trims. | |
| #define | NRF_MEMCONF_RAMBLOCK_INDEX(_ret, _mem) |
| Macro for getting index of specified RAM block. | |
| #define | NRF_MEMCONF_RAMBLOCK_MASK(_ret, _mem) |
| Macro for getting mask of specified RAM block. | |
| #define | NRF_MEMCONF_RAMBLOCK_RETENTION_ON_MASK(_ret, _mem) |
| Macro for getting mask of retention enabled for specified RAM block. | |
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 void | nrf_memconf_ramblock_control_mask_set (NRF_MEMCONF_Type *p_reg, uint8_t power_id, uint32_t ramblock_mask) |
| Function for setting mask of RAM blocks powered-on in System ON mode. | |
| 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 void | nrf_memconf_ramblock_ret_mask_set (NRF_MEMCONF_Type *p_reg, uint8_t power_id, uint32_t ramblock_mask) |
| Function for setting mask of RAM blocks retained in System OFF mode. | |
| 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 the second bank in specified RAM block is enabled. | |
| NRF_STATIC_INLINE void | nrf_memconf_ramblock_ret2_mask_enable_set (NRF_MEMCONF_Type *p_reg, uint8_t power_id, uint32_t ramblock_mask, bool enable) |
| Function for enabling or disabling retention of the second bank for the specified RAM blocks. | |
| NRF_STATIC_INLINE void | nrf_memconf_ramblock_ret2_mask_set (NRF_MEMCONF_Type *p_reg, uint8_t power_id, uint32_t ramblock_mask) |
| Function for setting mask of RAM blocks whose secondary banks are to be retained in System OFF mode. | |
| 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. | |
Hardware access layer for managing the Memory Configuration (MEMCONF) peripheral.
| #define NRF_MEMCONF_MEMRETTRIM_MASK_BIT | ( | idx, | |
| _ ) |
Macro to generate a mask bit for the memory retention read/write margin MEMCONF trim.
| [in] | idx | Zero based memory margin retention trim index. |
| [in] | _ | Internal placeholder, to be ignored. |
| #define NRF_MEMCONF_MEMTRIM_MASK_BIT | ( | idx, | |
| _ ) |
Macro to generate a mask bit for the memory read/write margin MEMCONF trim.
| [in] | idx | Zero-based memory margin trim index. |
| [in] | _ | Internal placeholder, to be ignored. |
| #define NRF_MEMCONF_RAMBLOCK_INDEX | ( | _ret, | |
| _mem ) |
Macro for getting index of specified RAM block.
| [in] | _ret | RAM bank index. Can be empty if specified bank has no index. |
| [in] | _mem | RAM block number. |
| #define NRF_MEMCONF_RAMBLOCK_MASK | ( | _ret, | |
| _mem ) |
Macro for getting mask of specified RAM block.
| [in] | _ret | RAM bank index. Can be empty if specified bank has no index. |
| [in] | _mem | RAM block number. |
| #define NRF_MEMCONF_RAMBLOCK_RETENTION_ON_MASK | ( | _ret, | |
| _mem ) |
Macro for getting mask of retention enabled for specified RAM block.
| [in] | _ret | RAM bank index. Can be empty if specified bank has no index. |
| [in] | _mem | RAM block number. |
| NRF_STATIC_INLINE uint32_t nrf_memconf_bitline_address_get | ( | NRF_MEMCONF_Type const * | p_reg, |
| uint8_t | bitline ) |
Function for getting bitline address.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | bitline | Bitline index. |
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | bitline | Bitline index. |
| [in] | address | Addres for 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | bitline | Bitline index. |
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | bitline | Bitline to be enabled/disabled. |
| [in] | enable | True if bitline is to be enabled, false otherwise. |
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | trim_id | Trim index. |
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | trim_id | Trim index. |
| [in] | trim_val | Trim value. |
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | power_id | Power block index. |
| [in] | ramblock | RAM block index. Use NRF_MEMCONF_RAMBLOCK_INDEX for indexing RAM blocks. |
| true | RAM block is enabled. |
| false | RAM block is disabled. |
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | power_id | Power block index. |
| [in] | ramblock | RAM block index. Use NRF_MEMCONF_RAMBLOCK_INDEX for indexing RAM blocks. |
| [in] | enable | 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | power_id | Power block index. |
| [in] | ramblock_mask | Mask of RAM blocks. Use NRF_MEMCONF_RAMBLOCK_MASK for creating RAM block masks. |
| [in] | enable | True if RAM blocks are to be enabled, false otherwise. |
| NRF_STATIC_INLINE void nrf_memconf_ramblock_control_mask_set | ( | NRF_MEMCONF_Type * | p_reg, |
| uint8_t | power_id, | ||
| uint32_t | ramblock_mask ) |
Function for setting mask of RAM blocks powered-on in System ON mode.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | power_id | Power block index. Use NRF_MEMCONF_RAMBLOCK_INDEX for indexing RAM blocks. |
| [in] | ramblock_mask | Mask of RAM blocks. |
| 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 the second bank in specified RAM block is enabled.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | power_id | Power block index. |
| [in] | ramblock | RAM block index. Use NRF_MEMCONF_RAMBLOCK_INDEX for indexing RAM blocks. |
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | power_id | Power block index. |
| [in] | ramblock | RAM block index. Use NRF_MEMCONF_RAMBLOCK_INDEX for indexing RAM blocks. |
| [in] | enable | True if RAM block retention is to be enabled, false otherwise. |
| NRF_STATIC_INLINE void nrf_memconf_ramblock_ret2_mask_enable_set | ( | NRF_MEMCONF_Type * | p_reg, |
| uint8_t | power_id, | ||
| uint32_t | ramblock_mask, | ||
| bool | enable ) |
Function for enabling or disabling retention of the second bank for the specified RAM blocks.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | power_id | Power block index. |
| [in] | ramblock_mask | Mask of RAM blocks. Use NRF_MEMCONF_RAMBLOCK_MASK for creating RAM block masks. |
| [in] | enable | True if retention for RAM blocks is to be enabled, false otherwise. |
| NRF_STATIC_INLINE void nrf_memconf_ramblock_ret2_mask_set | ( | NRF_MEMCONF_Type * | p_reg, |
| uint8_t | power_id, | ||
| uint32_t | ramblock_mask ) |
Function for setting mask of RAM blocks whose secondary banks are to be retained in System OFF mode.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | power_id | Power block index. |
| [in] | ramblock_mask | Mask of RAM blocks. Use NRF_MEMCONF_RAMBLOCK_MASK for creating RAM block masks. |
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | power_id | Power block index. |
| [in] | ramblock | RAM block index. Use NRF_MEMCONF_RAMBLOCK_INDEX for indexing RAM blocks. |
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | power_id | Power block index. |
| [in] | ramblock | RAM block index. Use NRF_MEMCONF_RAMBLOCK_INDEX for indexing RAM blocks. |
| [in] | enable | 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | power_id | Power block index. |
| [in] | ramblock_mask | Mask of RAM blocks. Use NRF_MEMCONF_RAMBLOCK_MASK for creating RAM block masks. |
| [in] | enable | True if retention for RAM blocks is to be enabled, false otherwise. |
| NRF_STATIC_INLINE void nrf_memconf_ramblock_ret_mask_set | ( | NRF_MEMCONF_Type * | p_reg, |
| uint8_t | power_id, | ||
| uint32_t | ramblock_mask ) |
Function for setting mask of RAM blocks retained in System OFF mode.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | power_id | Power block index. |
| [in] | ramblock_mask | Mask of RAM blocks. Use NRF_MEMCONF_RAMBLOCK_MASK for creating RAM block masks. |
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | trim_id | Trim index. |
| 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.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | trim_id | Trim index. |
| [in] | trim_val | Trim value. |