Infineon MOTIX™ MCU TLE985x Device Family SDK
Macros | Typedefs | Enumerations | Variables
bootrom.h File Reference

Go to the source code of this file.

Detailed Description

BootROM low level access library.

Version
V0.2.5
Date
28. Aug 2023
Note
This file violates [MISRA 2012 Rule 2.5, advisory], [MISRA 2012 Rule 8.7, advisory]

Include Graph

Include dependency graph for bootrom.h:

Include Graph

This graph shows which files directly or indirectly include this file:

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)
 

Enumerations

enum  BOOTROM_RETURN_CODE_t {
  ERR_LOG_SUCCESS = 0 , ERR_LOG_ERROR = -1 , ERR_LOG_CODE_NVM_SEGMENT_READ_PROTECTED = -3 , ERR_LOG_CODE_MEM_READWRITE_PARAMS_INVALID = -4 ,
  ERR_LOG_CODE_BSL_RECV_BYTES_MISMATCH = -5 , ERR_LOG_CODE_NVM_IS_READ_PROTECTED = -6 , ERR_LOG_CODE_NVM_ERASE_PARAMS_INVALID = -7 , ERR_LOG_CODE_INVALID_CUSTOMER_CONFIG_CBSL_SIZE = -8 ,
  ERR_LOG_CODE_CUSTOMER_CONFIG_CBSL_PROGRAMMED_OR_READ_ERR = -9 , ERR_LOG_CODE_NVM_CODE_PROGRAMMED = -10 , ERR_LOG_CODE_BSL_NVM_CALC_CHECKSUM_MISMATCH = -11 , ERR_LOG_CODE_FASTLIN_BAUDRATE_SET_FAIL = -12 ,
  ERR_LOG_CODE_MSG_VALIDITY_FAIL = -17 , ERR_LOG_CODE_NVM_WRITE_FAST_WRONG_MODE = -25 , ERR_LOG_CODE_NVM_WRITE_FAST_SEMAPHORE_RESERVED = -26 , ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID = -27 ,
  ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED = -28 , ERR_LOG_CODE_NVM_PAGE_IS_MAPPED = -30 , ERR_LOG_CODE_NVM_SPARE_PAGE_IS_NOT_MAPPED = -31 , ERR_LOG_CODE_ECC2READ_ERROR = -32 ,
  ERR_LOG_CODE_NVM_FAST_PROG_NOT_ALLOWED = -33 , ERR_LOG_CODE_NVM_VER_ERROR = -34 , ERR_LOG_CODE_NVM_PROG_MAPRAM_INIT_FAIL = -35 , ERR_LOG_CODE_NVM_PROG_VERIFY_MAPRAM_INIT_FAIL = -36 ,
  ERR_LOG_CODE_NVM_ECC2_MAPBLOCK_ERROR = -37 , ERR_LOG_CODE_NVM_MAPRAM_UNKNOWN_TYPE_USAGE = -38 , ERR_LOG_CODE_NVM_ECC2_MAPRAM_ERROR = -39 , ERR_LOG_CODE_NVM_PAGE_NOT_MAPPED = -40 ,
  ERR_LOG_CODE_NVM_INIT_MAPRAM_SECTOR = -41 , ERR_LOG_CODE_NVM_MAPRAM_MANUAL_SPARE_PAGE_FAILED = -42 , ERR_LOG_CODE_NVM_WRITE_FAST_REACH_MAX_RETRIES = -43 , ERR_LOG_CODE_ACCESS_AB_MODE_ERROR = -44 ,
  ERR_LOG_CODE_NVM_ECC2_DATA_ERROR = -45 , ERR_LOG_CODE_ADDRESS_RANGE_CROSSING_PAGE_BOUNDARY = -46 , ERR_LOG_CODE_100TP_WRITE_COUNT_EXCEEDED = -47 , ERR_LOG_CODE_100TP_PAGE_INVALID = -48 ,
  ERR_LOG_CODE_NVM_100TP_PAGE_CNT_ERROR = -49 , ERR_LOG_CODE_CS_PAGE_CHECKSUM = -50 , ERR_LOG_CODE_CS_PAGE_ECC2READ = -51 , ERR_LOG_CODE_MBIST_FAILED = -63 ,
  ERR_LOG_CODE_MBIST_TIMEOUT = -64 , ERR_LOG_CODE_USER_INVALID_NVM_PAGE_NUMBER = -65 , ERR_LOG_CODE_USER_INVALID_VBG_TEMP_SELECT = -66 , ERR_LOG_CODE_NAC_VALUE_INVALID = -67 ,
  ERR_LOG_CODE_MBIST_RAM_RANGE_INVALID = -68 , ERR_LOG_CODE_PARAM_LENGTH = -69 , ERR_LOG_CODE_USER_NO_NVM_MAPPED_SECTOR = -71 , ERR_LOG_CODE_USER_NVM_SEGMENT_INVALID = -72 ,
  ERR_LOG_CODE_SINGLE_ECC_EVENT_OCCURRED = -73 , ERR_LOG_CODE_DOUBLE_ECC_EVENT_OCCURRED = -74 , ERR_LOG_CODE_SINGLE_AND_DOUBLE_ECC_EVENT_OCCURRED = -75 , ERR_LOG_CODE_PARAM_INVALID = -76 ,
  ERR_LOG_CODE_USER_PROTECT_NVM_WRITE_PROTECTED = -77 , ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID = -78 , ERR_LOG_CODE_USER_NVM_SEGMENT_CONFIG_MISMATCH = -79 , ERR_LOG_CODE_NVM_IS_BUSY = -80 ,
  ERR_LOG_CODE_USER_PROTECT_PWD_INVALID = -81 , ERR_LOG_CODE_USER_PROTECT_PWD_EXISTS = -82 , ERR_LOG_CODE_NO_PASSWORD_EXISTS = -83 , ERR_LOG_CODE_USER_PROTECT_WRONG_PASSWORD = -84 ,
  ERR_LOG_CODE_NVM_CONFIG_SECTOR_WRITE_PROTECTED = -85 , ERR_LOG_CODE_SWITCH_KEY_INVALID = -86 , ERR_LOG_CODE_USERAPI_SWITCH_KEY_VALUE_OR_USAGE_INVALID = -87
}
 This enum defines the Error codes. More...
 
