Firmware User Manual (AE-step)
85
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.12
user_nvm_100tp_write
Description
This user API function writes data to the configuration NVM, the write address is relative inside the
configuration NVM area (8x one page, 1024 bytes). The function supports partial page programming,
preserving page data not passed as new input. The function performs an implicit update of the page checksum
and the write counter. The write counter is increased by 1 at each write operation, when 99 is reached, an error
is reported. The function does not allow the customer to change the page checksum or write counter. An
invalid parameter setup (page number out of range, offset plus count larger than page boundary, count is 0)
returns an error, no write operation is performed. The function also returns an error in case the NVM code
segment is write protected. The write counter and the page checksum are located in the last two bytes of the
page.
The maximum value for writing is 126 bytes.
Prototype
int32_t user_nvm_100tp_write (
uint32_t page_num
uint32_t offset
const void * data
uint32_t count
void *
data
Data pointer where to store the read data. Pointer plus
valid count must be within valid RAM range or an error
code is returned
-
uint32_t
count
Amount of data bytes to read. If count is zero, there is no
operation and an error code is returned. Maximum is 127
bytes.
-
Data Type
Description
int32_t
ERR_LOG_SUCCESS in case of successful read operation, otherwise a negative error
code. Returned error code can be one of the following: ERR_LOG_SUCCESS,
ERR_LOG_CODE_100TP_PARAM_INVALID,
ERR_LOG_CODE_USERAPI_POINTER_RAM_RANGE_INVALID,
ERR_LOG_CODE_100TP_READ_ADDRESS_INVALID,
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED,
ERR_LOG_CODE_CS_PAGE_CHECKSUM,
ERR_LOG_CODE_CS_PAGE_ECC2READ
Data Type
Name
Description
Dir