1.3.15.8 1.4.13.8 1.5.14.8 1.29.15.8 1.30.10.8 1.31.10.8 1.32.16.10 1.33.10.8 1.37.10.8 1.38.13.8 1.39.10.8 1.40.13.8 NVMCTRL_RegionUnlock Function
C
The prototype of NVMCTRL_RegionUnlock() varies based on device family. Refer to the generated header file for the actual prototype to be used.
void NVMCTRL_RegionUnlock (uint32_t address); void NVMCTRL_RegionUnlock (NVMCTRL_MEMORY_REGION region);
Summary
Unlocks a NVM region.
Description
This function unlocks a region that was locked using the NVMCTRL_RegionLock() function. The address parameter can be any address within the region. Unlocking a region unlocks all pages in the region and makes these pages accessible to write and erase operations.
Precondition
Validate if NVM controller is ready to accept new request by calling NVMCTRL_IsBusy();
Parameters
Param | Description |
---|---|
address | Any address in the region to be unlocked. |
region | Region to be unlocked. |
Returns
None.
Example
// Wait till the NVMCTRL module is available and then un-lock the region containing address 0x30000.
while(NVMCTRL_IsBusy());
NVMCTRL_RegionUnlock(0x00030000);
while(NVMCTRL_IsBusy());
// Wait till the NVMCTRL module is available and then un-lock the application region. while(NVMCTRL_IsBusy()); NVMCTRL_RegionUnlock(NVMCTRL_MEMORY_REGION_APPLICATION); while(NVMCTRL_IsBusy());
Remarks
None.