Hardware access layer for managing the Block Protection (BPROT) mechanism. More...
Functions | |
__STATIC_INLINE void | nrf_bprot_nvm_blocks_protection_enable (NRF_BPROT_Type *p_reg, uint8_t group_idx, uint32_t block_mask) |
Function for enabling protection for specified non-volatile memory blocks. More... | |
__STATIC_INLINE void | nrf_bprot_nvm_protection_in_debug_set (NRF_BPROT_Type *p_reg, bool enable) |
Function for setting the non-volatile memory (NVM) protection during debug. More... | |
Hardware access layer for managing the Block Protection (BPROT) mechanism.
__STATIC_INLINE void nrf_bprot_nvm_blocks_protection_enable | ( | NRF_BPROT_Type * | p_reg, |
uint8_t | group_idx, | ||
uint32_t | block_mask | ||
) |
Function for enabling protection for specified non-volatile memory blocks.
Blocks are arranged into groups of 32 blocks each. Each block size is 4 kB. Any attempt to write or erase a protected block will result in hard fault. The memory block protection can be disabled only by resetting the device.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | group_idx | Non-volatile memory group containing memory blocks to protect. |
[in] | block_mask | Non-volatile memory blocks to protect. Each bit in bitmask represents one memory block in the specified group. |
__STATIC_INLINE void nrf_bprot_nvm_protection_in_debug_set | ( | NRF_BPROT_Type * | p_reg, |
bool | enable | ||
) |
Function for setting the non-volatile memory (NVM) protection during debug.
NVM protection is disabled by default while debugging.
[in] | p_reg | Pointer to the structure of registers of the peripheral. |
[in] | enable | True if NVM protection during debug is to be enabled. False if otherwise. |