Firmware User Manual (AE-step)
96
Revision 1.02
2019-04-24
TLE984x Firmware User Manual
Parameters
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.24
user_nvm_write_branch
Description
This user API function programs the NVM. It operates on the user NVM, as well as on the user data NVM. The API
shall write a number of bytes (count) from the source (data) to the NVM location (address) with the
programming options (options). During the NVM operation the program execution branches to a given SRAM
location (branch_address) and continues code execution from there. The options provide parameters like DH
and fail scenario handling.
Supported option parameters:
• NVM_PROG_CORR_ACT (Disturb handling & retry enabled)
• NVM_PROG_NO_FAILPAGE_ERASE
Data Type
Name
Description
Dir
uint32_t
address
NVM address where to program the data. Range is
0x11 device NVM size.
-
const void *
data
Pointer to the data where to read the programming data.
Pointer must be within valid RAM range (0x18
device RAM size) or an error code is returned.
-
uint8_t
count
Amount of bytes to program. Range from 1-128 bytes.
-
uint8_t
options
NVM programming options (e.g. NVM_PROG_CORR_ACT |
NVM_PROG_NO_FAILPAGE_ERASE)
-
Data Type
Description
int32_t
ERR_LOG_SUCCESS in case of successful write operation, otherwise a negative
error code. Returned error code can be one of the following: ERR_LOG_SUCCESS,
ERR_LOG_CODE_PARAM_INVALID,
ERR_LOG_CODE_USERAPI_POINTER_RAM_RANGE_INVALID,
ERR_LOG_CODE_USER_CROSS_PAGE_PRG_NOT_SUPPORTED,
ERR_LOG_CODE_USER_PROTECT_NVM_WRITE_PROTECTED,
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED,
ERR_LOG_CODE_ACCESS_AB_MODE_ERROR,
ERR_LOG_CODE_NVM_MAPRAM_UNKNOWN_TYPE_USAGE,
ERR_LOG_CODE_NVM_VER_ERROR,
ERR_LOG_CODE_NVM_PROG_MAPRAM_INIT_FAIL,
ERR_LOG_CODE_NVM_PROG_VERIFY_MAPRAM_INIT_FAIL,
ERR_LOG_CODE_NVM_ADDR_RANGE_INVALID,