enum  NVM_PASSWORD_SEGMENT_t {
  NVM_PASSWORD_SEGMENT_BOOT = 0 , NVM_PASSWORD_SEGMENT_CODE = 1 , NVM_PASSWORD_SEGMENT_DATA = 2 , NVM_PASSWORD_SEGMENT_DATA_LINEAR ,
  NVM_PASSWORD_SEGMENT_LAST
}
 This enum defines the NVM protection password segment. More...
 
enum  VBG_TEMP_SELECT_t { VBG_TEMP_HOT , VBG_TEMP_COLD }
 This enum defines the VBG Temperature selection. More...
 

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...
 

Macro Definition Documentation

◆ addr_user_adc1_offset_calibration

#define addr_user_adc1_offset_calibration   (0x000000e3u)

◆ addr_user_cid_get

#define addr_user_cid_get   (0x000000a7u)

◆ addr_user_nac_get

#define addr_user_nac_get   (0x000000adu)

◆ addr_user_nac_set

#define addr_user_nac_set   (0x000000afu)

◆ addr_user_nad_get

#define addr_user_nad_get   (0x000000b1u)

◆ addr_user_nad_set

#define addr_user_nad_set   (0x000000b3u)

◆ addr_user_nvm_100tp_erase

#define addr_user_nvm_100tp_erase   (0x000000e1u)

◆ addr_user_nvm_100tp_read

#define addr_user_nvm_100tp_read   (0x000000b5u)

◆ addr_user_nvm_100tp_write

#define addr_user_nvm_100tp_write   (0x000000b7u)

◆ addr_user_nvm_clk_factor_set

#define addr_user_nvm_clk_factor_set   (0x000000cdu)

◆ addr_user_nvm_config_get

#define addr_user_nvm_config_get   (0x000000b9u)

◆ addr_user_nvm_ecc_check

#define addr_user_nvm_ecc_check   (0x000000abu)

◆ addr_user_nvm_ecc_events_get

#define addr_user_nvm_ecc_events_get   (0x000000a9u)

◆ addr_user_nvm_mapram_init

#define addr_user_nvm_mapram_init   (0x000000cbu)

◆ addr_user_nvm_mapram_recover

#define addr_user_nvm_mapram_recover   (0x000000d9u)

◆ addr_user_nvm_page_checksum_check

#define addr_user_nvm_page_checksum_check   (0x000000dfu)

◆ addr_user_nvm_page_erase

#define addr_user_nvm_page_erase   (0x000000bbu)

◆ addr_user_nvm_page_erase_branch

#define addr_user_nvm_page_erase_branch   (0x000000bdu)

◆ addr_user_nvm_page_erase_verify

#define addr_user_nvm_page_erase_verify   (0x000000d5u)

◆ addr_user_nvm_page_verify

#define addr_user_nvm_page_verify   (0x000000d3u)

◆ addr_user_nvm_password_set

#define addr_user_nvm_password_set   (0x000000e5u)

◆ addr_user_nvm_protect_clear

#define addr_user_nvm_protect_clear   (0x000000a1u)

◆ addr_user_nvm_protect_get

#define addr_user_nvm_protect_get   (0x000000a5u)

◆ addr_user_nvm_protect_set

#define addr_user_nvm_protect_set   (0x000000a3u)

◆ addr_user_nvm_ready_poll

#define addr_user_nvm_ready_poll   (0x000000bfu)

