Firmware User Manual (AE-step)
91
Revision 1.02
2019-04-24
TLE984x Firmware User Manual
Return Values
Remarks
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.18
user_nvm_protect_clear
Description
This user API function clears a read and/or write protection for any NVM region individually. The API changes
the protection state for a region, but does not update the installed password (config sector).
A valid password must be provided in case any valid NVM protection password is installed for this region.
All NVM segment data (BSL-, Code- and Data- regions) and all passwords are erased in case a wrong password
is provided. Before erasing starts, all interrupts including NMI are temporarily disabled and any NVM and NVM
CS protection is disabled. Once erase is completed, protection and interrupts are restored to their original
state.
Set bit 31 of the password parameter to enable read protection, set bit 30 of the password parameter to enable
write protection. The bits (0...29) of the password parameter shall match the password installed before. In
case no valid protection password is currently installed, bits (0...29) are ignored.
Prototype
int32_t user_nvm_protect_clear (
uint32_t password
NVM_PASSWORD_SEGMENT_t segment
)
Parameters
Data Type
Description
int32_t
ERR_LOG_SUCCESS in case the password could be successfully applied, otherwise
a negative error code. Returned error code can be one of the following:
ERR_LOG_SUCCESS, ERR_LOG_CODE_USER_NVM_PROTECT_SEGMENT_INVALID,
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED,
ERR_LOG_CODE_CS_PAGE_CHECKSUM, ERR_LOG_CODE_CS_PAGE_ECC2READ,
ERR_LOG_CODE_USER_PROTECT_NVM_AND_PWD_ERASED,
ERR_LOG_CODE_NVM_PROTECT_REMOVE_PASSWORD_FAILED,
Data Type
Name
Description
Dir
uint32_t
password
Protection password to apply on the given segment
-
segment
Segment which should be password protected
-