76 #define FlashPageSize (128U)
80 #define FlashSectorSize (4096U)
85 #define addr_user_nvm_protect_clear (0x000000a1u)
86 #define addr_user_nvm_protect_set (0x000000a3u)
87 #define addr_user_nvm_protect_get (0x000000a5u)
88 #define addr_user_cid_get (0x000000a7u)
89 #define addr_user_nvm_ecc_events_get (0x000000a9u)
90 #define addr_user_nvm_ecc_check (0x000000abu)
91 #define addr_user_nac_get (0x000000adu)
92 #define addr_user_nac_set (0x000000afu)
93 #define addr_user_nad_get (0x000000b1u)
94 #define addr_user_nad_set (0x000000b3u)
95 #define addr_user_nvm_100tp_read (0x000000b5u)
96 #define addr_user_nvm_100tp_write (0x000000b7u)
97 #define addr_user_nvm_config_get (0x000000b9u)
98 #define addr_user_nvm_page_erase (0x000000bbu)
99 #define addr_user_nvm_page_erase_branch (0x000000bdu)
100 #define addr_user_nvm_ready_poll (0x000000bfu)
101 #define addr_user_nvm_sector_erase (0x000000c1u)
102 #define addr_user_nvm_write (0x000000c3u)
103 #define addr_user_nvm_write_branch (0x000000c5u)
104 #define addr_user_ram_mbist (0x000000c7u)
105 #define addr_user_version_read (0x000000c9u)
106 #define addr_user_nvm_mapram_init (0x000000cbu)
107 #define addr_user_nvm_clk_factor_set (0x000000cdu)
108 #define addr_user_vbg_temperature_get (0x000000cfu)
109 #define addr_user_nvm_page_verify (0x000000d3u)
110 #define addr_user_nvm_page_erase_verify (0x000000d5u)
111 #define addr_user_nvm_sector_erase_verify (0x000000d7u)
112 #define addr_user_nvm_mapram_recover (0x000000d9u)
113 #define addr_user_nvm_service_algorithm (0x000000ddu)
114 #define addr_user_nvm_page_checksum_check (0x000000dfu)
115 #define addr_user_nvm_100tp_erase (0x000000e1u)
116 #define addr_user_adc1_offset_calibration (0x000000e3u)
117 #define addr_user_nvm_password_set (0x000000e5u)
118 #define addr_user_nvm_write_fast (0x000000e7u)
119 #define addr_user_nvm_write_fast_retry (0x000000e9u)
120 #define addr_user_nvm_write_fast_abort (0x000000ebu)
232 #ifdef UNIT_TESTING_LV2
246 extern int32_t
user_nvm_100tp_read(uint32_t page_num, uint32_t offset,
void *data, uint32_t count);
247 extern int32_t
user_nvm_100tp_write(uint32_t page_num, uint32_t offset,
const void *data, uint32_t count);
257 extern int32_t
user_nvm_write(uint32_t address,
const void *data, uint32_t count, uint32_t options);
260 extern int32_t
user_ram_mbist(uint32_t start_address, uint32_t end_address);
639 extern int32_t (*
const user_nac_get)(uint8_t *nac_value);
711 extern int32_t (*
const user_nad_get)(uint8_t *nad_value);
792 extern int32_t (*
const user_nvm_100tp_read)(uint32_t page_num, uint32_t offset,
void *data, uint32_t count);
841 extern int32_t (*
const user_nvm_100tp_write)(uint32_t page_num, uint32_t offset,
const void *data, uint32_t count);
1259 extern int32_t (*
const user_nvm_write)(uint32_t address,
const void *data, uint32_t count, uint32_t options);
1318 extern int32_t (*
const user_nvm_write_fast)(uint32_t address,
const void *data, uint32_t count);
1412 extern int32_t (*
const user_ram_mbist)(uint32_t start_address, uint32_t end_address);
bool(*const user_nvm_ready_poll)(void)
This function checks for the readiness of the NVM module.
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.
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...
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.
int32_t(*const user_nvm_page_erase)(uint32_t address)
This function erases a given NVM page (address).
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...
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...
VBG_TEMP_SELECT_t
This enum defines the VBG Temperature selection.
Definition: bootrom.h:220
@ VBG_TEMP_HOT
Definition: bootrom.h:221
@ VBG_TEMP_COLD
Definition: bootrom.h:222
int32_t(*const user_nvm_mapram_init)(void)
This function triggers NVM FSM mapRAM update sequence from mapped sector.
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).
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 ...
int32_t(*const user_adc1_offset_calibration)(void)
This function will perform ADC1 core calibration in software mode.
void(*const user_nvm_clk_factor_set)(uint8_t clk_factor)
This function sets the SCU_SYSCON0.NVMCLKFAC divider.
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.
int32_t(*const user_nac_set)(uint8_t nac)
This function configures the NAC value in the non volatile device configuration memory.
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...
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_page_checksum_check)(uint32_t page_no)
This function will perform a checksum check on the specified NVM page.
int32_t(*const user_nvm_write_fast_abort)(void)
This function can be called to terminate a NVM fast write operation.
NVM_PASSWORD_SEGMENT_t
This enum defines the NVM protection password segment.
Definition: bootrom.h:203
@ NVM_PASSWORD_SEGMENT_LAST
Definition: bootrom.h:208
@ NVM_PASSWORD_SEGMENT_DATA_LINEAR
Definition: bootrom.h:207
@ NVM_PASSWORD_SEGMENT_DATA
Definition: bootrom.h:206
@ NVM_PASSWORD_SEGMENT_BOOT
Definition: bootrom.h:204
@ NVM_PASSWORD_SEGMENT_CODE
Definition: bootrom.h:205
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.
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.
void(* user_callback_t)(void)
Definition: bootrom.h:211
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.
int32_t(*const user_nvm_write_fast_retry)(void)
This function can be called to retry a NVM fast write operation.
int32_t(*const user_nvm_service_algorithm)(uint32_t *sa_result)
This function will run service algorithm on a mapped NVM sector.
uint32_t(*const user_nvm_protect_get)(NVM_PASSWORD_SEGMENT_t segment)
This function checks for the hardware current applied NVM protection status.
BOOTROM_RETURN_CODE_t
This enum defines the Error codes.
Definition: bootrom.h:129
@ ERR_LOG_CODE_CS_PAGE_CHECKSUM
Definition: bootrom.h:167
@ ERR_LOG_CODE_NVM_PAGE_NOT_MAPPED
Definition: bootrom.h:157
@ ERR_LOG_CODE_NAC_VALUE_INVALID
Definition: bootrom.h:173
@ ERR_LOG_CODE_NVM_ERASE_PARAMS_INVALID
Definition: bootrom.h:136
@ ERR_LOG_CODE_NVM_WRITE_FAST_SEMAPHORE_RESERVED
Definition: bootrom.h:144
@ ERR_LOG_CODE_USER_INVALID_NVM_PAGE_NUMBER
Definition: bootrom.h:171
@ ERR_LOG_CODE_CUSTOMER_CONFIG_CBSL_PROGRAMMED_OR_READ_ERR
Definition: bootrom.h:138
@ ERR_LOG_CODE_NVM_WRITE_FAST_REACH_MAX_RETRIES
Definition: bootrom.h:160
@ ERR_LOG_CODE_NVM_INIT_MAPRAM_SECTOR
Definition: bootrom.h:158
@ ERR_LOG_CODE_NVM_MAPRAM_UNKNOWN_TYPE_USAGE
Definition: bootrom.h:155
@ ERR_LOG_CODE_NVM_PROG_VERIFY_MAPRAM_INIT_FAIL
Definition: bootrom.h:153
@ ERR_LOG_CODE_NVM_ECC2_MAPBLOCK_ERROR
Definition: bootrom.h:154
@ ERR_LOG_CODE_USER_INVALID_VBG_TEMP_SELECT
Definition: bootrom.h:172
@ ERR_LOG_CODE_NVM_100TP_PAGE_CNT_ERROR
Definition: bootrom.h:166
@ ERR_LOG_CODE_PARAM_INVALID
Definition: bootrom.h:181
@ ERR_LOG_CODE_INVALID_CUSTOMER_CONFIG_CBSL_SIZE
Definition: bootrom.h:137
@ ERR_LOG_CODE_NVM_PAGE_IS_MAPPED
Definition: bootrom.h:147
@ ERR_LOG_CODE_ECC2READ_ERROR
Definition: bootrom.h:149
@ ERR_LOG_CODE_NVM_FAST_PROG_NOT_ALLOWED
Definition: bootrom.h:150
@ ERR_LOG_CODE_NVM_MAPRAM_MANUAL_SPARE_PAGE_FAILED
Definition: bootrom.h:159
@ ERR_LOG_CODE_USER_PROTECT_NVM_WRITE_PROTECTED
Definition: bootrom.h:182
@ ERR_LOG_CODE_USER_NVM_SEGMENT_INVALID
Definition: bootrom.h:177
@ ERR_LOG_CODE_NVM_VER_ERROR
Definition: bootrom.h:151
@ ERR_LOG_CODE_NVM_ECC2_MAPRAM_ERROR
Definition: bootrom.h:156
@ ERR_LOG_CODE_NVM_SPARE_PAGE_IS_NOT_MAPPED
Definition: bootrom.h:148
@ ERR_LOG_CODE_NVM_IS_READ_PROTECTED
Definition: bootrom.h:135
@ ERR_LOG_CODE_DOUBLE_ECC_EVENT_OCCURRED
Definition: bootrom.h:179
@ ERR_LOG_CODE_NVM_WRITE_FAST_WRONG_MODE
Definition: bootrom.h:143
@ ERR_LOG_CODE_USER_PROTECT_PWD_INVALID
Definition: bootrom.h:186
@ ERR_LOG_CODE_USER_PROTECT_WRONG_PASSWORD
Definition: bootrom.h:189
@ ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID
Definition: bootrom.h:145
@ ERR_LOG_CODE_SWITCH_KEY_INVALID
Definition: bootrom.h:191
@ ERR_LOG_CODE_MEM_READWRITE_PARAMS_INVALID
Definition: bootrom.h:133
@ ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID
Definition: bootrom.h:183
@ ERR_LOG_CODE_MSG_VALIDITY_FAIL
Definition: bootrom.h:142
@ ERR_LOG_CODE_BSL_NVM_CALC_CHECKSUM_MISMATCH
Definition: bootrom.h:140
@ ERR_LOG_SUCCESS
Definition: bootrom.h:130
@ ERR_LOG_CODE_USER_PROTECT_PWD_EXISTS
Definition: bootrom.h:187
@ ERR_LOG_CODE_CS_PAGE_ECC2READ
Definition: bootrom.h:168
@ ERR_LOG_CODE_MBIST_TIMEOUT
Definition: bootrom.h:170
@ ERR_LOG_CODE_USERAPI_SWITCH_KEY_VALUE_OR_USAGE_INVALID
Definition: bootrom.h:192
@ ERR_LOG_CODE_ADDRESS_RANGE_CROSSING_PAGE_BOUNDARY
Definition: bootrom.h:163
@ ERR_LOG_CODE_SINGLE_ECC_EVENT_OCCURRED
Definition: bootrom.h:178
@ ERR_LOG_CODE_PARAM_LENGTH
Definition: bootrom.h:175
@ ERR_LOG_CODE_ACCESS_AB_MODE_ERROR
Definition: bootrom.h:161
@ ERR_LOG_CODE_FASTLIN_BAUDRATE_SET_FAIL
Definition: bootrom.h:141
@ ERR_LOG_CODE_USER_NO_NVM_MAPPED_SECTOR
Definition: bootrom.h:176
@ ERR_LOG_CODE_USER_NVM_SEGMENT_CONFIG_MISMATCH
Definition: bootrom.h:184
@ ERR_LOG_CODE_MBIST_RAM_RANGE_INVALID
Definition: bootrom.h:174
@ ERR_LOG_CODE_NVM_SEGMENT_READ_PROTECTED
Definition: bootrom.h:132
@ ERR_LOG_CODE_NVM_PROG_MAPRAM_INIT_FAIL
Definition: bootrom.h:152
@ ERR_LOG_CODE_NVM_CODE_PROGRAMMED
Definition: bootrom.h:139
@ ERR_LOG_CODE_NVM_SEMAPHORE_RESERVED
Definition: bootrom.h:146
@ ERR_LOG_CODE_NO_PASSWORD_EXISTS
Definition: bootrom.h:188
@ ERR_LOG_CODE_NVM_CONFIG_SECTOR_WRITE_PROTECTED
Definition: bootrom.h:190
@ ERR_LOG_CODE_MBIST_FAILED
Definition: bootrom.h:169
@ ERR_LOG_CODE_NVM_ECC2_DATA_ERROR
Definition: bootrom.h:162
@ ERR_LOG_ERROR
Definition: bootrom.h:131
@ ERR_LOG_CODE_SINGLE_AND_DOUBLE_ECC_EVENT_OCCURRED
Definition: bootrom.h:180
@ ERR_LOG_CODE_100TP_PAGE_INVALID
Definition: bootrom.h:165
@ ERR_LOG_CODE_100TP_WRITE_COUNT_EXCEEDED
Definition: bootrom.h:164
@ ERR_LOG_CODE_NVM_IS_BUSY
Definition: bootrom.h:185
@ ERR_LOG_CODE_BSL_RECV_BYTES_MISMATCH
Definition: bootrom.h:134
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).
int32_t(*const user_nvm_sector_erase)(uint32_t address)
This function erases the NVM sector-wise.
int32_t(*const user_nvm_password_set)(uint32_t password, NVM_PASSWORD_SEGMENT_t segment)
This function sets password for NVM region individually.
int32_t(*const user_nad_set)(uint8_t nad)
This function configures the FASTLIN NAD value in the non volatile device configuration memory.
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.
int32_t(*const user_ram_mbist)(uint32_t start_address, uint32_t end_address)
This function performs a MBIST on the integrated SRAM.
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.
int32_t(*const user_nvm_write_fast)(uint32_t address, const void *data, uint32_t count)
This function programs the NVM faster than normal.
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.
SFR low level access library.
CMSIS register HeaderFile.
General type declarations.
#define bool
Boolean definitions.
Definition: types.h:108