◆ addr_user_nvm_sector_erase

#define addr_user_nvm_sector_erase   (0x000000c1u)

◆ addr_user_nvm_sector_erase_verify

#define addr_user_nvm_sector_erase_verify   (0x000000d7u)

◆ addr_user_nvm_service_algorithm

#define addr_user_nvm_service_algorithm   (0x000000ddu)

◆ addr_user_nvm_write

#define addr_user_nvm_write   (0x000000c3u)

◆ addr_user_nvm_write_branch

#define addr_user_nvm_write_branch   (0x000000c5u)

◆ addr_user_nvm_write_fast

#define addr_user_nvm_write_fast   (0x000000e7u)

◆ addr_user_nvm_write_fast_abort

#define addr_user_nvm_write_fast_abort   (0x000000ebu)

◆ addr_user_nvm_write_fast_retry

#define addr_user_nvm_write_fast_retry   (0x000000e9u)

◆ addr_user_ram_mbist

#define addr_user_ram_mbist   (0x000000c7u)

◆ addr_user_vbg_temperature_get

#define addr_user_vbg_temperature_get   (0x000000cfu)

◆ addr_user_version_read

#define addr_user_version_read   (0x000000c9u)

◆ FlashPageSize

#define FlashPageSize   (128U)

A flash page contains 128 bytes.

◆ FlashSectorSize

#define FlashSectorSize   (4096U)

A flash sector contains 32 flash pages, 4096 bytes in total.

Typedef Documentation

◆ user_callback_t

typedef void(* user_callback_t) (void)

Enumeration Type Documentation

◆ BOOTROM_RETURN_CODE_t

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

◆ NVM_PASSWORD_SEGMENT_t

This enum defines the NVM protection password segment.

Enumerator
NVM_PASSWORD_SEGMENT_BOOT 

NVM password for customer segment, used for customer bootloader

NVM_PASSWORD_SEGMENT_CODE 

NVM password for customer code segment, which is not used by the customer bootloader

NVM_PASSWORD_SEGMENT_DATA 

NVM password for customer data mapped segment

NVM_PASSWORD_SEGMENT_DATA_LINEAR 

NVM password for customer data linear segment

NVM_PASSWORD_SEGMENT_LAST 

Can be ignored and should not be used

◆ VBG_TEMP_SELECT_t

This enum defines the VBG Temperature selection.

Enumerator
VBG_TEMP_HOT 

VBG Hot Temperature

VBG_TEMP_COLD 

VBG Cold Temperature

Variable Documentation

◆ user_adc1_offset_calibration

int32_t(*const user_adc1_offset_calibration) (void) ( void  )
extern

This function will perform ADC1 core calibration in software mode.

Note
It updates ADC1_OFFSETCALIB register if the calibration algorithm is executed successfully.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
ERR_LOG_SUCCESS
ERR_LOG_ERROR

Example

This example performs ADC1 core calibration in software mode.

void Example_Function(void)
{
{
// ADC1 core calibration Operation has been executed successfully
}
else
{
// Proper Calibration Value can not be found
}
(void)WDT1_Service();
}
INLINE void ADC1_Power_On(void)
Enables the ADC1 module.
Definition: adc1.h:6042
INLINE void ADC1_Software_Mode_Sel(void)
Selects ADC1 Software Mode, measurements are performed on user request.
Definition: adc1.h:6087
int32_t(*const user_adc1_offset_calibration)(void)
This function will perform ADC1 core calibration in software mode.
@ ERR_LOG_SUCCESS
Definition: bootrom.h:130
void WDT1_SOW_Service(uint32 NoOfSOW)
Triggers a short-window (~30ms) of the WDT1.
bool WDT1_Service(void)
Services the WDT1 in the open window.

◆ user_nac_get

int32_t(*const user_nac_get) (uint8_t *nac_value) ( uint8_t *  nac_value)
extern

This function reads out the NAC value that is currently configured in the non volatile device configuration memory.

Parameters
*nac_valuePointer where to store the BSL NAC value read from the device configuration sector.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
ERR_LOG_SUCCESS
ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID

Example

This example reads out the NAC value that is currently configured.

void Example_Function(void)
{
uint8 nac_val;
if (user_nac_get(&nac_val) == ERR_LOG_SUCCESS)
{
// NAC Value Read Operation has been executed successfully
}
else
{
// Provided pointer doesn't point to a valid RAM range
}
(void)WDT1_Service();
}
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 configu...
uint8_t uint8
8 bit unsigned value
Definition: types.h:153

◆ user_nac_set

int32_t(*const user_nac_set) (uint8_t nac) ( uint8_t  nac)
extern

This function configures the NAC value in the non volatile device configuration memory.

