Firmware User Manual (AE-step)
94
Revision 1.02
2019-04-24
TLE984x Firmware User Manual
Parameters
Return Values
Remarks
This function does not support to erase any 100TP pages.
It is not allowed to be called by NVM callback routines or any interrupt or multi-threaded environment in a re-
entrant context.
6.8.22
user_nvm_sector_erase
Description
This user API function erases the NVM sector-wise. It operates on user code and data NVM region.
This function rejects with an error in case the accessed NVM page is write protected.
Prototype
int32_t user_nvm_sector_erase (
uint32_t address
)
Parameters
Data Type
Name
Description
Dir
uint32_t
address
Address of the NVM page to erase. Non-aligned address is
accepted. Range is 0x11 device NVM size.
-
branch_address Function callback address where to jump while waiting for
the NVM module to finish the erase operation. Address
must be within valid RAM range (0x18 device RAM
size). RAM end address - 4 is the upper limit.
-
Data Type
Description
int32_t
ERR_LOG_SUCCESS in case of successful erase operation, otherwise a negative
error code. Returned error code can be one of the following: ERR_LOG_SUCCESS,
ERR_LOG_CODE_NVM_ADDR_RANGE_INVALID,
ERR_LOG_CODE_USER_API_BRANCH_ADDRESS_INVALID,
ERR_LOG_CODE_USER_PROTECT_NVM_WRITE_PROTECTED,
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED,
Data Type
Name
Description
Dir
uint32_t
address
Address of the NVM sector to erase. Non-aligned address is
accepted. Range is 0x11 device NVM size.
-