Firmware User Manual (AE-step)
95
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.
In case of non linear sector, the sector erase function has to run mapram init starting from a random position
to get a random spare page (for the next programming).
6.8.23
user_nvm_write
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). 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
The page programming stops at page boundary. If data is lost due to page boundary, an error code informs
that crossing page boundary is not supported. The firmware preserves the non-programmed page data.
This function rejects with an error in case the accessed NVM page is write protected.
Prototype
int32_t user_nvm_write (
uint32_t address
const void * data
uint8_t count
uint8_t options
)
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_PROTECT_NVM_WRITE_PROTECTED,
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED,
ERR_LOG_CODE_NVM_INIT_MAPRAM_SECTOR