Note
It rejects with an error in case the NVM code segment is write protected or NAC value is out of valid range [0, 2-28, 255].
Parameters
nacNAC value to be stored in the device configuration memory.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
uint8 nac_val;
if (user_nac_set(nac_val) == ERR_LOG_SUCCESS)
{
// NAC Value Set Operation has been executed successfully
}
else
{
// NAC Value Set Operation returns a negative error code
}
(void)WDT1_Service();
}
int32_t(*const user_nac_set)(uint8_t nac)
This function configures the NAC value in the non volatile device configuration memory.

◆ user_nad_get

int32_t(*const user_nad_get) (uint8_t *nad_value) ( uint8_t *  nad_value)
extern

This function reads out the FASTLIN NAD value that is currently configured in the non volatile device configuration memory.

Parameters
*nad_valuePointer where to store the BSL nad value read from the device configuration sector.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
ERR_LOG_SUCCESS
ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID

Example

This example reads out the FASTLIN NAD value that is currently configured.

void Example_Function(void)
{
uint8 nad_val;
if (user_nad_get(&nad_val) == ERR_LOG_SUCCESS)
{
// FASTLIN NAD Value Read Operation has been executed successfully
}
else
{
// Provided pointer doesn't point to a valid RAM range
}
(void)WDT1_Service();
}
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...

◆ user_nad_set

int32_t(*const user_nad_set) (uint8_t nad) ( uint8_t  nad)
extern

This function configures the FASTLIN NAD value in the non volatile device configuration memory.

Note
It rejects with an error in case the NVM code segment is write protected.
Parameters
nadFASTLIN NAD value to be stored in the device configuration memory. Valid range is from 0x00-0xFF.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
uint8 nad_val;
if (user_nad_set(nad_val) == ERR_LOG_SUCCESS)
{
// FASTLIN NAD Value Set Operation has been executed successfully
}
else
{
// FASTLIN NAD Value Set Operation returns a negative error code
}
(void)WDT1_Service();
}
int32_t(*const user_nad_set)(uint8_t nad)
This function configures the FASTLIN NAD value in the non volatile device configuration memory.

◆ user_nvm_100tp_erase

int32_t(*const user_nvm_100tp_erase) (uint32_t page_num) ( uint32_t  page_num)
extern

This function erases all data in one of the 100TP NVM pages preserving the write counter.

Note
The erase operation is not executed in case the NVM code segment write protection is set and a dedicated protection error is returned.
Parameters
page_num100TP page number to erase. Valid range: 0 to 7.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
{
// 100TP Erase Operation has been executed successfully
}
{
// Page is erased OK but ECC2 error was detected while reading write counter
}
else
{
// 100TP Erase Operation has been rejected
}
(void)WDT1_Service();
}
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.
@ ERR_LOG_CODE_NVM_100TP_PAGE_CNT_ERROR
Definition: bootrom.h:166

◆ user_nvm_100tp_read

int32_t(*const user_nvm_100tp_read) (uint32_t page_num, uint32_t offset, void *data, uint32_t count) ( uint32_t  page_num,
uint32_t  offset,
void *  data,
uint32_t  count 
)
extern

This function reads data from the customer accessible configuration pages (100TP).

Note
Invalid parameters (page number out of range, offset plus count larger than page boundary, count is 0) returns an error, and no read operation is performed.
Parameters
page_numPage number where to read from. Valid range: 0 to 7.
offsetByte offset inside the selected page address, where to start reading from.
*dataData pointer where to store the data read. Pointer plus valid count must be within valid RAM range or an error code is returned.
countAmount of data bytes to read. If count is zero, there is no operation performed and an error code is returned.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
uint32 data;
uint8 i;
for ( i = 0; i < FlashPageSize; i++)
{
{
// 100TP Read Operation has been executed successfully
}
else
{
// 100TP Read Operation returns a negative error code
}
}
(void)WDT1_Service();
}
#define FlashPageSize
A flash page contains 128 bytes.
Definition: bootrom.h:76
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).
uint32_t uint32
32 bit unsigned value
Definition: types.h:155

◆ user_nvm_100tp_write

int32_t(*const user_nvm_100tp_write) (uint32_t page_num, uint32_t offset, const void *data, uint32_t count) ( uint32_t  page_num,
uint32_t  offset,
const void *  data,
uint32_t  count 
)
extern

This function writes data to the customer accessible configuration pages (100TP).

Note
Any invalid parameters (page number out of range, offset plus count larger than page boundary, count is 0) returns an error, and no write operation is performed.
Parameters
page_numPage number where to write to. Valid range: 0 to 7.
offsetByte offset inside the selected page address, where to start writing. Maximum is 126 bytes.
*dataData pointer where to read the data to write. Pointer plus valid count must be within valid RAM range or an error code is returned.
countAmount 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.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
uint32 data;
uint8 i;
for ( i = 0; i < FlashPageSize; i++)
{
{
// 100TP Write Operation has been executed successfully
}
else
{
// 100TP Write Operation returns a negative error code
}
}
(void)WDT1_Service();
}
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).

