![]() |
Infineon MOTIX™ MCU TLE985x Device Family SDK
|
Go to the source code of this file.
BootROM low level access library.
Macros | |
#define | FlashPageSize (128U) |
A flash page contains 128 bytes. More... | |
#define | FlashSectorSize (4096U) |
A flash sector contains 32 flash pages, 4096 bytes in total. More... | |
#define | addr_user_nvm_protect_clear (0x000000a1u) |
#define | addr_user_nvm_protect_set (0x000000a3u) |
#define | addr_user_nvm_protect_get (0x000000a5u) |
#define | addr_user_cid_get (0x000000a7u) |
#define | addr_user_nvm_ecc_events_get (0x000000a9u) |
#define | addr_user_nvm_ecc_check (0x000000abu) |
#define | addr_user_nac_get (0x000000adu) |
#define | addr_user_nac_set (0x000000afu) |
#define | addr_user_nad_get (0x000000b1u) |
#define | addr_user_nad_set (0x000000b3u) |
#define | addr_user_nvm_100tp_read (0x000000b5u) |
#define | addr_user_nvm_100tp_write (0x000000b7u) |
#define | addr_user_nvm_config_get (0x000000b9u) |
#define | addr_user_nvm_page_erase (0x000000bbu) |
#define | addr_user_nvm_page_erase_branch (0x000000bdu) |
#define | addr_user_nvm_ready_poll (0x000000bfu) |
#define | addr_user_nvm_sector_erase (0x000000c1u) |
#define | addr_user_nvm_write (0x000000c3u) |
#define | addr_user_nvm_write_branch (0x000000c5u) |
#define | addr_user_ram_mbist (0x000000c7u) |
#define | addr_user_version_read (0x000000c9u) |
#define | addr_user_nvm_mapram_init (0x000000cbu) |
#define | addr_user_nvm_clk_factor_set (0x000000cdu) |
#define | addr_user_vbg_temperature_get (0x000000cfu) |
#define | addr_user_nvm_page_verify (0x000000d3u) |
#define | addr_user_nvm_page_erase_verify (0x000000d5u) |
#define | addr_user_nvm_sector_erase_verify (0x000000d7u) |
#define | addr_user_nvm_mapram_recover (0x000000d9u) |
#define | addr_user_nvm_service_algorithm (0x000000ddu) |
#define | addr_user_nvm_page_checksum_check (0x000000dfu) |
#define | addr_user_nvm_100tp_erase (0x000000e1u) |
#define | addr_user_adc1_offset_calibration (0x000000e3u) |
#define | addr_user_nvm_password_set (0x000000e5u) |
#define | addr_user_nvm_write_fast (0x000000e7u) |
#define | addr_user_nvm_write_fast_retry (0x000000e9u) |
#define | addr_user_nvm_write_fast_abort (0x000000ebu) |
Typedefs | |
typedef void(* | user_callback_t) (void) |
Variables | |
int32_t(*const | user_nvm_write_fast_retry )(void) |
This function can be called to retry a NVM fast write operation. More... | |
int32_t(*const | user_nvm_write_fast_abort )(void) |
This function can be called to terminate a NVM fast write operation. More... | |
int32_t(*const | user_adc1_offset_calibration )(void) |
This function will perform ADC1 core calibration in software mode. More... | |
int32_t(*const | user_nvm_page_checksum_check )(uint32_t page_no) |
This function will perform a checksum check on the specified NVM page. More... | |
int32_t(*const | user_nvm_service_algorithm )(uint32_t *sa_result) |
This function will run service algorithm on a mapped NVM sector. More... | |
int32_t(*const | user_nvm_mapram_recover )(void) |
This function will manually do mapRAM initialization by extracting mapping info on good mapped pages. More... | |
int32_t(*const | user_nvm_mapram_init )(void) |
This function triggers NVM FSM mapRAM update sequence from mapped sector. More... | |
int32_t(*const | user_nvm_ecc_events_get )(uint32_t *pNVM_Addr) |
This function checks if any single or double ECC events have occurred during runtime. More... | |
int32_t(*const | user_nvm_ecc_check )(void) |
This function checks for single and double ECC checking over the entire NVM on all NVM linear and NVM non-linear sectors. More... | |
int32_t(*const | user_nac_get )(uint8_t *nac_value) |
This function reads out the NAC value that is currently configured in the non volatile device configuration memory. More... | |
int32_t(*const | user_nac_set )(uint8_t nac) |
This function configures the NAC value in the non volatile device configuration memory. More... | |
int32_t(*const | user_nad_get )(uint8_t *nad_value) |
This function reads out the FASTLIN NAD value that is currently configured in the non volatile device configuration memory. More... | |
int32_t(*const | user_nad_set )(uint8_t nad) |
This function configures the FASTLIN NAD value in the non volatile device configuration memory. More... | |
int32_t(*const | user_nvm_100tp_read )(uint32_t page_num, uint32_t offset, void *data, uint32_t count) |
This function reads data from the customer accessible configuration pages (100TP). More... | |
int32_t(*const | user_nvm_100tp_write )(uint32_t page_num, uint32_t offset, const void *data, uint32_t count) |
This function writes data to the customer accessible configuration pages (100TP). More... | |
int32_t(*const | user_nvm_100tp_erase )(uint32_t page_num) |
This function erases all data in one of the 100TP NVM pages preserving the write counter. More... | |
uint32_t(*const | user_nvm_protect_get )(NVM_PASSWORD_SEGMENT_t segment) |
This function checks for the hardware current applied NVM protection status. More... | |
int32_t(*const | user_nvm_protect_set )(uint32_t password, NVM_PASSWORD_SEGMENT_t segment) |
This function sets write protection for any NVM region individually, except CBSL. More... | |
int32_t(*const | user_nvm_protect_clear )(uint32_t password, NVM_PASSWORD_SEGMENT_t segment) |
This function clears write protection for any NVM region individually, except CBSL. More... | |
int32_t(*const | user_nvm_password_set )(uint32_t password, NVM_PASSWORD_SEGMENT_t segment) |
This function sets password for NVM region individually. More... | |
bool(*const | user_nvm_ready_poll )(void) |
This function checks for the readiness of the NVM module. More... | |
int32_t(*const | user_nvm_page_erase )(uint32_t address) |
This function erases a given NVM page (address). More... | |
int32_t(*const | user_nvm_page_erase_branch )(uint32_t address, user_callback_t branch_address) |
This function erases a given NVM page (address) and branches to an address (branch_address) for code execution during the NVM operation. More... | |
int32_t(*const | user_nvm_sector_erase )(uint32_t address) |
This function erases the NVM sector-wise. More... | |
int32_t(*const | user_nvm_write )(uint32_t address, const void *data, uint32_t count, uint32_t options) |
This function programs the NVM. It operates on the user NVM, as well as on the user data NVM. More... | |
int32_t(*const | user_nvm_write_fast )(uint32_t address, const void *data, uint32_t count) |
This function programs the NVM faster than normal. More... | |
int32_t(*const | user_nvm_write_branch )(uint32_t address, const void *data, uint32_t count, uint32_t options, user_callback_t branch_address) |
This function programs the NVM. It operates on the user NVM, as well as on the user data NVM. More... | |
int32_t(*const | user_ram_mbist )(uint32_t start_address, uint32_t end_address) |
This function performs a MBIST on the integrated SRAM. More... | |
void(*const | user_nvm_clk_factor_set )(uint8_t clk_factor) |
This function sets the SCU_SYSCON0.NVMCLKFAC divider. More... | |
int32_t(*const | user_vbg_temperature_get )(VBG_TEMP_SELECT_t temp_select, uint32_t *temperature) |
This function returns the V bandgap temperature hot or cold. More... | |
int32_t(*const | user_nvm_page_verify )(uint32_t address) |
This function reads the physical page content into the NVM assembly buffer using Normal Read Margins. More... | |
int32_t(*const | user_nvm_page_erase_verify )(uint32_t address) |
This function verifies with HardRead Erased margin on a page to check that all bits are erased. More... | |
int32_t(*const | user_nvm_sector_erase_verify )(uint32_t address) |
This function performs a page-by-page erase check for a full sector. Each page is checked against Hardread- Margin-Erased. More... | |
#define addr_user_adc1_offset_calibration (0x000000e3u) |
#define addr_user_cid_get (0x000000a7u) |
#define addr_user_nac_get (0x000000adu) |
#define addr_user_nac_set (0x000000afu) |
#define addr_user_nad_get (0x000000b1u) |
#define addr_user_nad_set (0x000000b3u) |
#define addr_user_nvm_100tp_erase (0x000000e1u) |
#define addr_user_nvm_100tp_read (0x000000b5u) |
#define addr_user_nvm_100tp_write (0x000000b7u) |
#define addr_user_nvm_clk_factor_set (0x000000cdu) |
#define addr_user_nvm_config_get (0x000000b9u) |
#define addr_user_nvm_ecc_check (0x000000abu) |
#define addr_user_nvm_ecc_events_get (0x000000a9u) |
#define addr_user_nvm_mapram_init (0x000000cbu) |
#define addr_user_nvm_mapram_recover (0x000000d9u) |
#define addr_user_nvm_page_checksum_check (0x000000dfu) |
#define addr_user_nvm_page_erase (0x000000bbu) |
#define addr_user_nvm_page_erase_branch (0x000000bdu) |
#define addr_user_nvm_page_erase_verify (0x000000d5u) |
#define addr_user_nvm_page_verify (0x000000d3u) |
#define addr_user_nvm_password_set (0x000000e5u) |
#define addr_user_nvm_protect_clear (0x000000a1u) |
#define addr_user_nvm_protect_get (0x000000a5u) |
#define addr_user_nvm_protect_set (0x000000a3u) |
#define addr_user_nvm_ready_poll (0x000000bfu) |
#define addr_user_nvm_sector_erase (0x000000c1u) |
#define addr_user_nvm_sector_erase_verify (0x000000d7u) |
#define addr_user_nvm_service_algorithm (0x000000ddu) |
#define addr_user_nvm_write (0x000000c3u) |
#define addr_user_nvm_write_branch (0x000000c5u) |
#define addr_user_nvm_write_fast (0x000000e7u) |
#define addr_user_nvm_write_fast_abort (0x000000ebu) |
#define addr_user_nvm_write_fast_retry (0x000000e9u) |
#define addr_user_ram_mbist (0x000000c7u) |
#define addr_user_vbg_temperature_get (0x000000cfu) |
#define addr_user_version_read (0x000000c9u) |
#define FlashPageSize (128U) |
A flash page contains 128 bytes.
#define FlashSectorSize (4096U) |
A flash sector contains 32 flash pages, 4096 bytes in total.
typedef void(* user_callback_t) (void) |
This enum defines the Error codes.
Enumerator | |
---|---|
ERR_LOG_SUCCESS | Successful execution, no error occured |
ERR_LOG_ERROR | Standard Error |
ERR_LOG_CODE_NVM_SEGMENT_READ_PROTECTED | Trying to read from a NVM segment that is read protected |
ERR_LOG_CODE_MEM_READWRITE_PARAMS_INVALID | Invalid parameters to RAM/NVM/NVM_CS read/write command |
ERR_LOG_CODE_BSL_RECV_BYTES_MISMATCH | Mismatch in received number of bytes for the BSL message |
ERR_LOG_CODE_NVM_IS_READ_PROTECTED | BSL message is not allowed access when NVM is read protected on any region |
ERR_LOG_CODE_NVM_ERASE_PARAMS_INVALID | Invalid BSL parameters to NVM erase command |
ERR_LOG_CODE_INVALID_CUSTOMER_CONFIG_CBSL_SIZE | Specified customer configured CBSL size is invalid |
ERR_LOG_CODE_CUSTOMER_CONFIG_CBSL_PROGRAMMED_OR_READ_ERR | Customer configured CBSL size already programmed or read error |
ERR_LOG_CODE_NVM_CODE_PROGRAMMED | Customer configured CBSL size can't be changed when code is present in NVM |
ERR_LOG_CODE_BSL_NVM_CALC_CHECKSUM_MISMATCH | BSL: Calculated NVM checksum does not match |
ERR_LOG_CODE_FASTLIN_BAUDRATE_SET_FAIL | Invalid FastLIN baudrate parameter or current BSL interface is not FastLIN |
ERR_LOG_CODE_MSG_VALIDITY_FAIL | BSL message validity failed |
ERR_LOG_CODE_NVM_WRITE_FAST_WRONG_MODE | NVM is not in fast write mode |
ERR_LOG_CODE_NVM_WRITE_FAST_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID | Memory address range is invalid |
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED | NVM semaphore already reserved |
ERR_LOG_CODE_NVM_PAGE_IS_MAPPED | NVM erase page/sector verify: Page is mapped / not erased |
ERR_LOG_CODE_NVM_SPARE_PAGE_IS_NOT_MAPPED | NVM erase page verify: Spare page is not mapped |
ERR_LOG_CODE_ECC2READ_ERROR | ECC2READ error generated when reading NVM data |
ERR_LOG_CODE_NVM_FAST_PROG_NOT_ALLOWED | Fast programming option not allowed for used NVM page |
ERR_LOG_CODE_NVM_VER_ERROR | 2 or more bit errors detected in NVM page when verifying NVM data |
ERR_LOG_CODE_NVM_PROG_MAPRAM_INIT_FAIL | NVM mapRAM update failed after mapped page programming or after execution of DH |
ERR_LOG_CODE_NVM_PROG_VERIFY_MAPRAM_INIT_FAIL | NVM programming and mapRAM init update failed after mapped page programming |
ERR_LOG_CODE_NVM_ECC2_MAPBLOCK_ERROR | ECC2 mapBlock error generated while reading from a NVM page |
ERR_LOG_CODE_NVM_MAPRAM_UNKNOWN_TYPE_USAGE | MAPRAM physical page number for a given logical sector/page is larger than the number of physical pages in a sector |
ERR_LOG_CODE_NVM_ECC2_MAPRAM_ERROR | ECC2 mapRAM error generated while reading mapRAM |
ERR_LOG_CODE_NVM_PAGE_NOT_MAPPED | NVM page is not mapped |
ERR_LOG_CODE_NVM_INIT_MAPRAM_SECTOR | Mapped page has double mapping or ECC2 error when trying to init mapRAM |
ERR_LOG_CODE_NVM_MAPRAM_MANUAL_SPARE_PAGE_FAILED | NVM manual spare page selection failed as part of mapRAM update |
ERR_LOG_CODE_NVM_WRITE_FAST_REACH_MAX_RETRIES | Reach maximum tries |
ERR_LOG_CODE_ACCESS_AB_MODE_ERROR | Error when setting the assembly buffer to mode 1 or 2 |
ERR_LOG_CODE_NVM_ECC2_DATA_ERROR | ECC2 data error generated while reading from a NVM page |
ERR_LOG_CODE_ADDRESS_RANGE_CROSSING_PAGE_BOUNDARY | Attempt to access NVM address range which is crossing NVM page boundary |
ERR_LOG_CODE_100TP_WRITE_COUNT_EXCEEDED | NVM 100TP page write count was exceeded |
ERR_LOG_CODE_100TP_PAGE_INVALID | Attempt to access NVM 100TP page address outside of the valid range |
ERR_LOG_CODE_NVM_100TP_PAGE_CNT_ERROR | NVM 100TP page write counter contains ECC2 error. Value hardcoded according to documentation |
ERR_LOG_CODE_CS_PAGE_CHECKSUM | NVM config sector checksum calculation failed |
ERR_LOG_CODE_CS_PAGE_ECC2READ | NVM config sector checksum calculation failure based on NVM ECC2 error |
ERR_LOG_CODE_MBIST_FAILED | MBIST test detected an error |
ERR_LOG_CODE_MBIST_TIMEOUT | MBIST test failed due to timeout |
ERR_LOG_CODE_USER_INVALID_NVM_PAGE_NUMBER | Invalid NVM page number |
ERR_LOG_CODE_USER_INVALID_VBG_TEMP_SELECT | user_vbg_temperature_get(): Wrong selection of vbg temperature |
ERR_LOG_CODE_NAC_VALUE_INVALID | NAC value out of range in user_nac_set() |
ERR_LOG_CODE_MBIST_RAM_RANGE_INVALID | user_ram_mbist() RAM range for MBIST is invalid |
ERR_LOG_CODE_PARAM_LENGTH | user_version_read() the provided length parameter is to small to store the information. |
ERR_LOG_CODE_USER_NO_NVM_MAPPED_SECTOR | NVM has no configured mapped sectors |
ERR_LOG_CODE_USER_NVM_SEGMENT_INVALID | Provided NVM segment is invalid |
ERR_LOG_CODE_SINGLE_ECC_EVENT_OCCURRED | user_ecc_events_get()/user_ecc_get() single ECC event has occurred |
ERR_LOG_CODE_DOUBLE_ECC_EVENT_OCCURRED | user_ecc_events_get()/user_ecc_get() double ECC event has occurred |
ERR_LOG_CODE_SINGLE_AND_DOUBLE_ECC_EVENT_OCCURRED | user_ecc_events_get()/user_ecc_get() single and double ECC events have occurred |
ERR_LOG_CODE_PARAM_INVALID | user_nvm_write/branch(): data parameter is invalid |
ERR_LOG_CODE_USER_PROTECT_NVM_WRITE_PROTECTED | Operation not allowed when NVM is write protected |
ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID | Provided pointer doesn't point to a valid RAM range |
ERR_LOG_CODE_USER_NVM_SEGMENT_CONFIG_MISMATCH | NVM segment does not match the current configured NVM region type |
ERR_LOG_CODE_NVM_IS_BUSY | NVM is busy doing another operation |
ERR_LOG_CODE_USER_PROTECT_PWD_INVALID | user_protect_password_set() provided password not valid |
ERR_LOG_CODE_USER_PROTECT_PWD_EXISTS | nvm_protect_password_set() segment password already exists when trying to set a new one in |
ERR_LOG_CODE_NO_PASSWORD_EXISTS | Password clear: No password installed when trying to clear password |
ERR_LOG_CODE_USER_PROTECT_WRONG_PASSWORD | user_nvm_protect_set(), user_nvm_protect_clear(): wrong password given |
ERR_LOG_CODE_NVM_CONFIG_SECTOR_WRITE_PROTECTED | Not allowed to change values in write protected config sector |
ERR_LOG_CODE_SWITCH_KEY_INVALID | user_nvm_switch_key_set() NVM switch key ID is invalid |
ERR_LOG_CODE_USERAPI_SWITCH_KEY_VALUE_OR_USAGE_INVALID | user_nvm_switch_key_set() NVM switch key value is invalid, API usage not allowed or selected key invalid |
This enum defines the NVM protection password segment.
enum VBG_TEMP_SELECT_t |
|
extern |
This function will perform ADC1 core calibration in software mode.
ERR_LOG_SUCCESS | |
ERR_LOG_ERROR |
Example
This example performs ADC1 core calibration in software mode.
|
extern |
This function reads out the NAC value that is currently configured in the non volatile device configuration memory.
*nac_value | Pointer where to store the BSL NAC value read from the device configuration sector. |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID |
Example
This example reads out the NAC value that is currently configured.
|
extern |
This function configures the NAC value in the non volatile device configuration memory.
nac | NAC value to be stored in the device configuration memory. |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_NVM_CONFIG_SECTOR_WRITE_PROTECTED | |
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_ACCESS_AB_MODE_ERROR | |
ERR_LOG_CODE_NAC_VALUE_INVALID | |
ERR_LOG_CODE_NVM_ECC2_DATA_ERROR | |
ERR_LOG_CODE_NVM_VER_ERROR |
Example
This example performs NAC Value Set Operation.
|
extern |
This function reads out the FASTLIN NAD value that is currently configured in the non volatile device configuration memory.
*nad_value | Pointer where to store the BSL nad value read from the device configuration sector. |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID |
Example
This example reads out the FASTLIN NAD value that is currently configured.
|
extern |
This function configures the FASTLIN NAD value in the non volatile device configuration memory.
nad | FASTLIN NAD value to be stored in the device configuration memory. Valid range is from 0x00-0xFF. |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_NVM_CONFIG_SECTOR_WRITE_PROTECTED | |
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_ACCESS_AB_MODE_ERROR | |
ERR_LOG_CODE_NVM_ECC2_DATA_ERROR | |
ERR_LOG_CODE_NVM_VER_ERROR |
Example
This example performs NAD Value Set Operation.
|
extern |
This function erases all data in one of the 100TP NVM pages preserving the write counter.
page_num | 100TP page number to erase. Valid range: 0 to 7. |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_NVM_100TP_PAGE_CNT_ERROR | |
ERR_LOG_CODE_100TP_PAGE_INVALID | |
ERR_LOG_CODE_NVM_CONFIG_SECTOR_WRITE_PROTECTED | |
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_ACCESS_AB_MODE_ERROR | |
ERR_LOG_CODE_NVM_VER_ERROR | |
ERR_LOG_CODE_100TP_WRITE_COUNT_EXCEEDED | |
ERR_LOG_CODE_NVM_ECC2_DATA_ERROR |
Example
This example performs a complete erase of the first 100TP page.
|
extern |
This function reads data from the customer accessible configuration pages (100TP).
page_num | Page number where to read from. Valid range: 0 to 7. |
offset | Byte offset inside the selected page address, where to start reading from. |
*data | Data pointer where to store the data read. Pointer plus valid count must be within valid RAM range or an error code is returned. |
count | Amount of data bytes to read. If count is zero, there is no operation performed and an error code is returned. |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID | |
ERR_LOG_CODE_100TP_PAGE_INVALID | |
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED |
Example
This example performs a complete read of the first 100TP page.
|
extern |
This function writes data to the customer accessible configuration pages (100TP).
page_num | Page number where to write to. Valid range: 0 to 7. |
offset | Byte offset inside the selected page address, where to start writing. Maximum is 126 bytes. |
*data | Data pointer where to read the data to write. Pointer plus valid count must be within valid RAM range or an error code is returned. |
count | Amount of data bytes to write. If count is zero, there is no write operation performed and an error code is returned. Maximum is 126 bytes. |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID | |
ERR_LOG_CODE_NVM_CONFIG_SECTOR_WRITE_PROTECTED | |
ERR_LOG_CODE_100TP_PAGE_INVALID | |
ERR_LOG_CODE_100TP_WRITE_COUNT_EXCEEDED | |
ERR_LOG_CODE_NVM_VER_ERROR | |
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_ACCESS_AB_MODE_ERROR | |
ERR_LOG_CODE_NVM_ECC2_DATA_ERROR | |
ERR_LOG_CODE_ECC2READ_ERROR |
Example
This example performs a complete write of the first 100TP page.
|
extern |
This function sets the SCU_SYSCON0.NVMCLKFAC divider.
clk_factor | value is shifted and set to the corresponding bit fields of the register. |
Example
This example sets the clock divider to div 2, fsys/2.
|
extern |
This function checks for single and double ECC checking over the entire NVM on all NVM linear and NVM non-linear sectors.
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_SINGLE_ECC_EVENT_OCCURRED | |
ERR_LOG_CODE_DOUBLE_ECC_EVENT_OCCURRED | |
ERR_LOG_CODE_SINGLE_AND_DOUBLE_ECC_EVENT_OCCURRED | |
ERR_LOG_CODE_NVM_SEGMENT_READ_PROTECTED |
Example
This example checks for single and double ECC checking over the entire NVM on all NVM linear and NVM non-linear sectors.
|
extern |
This function checks if any single or double ECC events have occurred during runtime.
It reports any single or double ECC event coming from NVM.
*pNVM_Addr | Pointer where to store the ECC2 failing NVM address. This pointer stays untouched in case no NVM ECC2 errors was detected. |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID | |
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_SINGLE_ECC_EVENT_OCCURRED | |
ERR_LOG_CODE_DOUBLE_ECC_EVENT_OCCURRED | |
ERR_LOG_CODE_SINGLE_AND_DOUBLE_ECC_EVENT_OCCURRED |
Example
This example checks if any single or double ECC events have occurred during runtime.
|
extern |
This function triggers NVM FSM mapRAM update sequence from mapped sector.
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_NVM_INIT_MAPRAM_SECTOR | |
ERR_LOG_CODE_USER_NO_NVM_MAPPED_SECTOR |
Example
This example triggers NVM FSM mapRAM update sequence from mapped sector.
|
extern |
This function will manually do mapRAM initialization by extracting mapping info on good mapped pages.
Positive_Number | |
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_USER_NO_NVM_MAPPED_SECTOR | |
ERR_LOG_CODE_NVM_ECC2_MAPRAM_ERROR |
Example
This example performs a MAPRAM Recover Operation if NVM SA Operation fails repairing a corrupted mapped data sector.
|
extern |
This function will perform a checksum check on the specified NVM page.
page_no | Page to check, which is one of the 100TP pages (0..7) or NVM CS page containing BSL (startup) settings (8). |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_USER_INVALID_NVM_PAGE_NUMBER | |
ERR_LOG_CODE_CS_PAGE_CHECKSUM | |
ERR_LOG_CODE_CS_PAGE_ECC2READ | |
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED |
Example
This example performs a checksum check on the first NVM page.
|
extern |
This function erases a given NVM page (address).
address | Address of the NVM page to erase. Non-aligned address is accepted. Range is 0x11000000 + device NVM size. |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID | |
ERR_LOG_CODE_USER_PROTECT_NVM_WRITE_PROTECTED | |
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_NVM_ECC2_MAPRAM_ERROR | |
ERR_LOG_CODE_ACCESS_AB_MODE_ERROR |
Example
This example performs a page erase of the first data flash page.
|
extern |
This function erases a given NVM page (address) and branches to an address (branch_address) for code execution during the NVM operation.
address | Address of the NVM page to erase. Non-aligned address is accepted. Range is 0x11000000 + device NVM size. |
branch_address | Function callback address where to jump while waiting for the NVM module to finish the erase operation (see user_callback_t) |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID | |
ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID | |
ERR_LOG_CODE_USER_PROTECT_NVM_WRITE_PROTECTED | |
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_NVM_ECC2_MAPRAM_ERROR | |
ERR_LOG_CODE_ACCESS_AB_MODE_ERROR |
Example
This example performs a page erase of the first data flash page and branches to RAM_Branch_Function address.
|
extern |
This function verifies with HardRead Erased margin on a page to check that all bits are erased.
address | Address of the NVM page to check. Non-aligned address is accepted. Range is 0x11000000 + device NVM size. |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_USER_PROTECT_NVM_WRITE_PROTECTED | |
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID | |
ERR_LOG_CODE_NVM_PAGE_IS_MAPPED | |
ERR_LOG_CODE_NVM_SPARE_PAGE_IS_NOT_MAPPED | |
ERR_LOG_CODE_NVM_VER_ERROR | |
ERR_LOG_CODE_ACCESS_AB_MODE_ERROR | |
ERR_LOG_CODE_NVM_ECC2_MAPRAM_ERROR |
Example
This example verifies the erased state of the 1st Page of the data flash sector.
|
extern |
This function reads the physical page content into the NVM assembly buffer using Normal Read Margins.
The content of the assembly buffer is then used to check the physical page content by using the hardread margins erase and written.
address | Address of the NVM page to check. Non-aligned address is accepted. Range is 0x11000000 + device NVM size. |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_USER_PROTECT_NVM_WRITE_PROTECTED | |
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID | |
ERR_LOG_CODE_NVM_VER_ERROR | |
ERR_LOG_CODE_NVM_PAGE_NOT_MAPPED | |
ERR_LOG_CODE_ACCESS_AB_MODE_ERROR | |
ERR_LOG_CODE_NVM_ECC2_MAPRAM_ERROR | |
ERR_LOG_CODE_NVM_ECC2_DATA_ERROR | |
ERR_LOG_CODE_NVM_ECC2_MAPBLOCK_ERROR |
Example
This example verifies the data integrity of the 1st page of the data flash sector.
|
extern |
This function sets password for NVM region individually.
password | Protection password to apply on the given segment |
segment | Segment which should be password protected (see NVM_PASSWORD_SEGMENT_t) |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_USER_NVM_SEGMENT_INVALID | |
ERR_LOG_CODE_USER_PROTECT_PWD_INVALID | |
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_ACCESS_AB_MODE_ERROR | |
ERR_LOG_CODE_NVM_ECC2_DATA_ERROR | |
ERR_LOG_CODE_NVM_VER_ERROR | |
ERR_LOG_CODE_USER_PROTECT_PWD_EXISTS | |
ERR_LOG_CODE_USER_NVM_SEGMENT_CONFIG_MISMATCH | |
ERR_LOG_CODE_ECC2READ_ERROR | |
ERR_LOG_CODE_NVM_IS_BUSY |
Example
This example sets password to 0x40000001 (Write protection enabled with password equals to 0x1) for customer data mapped segment.
|
extern |
This function clears write protection for any NVM region individually, except CBSL.
password | Protection password to apply on the given segment |
segment | Segment which should be password protected (see NVM_PASSWORD_SEGMENT_t) |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_USER_NVM_SEGMENT_INVALID | |
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_USER_PROTECT_WRONG_PASSWORD | |
ERR_LOG_CODE_USER_NVM_SEGMENT_CONFIG_MISMATCH | |
ERR_LOG_CODE_ECC2READ_ERROR |
Example
This example clears write protection with a password installed before and equals to 0x40000000 (Write protection enabled with password equals to 0x0) for customer data mapped segment.
|
extern |
This function checks for the hardware current applied NVM protection status.
segment | Which NVM segment to retrieve the current password protection status (see NVM_PASSWORD_SEGMENT_t) |
0x00000000 | : Protection disabled |
0x80000000 | : Read protection enabled |
0x40000000 | : Write protection enabled |
0xC0000000 | : Read and write protection enabled |
0xFFFFFFFF | : Segment not recognized. |
Example
This example checks the NVM protection status for customer data mapped segment.
|
extern |
This function sets write protection for any NVM region individually, except CBSL.
password | Protection password to apply on the given segment |
segment | Segment which should be password protected (see NVM_PASSWORD_SEGMENT_t) |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_USER_NVM_SEGMENT_INVALID | |
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_USER_PROTECT_WRONG_PASSWORD | |
ERR_LOG_CODE_USER_NVM_SEGMENT_CONFIG_MISMATCH | |
ERR_LOG_CODE_ECC2READ_ERROR |
Example
This example sets write protection with a password installed before and equals to 0x40000000 (Write protection enabled with password equals to 0x0) for customer data mapped segment.
|
extern |
This function checks for the readiness of the NVM module.
True | : The requested NVM operation is already finished |
False | : The requested NVM operation is not finished |
Example
This example checks for the readiness of the NVM module within the NVM programming.
|
extern |
This function erases the NVM sector-wise.
address | Address of the NVM sector to erase. Non-aligned address is accepted. Range is 0x11000000 + device NVM size. |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID | |
ERR_LOG_CODE_USER_PROTECT_NVM_WRITE_PROTECTED | |
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_NVM_INIT_MAPRAM_SECTOR | |
ERR_LOG_CODE_ACCESS_AB_MODE_ERROR |
Example
This example erases the data flash sector.
|
extern |
This function performs a page-by-page erase check for a full sector. Each page is checked against Hardread- Margin-Erased.
address | Address of the NVM sector to check. Non-aligned address is accepted, as the used sector range will be the sector where the address belongs. |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_USER_PROTECT_NVM_WRITE_PROTECTED | |
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID | |
ERR_LOG_CODE_NVM_PAGE_IS_MAPPED | |
ERR_LOG_CODE_NVM_VER_ERROR | |
ERR_LOG_CODE_ACCESS_AB_MODE_ERROR | |
ERR_LOG_CODE_NVM_ECC2_MAPRAM_ERROR |
Example
This example verifies the erased state of the data flash sector.
|
extern |
This function will run service algorithm on a mapped NVM sector.
*sa_result | Pointer where to store the result of the NVM SA run. |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID | |
ERR_LOG_CODE_USER_PROTECT_NVM_WRITE_PROTECTED | |
ERR_LOG_CODE_USER_NO_NVM_MAPPED_SECTOR |
Example
This example performs a NVM SA Operation.
|
extern |
This function programs the NVM. It operates on the user NVM, as well as on the user data NVM.
address | NVM address where to program the data. Range is 0x11000000 + device NVM size. |
*data | Pointer to the data where to read the programming data. Pointer must be within valid RAM range or an error code is returned. |
count | Amount of bytes to program. Range from 1-128 bytes. |
options | NVM programming options. |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_PARAM_INVALID | |
ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID | |
ERR_LOG_CODE_ADDRESS_RANGE_CROSSING_PAGE_BOUNDARY | |
ERR_LOG_CODE_MEM_READWRITE_PARAMS_INVALID | |
ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID | |
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_ECC2_MAPBLOCK_ERROR | |
ERR_LOG_CODE_NVM_ECC2_DATA_ERROR | |
ERR_LOG_CODE_NVM_ECC2_MAPRAM_ERROR | |
ERR_LOG_CODE_NVM_VER_ERROR | |
ERR_LOG_CODE_NVM_PROG_MAPRAM_INIT_FAIL | |
ERR_LOG_CODE_NVM_PROG_VERIFY_MAPRAM_INIT_FAIL |
Example
This example fills an array of 128 bytes and then it will be programmed to the first page.
|
extern |
This function programs the NVM. It operates on the user NVM, as well as on the user data NVM.
During the NVM operation the program execution branches to a given SRAM location (branch_address) and continues code execution from there.
address | NVM address where to program the data. Range is 0x11000000 + device NVM size. |
*data | Pointer to the data where to read the programming data. Pointer must be within valid RAM range or an error code is returned. |
count | Amount of bytes to program. Range from 1-128 bytes. |
options | NVM programming options. |
branch_address | Function callback address where to jump while waiting for the NVM module to finish the program operation (see user_callback_t) |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_PARAM_INVALID | |
ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID | |
ERR_LOG_CODE_ADDRESS_RANGE_CROSSING_PAGE_BOUNDARY | |
ERR_LOG_CODE_MEM_READWRITE_PARAMS_INVALID | |
ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID | |
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_ECC2_MAPBLOCK_ERROR | |
ERR_LOG_CODE_NVM_ECC2_DATA_ERROR | |
ERR_LOG_CODE_NVM_ECC2_MAPRAM_ERROR | |
ERR_LOG_CODE_NVM_VER_ERROR | |
ERR_LOG_CODE_NVM_PROG_MAPRAM_INIT_FAIL | |
ERR_LOG_CODE_NVM_PROG_VERIFY_MAPRAM_INIT_FAIL |
Example
This example fills an array of 128 bytes and then during the programming to the first page it branches to RAM_Branch_Function address.
|
extern |
This function programs the NVM faster than normal.
address | NVM address where to program the data. Range is 0x11000000 + device NVM size. |
*data | Pointer to the data where to read the programming data. Pointer must be within valid RAM range or an error code is returned. |
count | Amount of bytes to program. Range from 1-128 bytes. |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_PARAM_INVALID | |
ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID | |
ERR_LOG_CODE_ADDRESS_RANGE_CROSSING_PAGE_BOUNDARY | |
ERR_LOG_CODE_MEM_READWRITE_PARAMS_INVALID | |
ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID | |
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_ECC2_MAPBLOCK_ERROR | |
ERR_LOG_CODE_NVM_ECC2_MAPRAM_ERROR | |
ERR_LOG_CODE_NVM_VER_ERROR | |
ERR_LOG_CODE_NVM_PROG_MAPRAM_INIT_FAIL | |
ERR_LOG_CODE_NVM_FAST_PROG_NOT_ALLOWED |
Example
This example fills an array of 128 bytes and then it will be programmed to the first page faster than normal.
|
extern |
This function can be called to terminate a NVM fast write operation.
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_NVM_WRITE_FAST_WRONG_MODE | |
ERR_LOG_CODE_NVM_MAPRAM_MANUAL_SPARE_PAGE_FAILED |
Example
This example performs an abort of the Fast Write Operation.
|
extern |
This function can be called to retry a NVM fast write operation.
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_NVM_WRITE_FAST_WRONG_MODE | |
ERR_LOG_CODE_NVM_VER_ERROR | |
ERR_LOG_CODE_NVM_PROG_MAPRAM_INIT_FAIL | |
ERR_LOG_CODE_NVM_PROG_VERIFY_MAPRAM_INIT_FAIL |
Example
This example performs a retry of the Fast Write Operation.
|
extern |
This function performs a MBIST on the integrated SRAM.
start_address | RAM memory address where to start the MBIST test. |
end_address | RAM memory address till where to perform the MBIST test. |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_MBIST_RAM_RANGE_INVALID | |
ERR_LOG_CODE_MBIST_FAILED | |
ERR_LOG_CODE_MBIST_TIMEOUT |
Example
This example performs a MBIST over the first half of the RAM.
|
extern |
This function returns the V bandgap temperature hot or cold.
temp_select | Selects the temperature to read (see VBG_TEMP_SELECT_t) |
*temperature | Pointer where to store the temperature value read from the device configuration sector. |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID | |
ERR_LOG_CODE_USER_INVALID_VBG_TEMP_SELECT |
Example
This example reads the VBG Hot Temperature.