◆ user_nvm_clk_factor_set

void(*const user_nvm_clk_factor_set) (uint8_t clk_factor) ( uint8_t  clk_factor)
extern

This function sets the SCU_SYSCON0.NVMCLKFAC divider.

Parameters
clk_factorvalue is shifted and set to the corresponding bit fields of the register.

Example

This example sets the clock divider to div 2, fsys/2.

void Example_Function(void)
{
(void)WDT1_Service();
}
void(*const user_nvm_clk_factor_set)(uint8_t clk_factor)
This function sets the SCU_SYSCON0.NVMCLKFAC divider.

◆ user_nvm_ecc_check

int32_t(*const user_nvm_ecc_check) (void) ( void  )
extern

This function checks for single and double ECC checking over the entire NVM on all NVM linear and NVM non-linear sectors.

Note
Any existing ECC errors are cleared before the read starts.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
{
// No single or double ECC event have occurred
}
else
{
// Single/Double ECC Check Operation returns a negative error code
}
(void)WDT1_Service();
}
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...

◆ user_nvm_ecc_events_get

int32_t(*const user_nvm_ecc_events_get) (uint32_t *pNVM_Addr) ( uint32_t *  pNVM_Addr)
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.

Parameters
*pNVM_AddrPointer where to store the ECC2 failing NVM address. This pointer stays untouched in case no NVM ECC2 errors was detected.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
uint32 fail_addr;
{
// No single or double ECC event have occurred
}
else
{
// Single/Double ECC Check Operation returns a negative error code
}
(void)WDT1_Service();
}
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.

◆ user_nvm_mapram_init

int32_t(*const user_nvm_mapram_init) (void) ( void  )
extern

This function triggers NVM FSM mapRAM update sequence from mapped sector.

Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
{
// MAPRAM Init Operation has been executed successfully
}
else
{
// MAPRAM Init Operation returns a negative error code
}
(void)WDT1_Service();
}
int32_t(*const user_nvm_mapram_init)(void)
This function triggers NVM FSM mapRAM update sequence from mapped sector.

◆ user_nvm_mapram_recover

int32_t(*const user_nvm_mapram_recover) (void) ( void  )
extern

This function will manually do mapRAM initialization by extracting mapping info on good mapped pages.

Note
It can be called if NVM SA fails repairing a corrupted mapped data sector.
Returns
Positive number (including 0 = ERR_LOG_SUCCESS) or other BOOTROM Negative Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
uint32 sa_res;
{
{
// MAPRAM Recover Operation has been executed successfully
}
else
{
// MAPRAM Recover Operation is rejected
}
}
(void)WDT1_Service();
}
int32_t(*const user_nvm_mapram_recover)(void)
This function will manually do mapRAM initialization by extracting mapping info on good mapped pages.
int32_t(*const user_nvm_service_algorithm)(uint32_t *sa_result)
This function will run service algorithm on a mapped NVM sector.
@ ERR_LOG_CODE_USER_NO_NVM_MAPPED_SECTOR
Definition: bootrom.h:176

◆ user_nvm_page_checksum_check

int32_t(*const user_nvm_page_checksum_check) (uint32_t page_no) ( uint32_t  page_no)
extern

This function will perform a checksum check on the specified NVM page.

Note
It rejects with an error in case the NVM page is out of range.
Parameters
page_noPage to check, which is one of the 100TP pages (0..7) or NVM CS page containing BSL (startup) settings (8).
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
{
// checksum check Operation has been executed successfully
}
else
{
// checksum check Operation returns a negative error code
}
(void)WDT1_Service();
}
int32_t(*const user_nvm_page_checksum_check)(uint32_t page_no)
This function will perform a checksum check on the specified NVM page.

◆ user_nvm_page_erase

int32_t(*const user_nvm_page_erase) (uint32_t address) ( uint32_t  address)
extern

This function erases a given NVM page (address).

Note
In case of an unsused (new) page in non-linear sector, the function does nothing and returns success.
In case of erasing a page in linear sector, the function should always perform the erase.
Parameters
addressAddress of the NVM page to erase. Non-aligned address is accepted. Range is 0x11000000 + device NVM size.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
{
// NVM Page Erase Operation has been executed successfully
}
else
{
// NVM Page Erase Operation returns a negative error code
}
(void)WDT1_Service();
}
int32_t(*const user_nvm_page_erase)(uint32_t address)
This function erases a given NVM page (address).
#define DataFlashStart
Definition: tle_variants.h:212

◆ user_nvm_page_erase_branch

int32_t(*const user_nvm_page_erase_branch) (uint32_t address, user_callback_t branch_address) ( uint32_t  address,
user_callback_t  branch_address 
)
extern

This function erases a given NVM page (address) and branches to an address (branch_address) for code execution during the NVM operation.

Note
It rejects with an error in case the accessed NVM page is write protected.
Parameters
addressAddress of the NVM page to erase. Non-aligned address is accepted. Range is 0x11000000 + device NVM size.
branch_addressFunction callback address where to jump while waiting for the NVM module to finish the erase operation (see user_callback_t)
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
{
// NVM Page Erase/Branch Operation has been executed successfully
}
else
{
// NVM Page Erase/Branch Operation returns a negative error code
}
(void)WDT1_Service();
}
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 ...

◆ user_nvm_page_erase_verify

int32_t(*const user_nvm_page_erase_verify) (uint32_t address) ( uint32_t  address)
extern

This function verifies with HardRead Erased margin on a page to check that all bits are erased.

Note
It rejects with an error in case the accessed NVM page belongs to a write protected region.
Parameters
addressAddress of the NVM page to check. Non-aligned address is accepted. Range is 0x11000000 + device NVM size.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
{
// NVM Page Erase Verify Operation has been executed successfully
}
else
{
// NVM Page Erase Verify Operation returns a negative error code
}
(void)WDT1_Service();
}
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.

◆ user_nvm_page_verify

int32_t(*const user_nvm_page_verify) (uint32_t address) ( uint32_t  address)
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.

Note
It rejects with an error in case the accessed NVM page belongs to a write protected region.
Parameters
addressAddress of the NVM page to check. Non-aligned address is accepted. Range is 0x11000000 + device NVM size.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
{
// NVM Page Verify Operation has been executed successfully
}
else
{
// NVM Page Verify Operation returns a negative error code
}
(void)WDT1_Service();
}
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.

◆ user_nvm_password_set

int32_t(*const user_nvm_password_set) (uint32_t password, NVM_PASSWORD_SEGMENT_t segment) ( uint32_t  password,
NVM_PASSWORD_SEGMENT_t  segment 
)
extern

This function sets password for NVM region individually.

Note
The password parameter consists of a 30-bit password (bit 0...29) and two additional protection bits (bit 30: write protection + bit 31: read protection).
A valid password must be different from 0x3FFFFFFF and 0x00000000 (bit 0...29).
Parameters
passwordProtection password to apply on the given segment
segmentSegment which should be password protected (see NVM_PASSWORD_SEGMENT_t)
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
{
// Password Set Operation has been executed successfully, Password could be successfully applied
}
else
{
// Password Set Operation returns a negative error code
}
(void)WDT1_Service();
}
@ NVM_PASSWORD_SEGMENT_DATA
Definition: bootrom.h:206
int32_t(*const user_nvm_password_set)(uint32_t password, NVM_PASSWORD_SEGMENT_t segment)
This function sets password for NVM region individually.

◆ user_nvm_protect_clear

int32_t(*const user_nvm_protect_clear) (uint32_t password, NVM_PASSWORD_SEGMENT_t segment) ( uint32_t  password,
NVM_PASSWORD_SEGMENT_t  segment 
)
extern

This function clears write protection for any NVM region individually, except CBSL.

Note
A valid password must be provided in case any valid NVM protection password is installed for this region.
Set bit 30 of the password parameter to disable write protection.
The bits (0...29) of the password parameter shall match the password installed.
Bit 31 (read protection) is ignored/not supported.
Parameters
passwordProtection password to apply on the given segment
segmentSegment which should be password protected (see NVM_PASSWORD_SEGMENT_t)
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
{
// Write Protection Clear Operation has been executed successfully, Password could be successfully applied
}
else
{
// Write Protection Clear Operation returns a negative error code
}
(void)WDT1_Service();
}
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.

◆ user_nvm_protect_get

uint32_t(*const user_nvm_protect_get) (NVM_PASSWORD_SEGMENT_t segment) ( NVM_PASSWORD_SEGMENT_t  segment)
extern

This function checks for the hardware current applied NVM protection status.

Parameters
segmentWhich NVM segment to retrieve the current password protection status (see NVM_PASSWORD_SEGMENT_t)
Return values
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.

void Example_Function(void)
{
{
// Protection disabled
}
{
// Read protection enabled
}
{
// Write protection enabled
}
{
// Read and write protection enabled
}
else
{
// Segment not recognized
}
(void)WDT1_Service();
}
uint32_t(*const user_nvm_protect_get)(NVM_PASSWORD_SEGMENT_t segment)
This function checks for the hardware current applied NVM protection status.

◆ user_nvm_protect_set

int32_t(*const user_nvm_protect_set) (uint32_t password, NVM_PASSWORD_SEGMENT_t segment) ( uint32_t  password,
NVM_PASSWORD_SEGMENT_t  segment 
)
extern

This function sets write protection for any NVM region individually, except CBSL.

Note
A valid password must be provided in case any valid NVM protection password is installed for this region.
Set bit 30 of the password parameter to disable write protection.
The bits (0...29) of the password parameter shall match the password installed.
Bit 31 (read protection) is ignored/not supported.
Parameters
passwordProtection password to apply on the given segment
segmentSegment which should be password protected (see NVM_PASSWORD_SEGMENT_t)
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
{
// Write Protection Set Operation has been executed successfully, Password could be successfully applied.
}
else
{
// Write Protection Set Operation returns a negative error code
}
(void)WDT1_Service();
}
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.

◆ user_nvm_ready_poll

bool(*const user_nvm_ready_poll) (void) ( void  )
extern

This function checks for the readiness of the NVM module.

Note
It is called within the NVM programming or erase branch callback operation.
Return values
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.

void Example_Function(void)
{
uint8 page_data[128];
uint8 i;
for ( i = 0; i < FlashPageSize; i++)
{
page_data[i] = i;
}
user_nvm_write_branch(DataFlashStart, &page_data, FlashPageSize, 0, &RAM_Branch_Function);
if (user_nvm_ready_poll() == true)
{
// NVM operation is already finished
}
else
{
// NVM operation is not finished
}
(void)WDT1_Service();
}
bool(*const user_nvm_ready_poll)(void)
This function checks for the readiness of the NVM module.
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.

◆ user_nvm_sector_erase

int32_t(*const user_nvm_sector_erase) (uint32_t address) ( uint32_t  address)
extern

This function erases the NVM sector-wise.

Note
It rejects with an error in case the NVM region the address belongs to is write protected.
Parameters
addressAddress of the NVM sector to erase. Non-aligned address is accepted. Range is 0x11000000 + device NVM size.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
{
// NVM Sector Erase Operation has been executed successfully
}
else
{
// NVM Sector Erase Operation returns a negative error code
}
(void)WDT1_Service();
}
int32_t(*const user_nvm_sector_erase)(uint32_t address)
This function erases the NVM sector-wise.

◆ user_nvm_sector_erase_verify

int32_t(*const user_nvm_sector_erase_verify) (uint32_t address) ( uint32_t  address)
extern

This function performs a page-by-page erase check for a full sector. Each page is checked against Hardread- Margin-Erased.

Note
It rejects with an error in case the accessed NVM page belongs to a write protected region.
Parameters
addressAddress of the NVM sector to check. Non-aligned address is accepted, as the used sector range will be the sector where the address belongs.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
{
// NVM Page Erase Verify Operation has been executed successfully
}
else
{
// NVM Page Erase Verify Operation returns a negative error code
}
(void)WDT1_Service();
}
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 Har...

◆ user_nvm_service_algorithm

int32_t(*const user_nvm_service_algorithm) (uint32_t *sa_result) ( uint32_t *  sa_result)
extern

This function will run service algorithm on a mapped NVM sector.

Note
Only if a mappd sector is configured, NVM SA will be executed.
Parameters
*sa_resultPointer where to store the result of the NVM SA run.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
uint32 sa_res;
{
// NVM SA Operation has been executed successfully
}
else
{
// NVM SA Operation returns a negative error code
}
(void)WDT1_Service();
}

◆ user_nvm_write

int32_t(*const user_nvm_write) (uint32_t address, const void *data, uint32_t count, uint32_t options) ( uint32_t  address,
const void *  data,
uint32_t  count,
uint32_t  options 
)
extern

This function programs the NVM. It operates on the user NVM, as well as on the user data NVM.

Note
It shall write a number of bytes (count) from the source (data) to the NVM location (address) with the programming options (options).
Parameters
addressNVM address where to program the data. Range is 0x11000000 + device NVM size.
*dataPointer to the data where to read the programming data. Pointer must be within valid RAM range or an error code is returned.
countAmount of bytes to program. Range from 1-128 bytes.
optionsNVM programming options.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
uint8 page_data[128];
uint8 i;
for ( i = 0; i < FlashPageSize; i++)
{
page_data[i] = i;
}
{
// NVM Write Operation has been executed successfully
}
else
{
// NVM Write Operation returns a negative error code
}
(void)WDT1_Service();
}
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.

◆ user_nvm_write_branch

int32_t(*const user_nvm_write_branch) (uint32_t address, const void *data, uint32_t count, uint32_t options, user_callback_t branch_address) ( uint32_t  address,
const void *  data,
uint32_t  count,
uint32_t  options,
user_callback_t  branch_address 
)
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.

Note
It shall write a number of bytes (count) from the source (data) to the NVM location (address) with the programming options (options).
Parameters
addressNVM address where to program the data. Range is 0x11000000 + device NVM size.
*dataPointer to the data where to read the programming data. Pointer must be within valid RAM range or an error code is returned.
countAmount of bytes to program. Range from 1-128 bytes.
optionsNVM programming options.
branch_addressFunction callback address where to jump while waiting for the NVM module to finish the program operation (see user_callback_t)
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
uint8 page_data[128];
uint8 i;
for ( i = 0; i < FlashPageSize; i++)
{
page_data[i] = i;
}
if ( user_nvm_write_branch(DataFlashStart, &page_data, FlashPageSize, 0, &RAM_Branch_Function) == ERR_LOG_SUCCESS)
{
// Fast Write Branch Operation has been executed successfully
}
else
{
// Fast Write Branch Operation returns a negative error code
}
(void)WDT1_Service();
}

◆ user_nvm_write_fast

int32_t(*const user_nvm_write_fast) (uint32_t address, const void *data, uint32_t count) ( uint32_t  address,
const void *  data,
uint32_t  count 
)
extern

This function programs the NVM faster than normal.

Note
It shall write a number of bytes (count) from the source (data) to the NVM location (address).
Parameters
addressNVM address where to program the data. Range is 0x11000000 + device NVM size.
*dataPointer to the data where to read the programming data. Pointer must be within valid RAM range or an error code is returned.
countAmount of bytes to program. Range from 1-128 bytes.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
uint8 page_data[128];
uint8 i;
for ( i = 0; i < FlashPageSize; i++)
{
page_data[i] = i;
}
{
// Fast Write Operation has been executed successfully
}
{
// A retry can be issued by calling user_nvm_write_fast_retry
}
else
{
// Fast Write Operation has been rejected
}
(void)WDT1_Service();
}
@ ERR_LOG_CODE_NVM_VER_ERROR
Definition: bootrom.h:151
int32_t(*const user_nvm_write_fast)(uint32_t address, const void *data, uint32_t count)
This function programs the NVM faster than normal.

◆ user_nvm_write_fast_abort

int32_t(*const user_nvm_write_fast_abort) (void) ( void  )
extern

This function can be called to terminate a NVM fast write operation.

Note
It can only be called when the previous fast write operation has standard verify error ERR_LOG_CODE_NVM_VER_ERROR.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
uint8 page_data[128];
uint8 i;
for ( i = 0; i < FlashPageSize; i++)
{
page_data[i] = i;
}
{
{
// Fast Write Abort Operation has been executed successfully
}
{
// Fast Write is not started or the previous operation already pass
}
else
{
// Fast Write Abort Operation is rejected
}
}
(void)WDT1_Service();
}
int32_t(*const user_nvm_write_fast_abort)(void)
This function can be called to terminate a NVM fast write operation.
@ ERR_LOG_CODE_NVM_WRITE_FAST_WRONG_MODE
Definition: bootrom.h:143

◆ user_nvm_write_fast_retry

int32_t(*const user_nvm_write_fast_retry) (void) ( void  )
extern

This function can be called to retry a NVM fast write operation.

Note
It can only be called when the previous fast write operation has standard verify error ERR_LOG_CODE_NVM_VER_ERROR.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
uint8 page_data[128];
uint8 i;
for ( i = 0; i < FlashPageSize; i++)
{
page_data[i] = i;
}
{
{
// Fast Write Operation has been executed successfully
}
{
// Fast Write is not started or the previous operation already pass
}
else
{
// Fast Write Operation is rejected
}
}
(void)WDT1_Service();
}
int32_t(*const user_nvm_write_fast_retry)(void)
This function can be called to retry a NVM fast write operation.

◆ user_ram_mbist

int32_t(*const user_ram_mbist) (uint32_t start_address, uint32_t end_address) ( uint32_t  start_address,
uint32_t  end_address 
)
extern

This function performs a MBIST on the integrated SRAM.

Note
The function rejects the call in case the parameter exceeds the RAM address range.
Parameters
start_addressRAM memory address where to start the MBIST test.
end_addressRAM memory address till where to perform the MBIST test.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
{
// MBIST Operation has been executed successfully
}
else
{
// MBIST Operation returns a negative error code
}
(void)WDT1_Service();
}
int32_t(*const user_ram_mbist)(uint32_t start_address, uint32_t end_address)
This function performs a MBIST on the integrated SRAM.
#define RAMSize
Definition: tle_variants.h:160

◆ user_vbg_temperature_get

int32_t(*const user_vbg_temperature_get) (VBG_TEMP_SELECT_t temp_select, uint32_t *temperature) ( VBG_TEMP_SELECT_t  temp_select,
uint32_t *  temperature 
)
extern

This function returns the V bandgap temperature hot or cold.

Note
The customer can do temperature compensation in software based on these values, as the VBG is the reference for the ADC.
Parameters
temp_selectSelects the temperature to read (see VBG_TEMP_SELECT_t)
*temperaturePointer where to store the temperature value read from the device configuration sector.
Returns
BOOTROM Return Codes (see BOOTROM_RETURN_CODE_t)
Return values
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.

void Example_Function(void)
{
uint32 temp_val;
{
// VBG Temperature Read Operation has been executed successfully
}
else
{
// VBG Temperature Read Operation returns a negative error code
}
(void)WDT1_Service();
}
@ VBG_TEMP_HOT
Definition: bootrom.h:221
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.