![]() |
Infineon MOTIX™ MCU TLE988x/9x Device Family SDK
|
Data Structures | |
struct | user_100tp_read_t |
struct | user_100tp_write_t |
struct | user_key_t |
Key data structure aligned with CFS page (ignored reserved bytes) More... | |
struct | user_crypto_inp_buf_t |
struct | user_crypto_out_buf_t |
struct | user_crypto_io_buf_t |
struct | user_crypto_cmac_t |
struct | user_crypto_cbc_t |
struct | user_key_write_params_t |
struct | user_key_write_t |
struct | user_key_erase_params_t |
struct | user_key_erase_t |
struct | user_nvm_page_write_t |
Macros | |
#define | addr_user_nvm_isr_handler (0xc1u) |
#define | addr_user_cid_get (0xc5u) |
#define | addr_user_ram_mbist (0xc9u) |
#define | addr_user_nvm_udata_temp_protect_clear (0xd1u) |
#define | addr_user_nvm_ucode_temp_protect_clear (0xd5u) |
#define | addr_user_nvm_udata_temp_protect_set (0xd9u) |
#define | addr_user_nvm_ucode_temp_protect_set (0xddu) |
#define | addr_user_nvm_temp_protect_get (0xe1u) |
#define | addr_user_nvm_ecc_addr_get (0xe5u) |
#define | addr_user_nvm_ecc_check (0xe9u) |
#define | addr_user_nvm_100tp_read (0xedu) |
#define | addr_user_nvm_100tp_write (0xf1u) |
#define | addr_user_nvm_100tp_erase (0xf5u) |
#define | addr_user_nvm_config_get (0xf9u) |
#define | addr_user_nvm_page_erase (0xfdu) |
#define | addr_user_nvm_sector_erase (0x101u) |
#define | addr_user_nvm_page_write (0x105u) |
#define | addr_user_nvm_mapram_init (0x109u) |
#define | addr_user_nvm_mapram_recover (0x10du) |
#define | addr_user_nvm_service_algorithm (0x111u) |
#define | addr_user_crypto_aes_cmac_generate_start (0x115u) |
#define | addr_user_crypto_aes_cmac_generate_update (0x119u) |
#define | addr_user_crypto_aes_cmac_generate_finish (0x11du) |
#define | addr_user_crypto_aes_cmac_verify_start (0x121u) |
#define | addr_user_crypto_aes_cmac_verify_update (0x125u) |
#define | addr_user_crypto_aes_cmac_verify_finish (0x129u) |
#define | addr_user_crypto_aes_start (0x12du) |
#define | addr_user_crypto_aes_update (0x131u) |
#define | addr_user_crypto_aes_finish (0x135u) |
#define | addr_user_crypto_key_write (0x139u) |
#define | addr_user_crypto_key_erase (0x13du) |
#define | addr_user_crypto_key_verify (0x141u) |
#define | addr_user_nvm_reg_write (0x145u) |
#define | addr_user_nvm_reg_read (0x149u) |
#define | addr_user_secure_download_start (0x14du) |
#define | addr_user_secure_download_update (0x151u) |
#define | addr_user_secure_download_finish (0x155u) |
#define | addr_user_cache_operation (0x159u) |
#define | addr_user_ubsl_size_restore (0x15du) |
#define | addr_user_nvm_perm_protect_set (0x161u) |
#define | addr_user_nvm_ubsl_temp_protect_clear (0x201u) |
#define | addr_user_nvm_ubsl_temp_protect_set (0x205u) |
#define | addr_user_secure_dualboot (0x209u) |
#define | USER_KEY_SIZE_128 (0x10u) |
128 bits key length More... | |
#define | USER_KEY_SIZE_256 (0x20u) |
256 bits key length More... | |
#define | USER_KEY_SIZE_MAX (USER_KEY_SIZE_256) |
Maximum length for a key value to read/store. More... | |
#define | USER_KEY_PARAM_SIZE (0x40u) |
encrypted key parameter size 64 bytes More... | |
#define | USER_CMAC_SIGNATURE_SIZE (0x10u) |
cmac signature size 16 bytes More... | |
#define | USER_KEY_WRITE_BUFFER_SIZE (0x30u) |
Size of key_write decryption buffer. More... | |
#define | USER_KEY_MAX_ID (12u) |
Maximum User key slot ID. More... | |
#define | USER_KEY_MIN_ID (1u) |
Minimum User key slot ID. More... | |
#define | IFX_KEY_ID (0u) |
IFX key ID. More... | |
#define | user_cid_get ( (int32_t(*)(uint32_t *)) addr_user_cid_get ) |
This user API function gets the customer identification number. More... | |
#define | user_ram_mbist ( (int32_t(*)(uint32_t, uint32_t)) addr_user_ram_mbist ) |
This user API function performs a MBIST on the specified SRAM range. Start address shall be smaller than end address. More... | |
#define | user_nvm_udata_temp_protect_clear ( (int32_t(*)(uint32_t)) addr_user_nvm_udata_temp_protect_clear ) |
This user API function temporarily clears the write protection of the UDATA segment. More... | |
#define | user_nvm_ucode_temp_protect_clear ( (int32_t(*)(uint32_t)) addr_user_nvm_ucode_temp_protect_clear ) |
This user API function temporarily clears the write protection of the UCODE segment. More... | |
#define | user_nvm_udata_temp_protect_set ( (int32_t(*)(uint32_t)) addr_user_nvm_udata_temp_protect_set ) |
This user API function temporarily sets the write protection of the UDATA segment. More... | |
#define | user_nvm_ucode_temp_protect_set ( (int32_t(*)(uint32_t)) addr_user_nvm_ucode_temp_protect_set ) |
This user API function temporarily sets the write protection of the UCODE segment. More... | |
#define | user_nvm_temp_protect_get ( (uint32_t(*)(user_nvm_segment_t)) addr_user_nvm_temp_protect_get ) |
This user API function gets the current protection status of a specified NVM segment. More... | |
#define | user_nvm_perm_protect_set ( (int32_t(*)(uint32_t)) addr_user_nvm_perm_protect_set ) |
This user API function sets permanent protection on NVM segments. More... | |
#define | user_nvm_ecc_addr_get ( (int32_t(*)(uint32_t, uint32_t *)) addr_user_nvm_ecc_addr_get ) |
This user API function returns the address of a double ECC event that has occurred in the target flash. More... | |
#define | user_nvm_ecc_check ( (int32_t(*)(uint32_t)) addr_user_nvm_ecc_check ) |
This user API function checks for single and double ECC errors on the target flash. More... | |
#define | user_nvm_100tp_read ( (int32_t(*)(uint32_t, user_100tp_read_t *)) addr_user_nvm_100tp_read ) |
This user API function reads data from specified 100TP page. More... | |
#define | user_nvm_100tp_write ( (int32_t(*)(uint32_t, user_100tp_write_t *)) addr_user_nvm_100tp_write ) |
This user API function writes data to a specified 100TP page. More... | |
#define | user_nvm_100tp_erase ( (int32_t(*)(uint32_t)) addr_user_nvm_100tp_erase ) |
This user API function erases a data field of the specified 100TP page. The write counter field is preserved. More... | |
#define | user_nvm_config_get ( (int32_t(*)(uint32_t *, uint32_t *, uint32_t *)) addr_user_nvm_config_get ) |
This user API function returns the size of each NVM segment. More... | |
#define | user_nvm_page_erase ( (int32_t(*)(uint32_t, uint32_t)) addr_user_nvm_page_erase ) |
This user API function erases a specified flash page. More... | |
#define | user_nvm_sector_erase ( (int32_t(*)(uint32_t, uint32_t)) addr_user_nvm_sector_erase ) |
This user API function erases a specified flash sector. More... | |
#define | user_nvm_page_write ( (int32_t(*)(uint32_t, user_nvm_page_write_t *)) addr_user_nvm_page_write ) |
This user API function writes a number of bytes from the source to the specified flash address page_address. More... | |
#define | user_nvm_write user_nvm_page_write |
#define | user_nvm_mapram_init ( (int32_t(*)(uint32_t)) addr_user_nvm_mapram_init ) |
This user API function triggers the map RAM initialization on the target mapped sector. More... | |
#define | user_nvm_mapram_recover ( (int32_t(*)(uint32_t)) addr_user_nvm_mapram_recover ) |
This user API function attempts to reconstruct map RAM by extracting mapping information from good pages. More... | |
#define | user_nvm_service_algorithm ( (int32_t(*)(uint32_t)) addr_user_nvm_service_algorithm ) |
This user API function runs the service algorithm on a mapped sector, attempting to repair faulty pages or double mappings. More... | |
#define | user_nvm_reg_write ( (int32_t(*)(uint32_t, uint32_t )) addr_user_nvm_reg_write ) |
This user API function performs a write access to NVM SFRs. More... | |
#define | user_nvm_reg_read ( (int32_t(*)(uint32_t, uint32_t *)) addr_user_nvm_reg_read ) |
This user API function performs a read access to NVM SFRs. More... | |
#define | user_secure_download_start ( (int32_t(*)(uint8_t, uint8_t, uint8_t *)) addr_user_secure_download_start ) |
This user API function initiates the secure container and starts the secure download process. More... | |
#define | user_secure_download_update ( (int32_t(*)(uint32_t, uint8_t *)) addr_user_secure_download_update ) |
This user API function continues the secure download process. More... | |
#define | user_secure_download_finish ( (int32_t(*)(void)) addr_user_secure_download_finish ) |
This user API function finalizes the secure download process. More... | |
#define | user_cache_operation ( (int32_t(*)(user_cache_op_t, uint32_t)) addr_user_cache_operation ) |
This user API function provides an alternative to writing to cache registers in addition to direct register access. More... | |
#define | user_ubsl_size_restore ( (void(*)(void)) addr_user_ubsl_size_restore ) |
This user API function is used to restore the UBSL size in case of a Stop mode exit w/o reset. More... | |
#define | user_crypto_aes_cmac_generate_start ( (int32_t(*)(uint32_t)) addr_user_crypto_aes_cmac_generate_start ) |
This user API function initializes a CMAC generation. More... | |
#define | user_crypto_aes_cmac_generate_update ( (int32_t(*)(user_crypto_inp_buf_t *)) addr_user_crypto_aes_cmac_generate_update) |
This user API function updates the ongoing CMAC generation. More... | |
#define | user_crypto_aes_cmac_generate_finish ( (int32_t(*)(user_crypto_io_buf_t *, bool)) addr_user_crypto_aes_cmac_generate_finish) |
This user API function finalizes the ongoing CMAC generation. More... | |
#define | user_crypto_aes_cmac_verify_start ( (int32_t(*)(uint32_t)) addr_user_crypto_aes_cmac_verify_start ) |
This user API function initializes a CMAC verification operation. More... | |
#define | user_crypto_aes_cmac_verify_update ( (int32_t(*)(user_crypto_inp_buf_t *)) addr_user_crypto_aes_cmac_verify_update ) |
This user API function updates the ongoing CMAC verification. More... | |
#define | user_crypto_aes_cmac_verify_finish ( (int32_t(*)(user_crypto_cmac_t *)) addr_user_crypto_aes_cmac_verify_finish ) |
This user API function finalizes the ongoing CMAC verification. More... | |
#define | user_crypto_aes_start ( (int32_t(*)(user_crypto_fid_t, uint32_t, user_crypto_cbc_t *)) addr_user_crypto_aes_start ) |
This user API function initializes an AES operation. More... | |
#define | user_crypto_aes_update ( (int32_t(*)(user_crypto_io_buf_t *)) addr_user_crypto_aes_update ) |
This user API function updates the ongoing AES operation. More... | |
#define | user_crypto_aes_finish ( (int32_t(*)(user_crypto_io_buf_t *)) addr_user_crypto_aes_finish ) |
This user API function finalizes the ongoing AES operation. More... | |
#define | user_crypto_key_write ( (int32_t(*)(user_key_write_t *)) addr_user_crypto_key_write ) |
This user API function writes a cryptographic key to the target key slot. More... | |
#define | user_crypto_key_erase ( (int32_t(*)(user_key_erase_t *)) addr_user_crypto_key_erase ) |
This user API function erases a cryptographic key. More... | |
#define | user_crypto_key_verify ( (int32_t(*)(uint8_t, bool)) addr_user_crypto_key_verify ) |
This user API function verifies an existing cryptographic key. An additional key repair operation can be enabled by setting do_repair. More... | |
#define | user_nvm_ubsl_temp_protect_clear ( (int32_t(*)(uint32_t)) addr_user_nvm_ubsl_temp_protect_clear ) |
This user API function temporarily clears the write protection of the UBSL segment. More... | |
#define | user_nvm_ubsl_temp_protect_set ( (int32_t(*)(uint32_t)) addr_user_nvm_ubsl_temp_protect_set ) |
This user API function temporarily sets the write protection of the UBSL segment. More... | |
#define | user_secure_dualboot ( (int32_t(*)(uint32_t)) addr_user_secure_dualboot ) |
This user API function configures and enables the secondary UBSL image. More... | |
Typedefs | |
typedef struct user_100tp_read_t | user_100tp_read_t |
typedef struct user_100tp_write_t | user_100tp_write_t |
typedef struct user_key_t | user_key_t |
Key data structure aligned with CFS page (ignored reserved bytes) More... | |
typedef enum user_crypto_fid_t | user_crypto_fid_t |
typedef struct user_crypto_inp_buf_t | user_crypto_inp_buf_t |
typedef struct user_crypto_out_buf_t | user_crypto_out_buf_t |
typedef struct user_crypto_io_buf_t | user_crypto_io_buf_t |
typedef struct user_crypto_cmac_t | user_crypto_cmac_t |
typedef struct user_crypto_cbc_t | user_crypto_cbc_t |
typedef struct user_key_write_params_t | user_key_write_params_t |
typedef struct user_key_write_t | user_key_write_t |
typedef struct user_key_erase_params_t | user_key_erase_params_t |
typedef struct user_key_erase_t | user_key_erase_t |
typedef struct user_nvm_page_write_t | user_nvm_page_write_t |
typedef enum user_cache_op_t | user_cache_op_t |
typedef enum user_nvm_segment_t | user_nvm_segment_t |
Enumerations | |
enum | user_crypto_fid_t { CRYPTO_ECB_ENCRYPT = 0 , CRYPTO_ECB_DECRYPT = 1 , CRYPTO_CBC_ENCRYPT = 2 , CRYPTO_CBC_DECRYPT = 3 } |
enum | user_cache_op_t { CACHE_OP_AC = 0 , CACHE_OP_SC = 1 , CACHE_OP_BC = 2 , CACHE_OP_BT = 3 , CACHE_OP_BL = 4 , CACHE_OP_BU = 5 , CACHE_OP_EN = 6 , CACHE_OP_DIS = 7 } |
enum | user_nvm_segment_t { NVM_PASSWORD_SEGMENT_BOOT = 0 , NVM_PASSWORD_SEGMENT_CODE = 1 , NVM_PASSWORD_SEGMENT_DATA = 2 , NVM_PASSWORD_SEGMENT_TOTAL = 3 } |
#define addr_user_cache_operation (0x159u) |
#define addr_user_cid_get (0xc5u) |
#define addr_user_crypto_aes_cmac_generate_finish (0x11du) |
#define addr_user_crypto_aes_cmac_generate_start (0x115u) |
#define addr_user_crypto_aes_cmac_generate_update (0x119u) |
#define addr_user_crypto_aes_cmac_verify_finish (0x129u) |
#define addr_user_crypto_aes_cmac_verify_start (0x121u) |
#define addr_user_crypto_aes_cmac_verify_update (0x125u) |
#define addr_user_crypto_aes_finish (0x135u) |
#define addr_user_crypto_aes_start (0x12du) |
#define addr_user_crypto_aes_update (0x131u) |
#define addr_user_crypto_key_erase (0x13du) |
#define addr_user_crypto_key_verify (0x141u) |
#define addr_user_crypto_key_write (0x139u) |
#define addr_user_nvm_100tp_erase (0xf5u) |
#define addr_user_nvm_100tp_read (0xedu) |
#define addr_user_nvm_100tp_write (0xf1u) |
#define addr_user_nvm_config_get (0xf9u) |
#define addr_user_nvm_ecc_addr_get (0xe5u) |
#define addr_user_nvm_ecc_check (0xe9u) |
#define addr_user_nvm_isr_handler (0xc1u) |
#define addr_user_nvm_mapram_init (0x109u) |
#define addr_user_nvm_mapram_recover (0x10du) |
#define addr_user_nvm_page_erase (0xfdu) |
#define addr_user_nvm_page_write (0x105u) |
#define addr_user_nvm_perm_protect_set (0x161u) |
#define addr_user_nvm_reg_read (0x149u) |
#define addr_user_nvm_reg_write (0x145u) |
#define addr_user_nvm_sector_erase (0x101u) |
#define addr_user_nvm_service_algorithm (0x111u) |
#define addr_user_nvm_temp_protect_get (0xe1u) |
#define addr_user_nvm_ubsl_temp_protect_clear (0x201u) |
#define addr_user_nvm_ubsl_temp_protect_set (0x205u) |
#define addr_user_nvm_ucode_temp_protect_clear (0xd5u) |
#define addr_user_nvm_ucode_temp_protect_set (0xddu) |
#define addr_user_nvm_udata_temp_protect_clear (0xd1u) |
#define addr_user_nvm_udata_temp_protect_set (0xd9u) |
#define addr_user_ram_mbist (0xc9u) |
#define addr_user_secure_download_finish (0x155u) |
#define addr_user_secure_download_start (0x14du) |
#define addr_user_secure_download_update (0x151u) |
#define addr_user_secure_dualboot (0x209u) |
#define addr_user_ubsl_size_restore (0x15du) |
#define IFX_KEY_ID (0u) |
IFX key ID.
#define user_cache_operation ( (int32_t(*)(user_cache_op_t, uint32_t)) addr_user_cache_operation ) |
This user API function provides an alternative to writing to cache registers in addition to direct register access.
op | The code for the cache operation to perform. For more information, refer to user_cache_op_t. |
address | The memory address, namely the FLASH1 access. |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_PARAM_INVALID |
#define user_cid_get ( (int32_t(*)(uint32_t *)) addr_user_cid_get ) |
This user API function gets the customer identification number.
customer_id | Pointer where to store the customer identification number (CID) read from the device configuration sector. The address indicated by the pointer must be located in RAM. |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID |
#define USER_CMAC_SIGNATURE_SIZE (0x10u) |
cmac signature size 16 bytes
#define user_crypto_aes_cmac_generate_finish ( (int32_t(*)(user_crypto_io_buf_t *, bool)) addr_user_crypto_aes_cmac_generate_finish) |
This user API function finalizes the ongoing CMAC generation.
It concludes the entire CMAC generation operation and clears the cryptographic context.
buf | Buffer for crypto operation. For more information, refer to user_crypto_io_buf_t. |
truncation_allowed | Whether the function may output a partial MAC. |
#define user_crypto_aes_cmac_generate_start ( (int32_t(*)(uint32_t)) addr_user_crypto_aes_cmac_generate_start ) |
This user API function initializes a CMAC generation.
key_id | key ID used for CMAC generation. Key ID range is 1 to 12. |
#define user_crypto_aes_cmac_generate_update ( (int32_t(*)(user_crypto_inp_buf_t *)) addr_user_crypto_aes_cmac_generate_update) |
This user API function updates the ongoing CMAC generation.
Call user_crypto_aes_cmac_generate_start routine before the first update operation. The function can be called multiple times.
buf | Buffer for crypto operation. For more information, refer to user_crypto_inp_buf_t. |
#define user_crypto_aes_cmac_verify_finish ( (int32_t(*)(user_crypto_cmac_t *)) addr_user_crypto_aes_cmac_verify_finish ) |
This user API function finalizes the ongoing CMAC verification.
The function concludes the entire CMAC verification operation and clears the cryptographic context.
mac | Buffer for crypto operation. For more information, refer to user_crypto_cmac_t. |
#define user_crypto_aes_cmac_verify_start ( (int32_t(*)(uint32_t)) addr_user_crypto_aes_cmac_verify_start ) |
This user API function initializes a CMAC verification operation.
key_id | key ID used for CMAC verification operation. Key ID range is 1 to 12. |
#define user_crypto_aes_cmac_verify_update ( (int32_t(*)(user_crypto_inp_buf_t *)) addr_user_crypto_aes_cmac_verify_update ) |
This user API function updates the ongoing CMAC verification.
Call user_crypto_aes_cmac_verify_start routine before the first update operation. The function can be called multiple times.
buf | Buffer for crypto operation. For more information, refer to user_crypto_inp_buf_t. |
#define user_crypto_aes_finish ( (int32_t(*)(user_crypto_io_buf_t *)) addr_user_crypto_aes_finish ) |
This user API function finalizes the ongoing AES operation.
The function concludes the entire AES operation and clears the cryptographic context.
buf | Buffer for crypto operation. For more information, refer to user_crypto_io_buf_t. |
#define user_crypto_aes_start ( (int32_t(*)(user_crypto_fid_t, uint32_t, user_crypto_cbc_t *)) addr_user_crypto_aes_start ) |
This user API function initializes an AES operation.
fid | The ID of the desired operation. Refer to user_crypto_fid_t. |
key_id | The key ID used for AES operation. Key ID range is 1 to 12. |
cbc_ctx | Initial vector for the CBC encryption operation. For other operations (CBC decryption or ECB operation), set this to NULL. |
#define user_crypto_aes_update ( (int32_t(*)(user_crypto_io_buf_t *)) addr_user_crypto_aes_update ) |
This user API function updates the ongoing AES operation.
Call user_crypto_aes_start routine before the first update operation. The function can be called multiple times.
buf | Buffer for crypto operation. For more information, refer to user_crypto_io_buf_t. |
#define user_crypto_key_erase ( (int32_t(*)(user_key_erase_t *)) addr_user_crypto_key_erase ) |
This user API function erases a cryptographic key.
key_erase_params | Key erase parameters. For more information, refer to user_key_erase_t. |
#define user_crypto_key_verify ( (int32_t(*)(uint8_t, bool)) addr_user_crypto_key_verify ) |
This user API function verifies an existing cryptographic key. An additional key repair operation can be enabled by setting do_repair.
key_id | ID of the key to verify. Key ID range is 1 to 12. |
do_repair | The repair option.
|
#define user_crypto_key_write ( (int32_t(*)(user_key_write_t *)) addr_user_crypto_key_write ) |
This user API function writes a cryptographic key to the target key slot.
key_write_params | Key write parameters. For more information, refer to user_key_write_t. |
#define USER_KEY_MAX_ID (12u) |
Maximum User key slot ID.
#define USER_KEY_MIN_ID (1u) |
Minimum User key slot ID.
#define USER_KEY_PARAM_SIZE (0x40u) |
encrypted key parameter size 64 bytes
#define USER_KEY_SIZE_128 (0x10u) |
128 bits key length
#define USER_KEY_SIZE_256 (0x20u) |
256 bits key length
#define USER_KEY_SIZE_MAX (USER_KEY_SIZE_256) |
Maximum length for a key value to read/store.
#define USER_KEY_WRITE_BUFFER_SIZE (0x30u) |
Size of key_write decryption buffer.
#define user_nvm_100tp_erase ( (int32_t(*)(uint32_t)) addr_user_nvm_100tp_erase ) |
This user API function erases a data field of the specified 100TP page. The write counter field is preserved.
The function should be called if the 100TP page is corrupted. Upon successful execution, the page is initialized with an invalid checksum.
npage | The index of the 100TP page to erase. Valid range: 0 to 7. |
#define user_nvm_100tp_read ( (int32_t(*)(uint32_t, user_100tp_read_t *)) addr_user_nvm_100tp_read ) |
This user API function reads data from specified 100TP page.
This function can read a maximum of 128 bytes (including the counter field and checksum field).
npage | The index of the page from which to read. Valid range: 0 to 7. |
params | 100tp read parameters. For further information, refer to user_100tp_read_t. |
#define user_nvm_100tp_write ( (int32_t(*)(uint32_t, user_100tp_write_t *)) addr_user_nvm_100tp_write ) |
This user API function writes data to a specified 100TP page.
The function can write up to 124 bytes in a data field each time. The function supports maximum 100 times write operation. The function performs an implicit update of the page checksum.
npage | The index of the page to which to write. Valid range: 0 to 7. |
params | 100tp write parameters. For further information, refer to user_100tp_write_t. |
#define user_nvm_config_get ( (int32_t(*)(uint32_t *, uint32_t *, uint32_t *)) addr_user_nvm_config_get ) |
This user API function returns the size of each NVM segment.
ubsl_nvm_size | Pointer to where to store the retrieved NVM UBSL segment size. |
code_nvm_size | Pointer to where to store the retrieved NVM UCODE segment size. |
data_nvm_size | Pointer to where to store the retrieved NVM UDATA segment size. |
ERR_LOG_SUCCESS | |
ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID |
#define user_nvm_ecc_addr_get ( (int32_t(*)(uint32_t, uint32_t *)) addr_user_nvm_ecc_addr_get ) |
This user API function returns the address of a double ECC event that has occurred in the target flash.
[in] | flash | Target flash NVM_FLASH_GROUP. |
[out] | pNVM_Addr | Pointing to ECC2 failure address. |
The value of pNVM_Addr can be one of below patterns:
ERR_LOG_SUCCESS | No ECC2 event or event address has been obtained successfully. |
ERR_LOG_CODE_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_USER_POINTER_RAM_RANGE_INVALID | |
ERR_LOG_CODE_PARAM_INVALID |
#define user_nvm_ecc_check ( (int32_t(*)(uint32_t)) addr_user_nvm_ecc_check ) |
This user API function checks for single and double ECC errors on the target flash.
Any existing ECC errors are cleared before the check starts. Upon exit, the function clears the current ECC status.
flash | Target flash NVM_FLASH_GROUP. |
ERR_LOG_SUCCESS | no single or double ECC events have occurred. |
ERR_LOG_CODE_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_ECC1READ_ERROR | |
ERR_LOG_CODE_ECC2READ_ERROR | |
ERR_LOG_CODE_PARAM_INVALID |
#define user_nvm_mapram_init ( (int32_t(*)(uint32_t)) addr_user_nvm_mapram_init ) |
This user API function triggers the map RAM initialization on the target mapped sector.
sector_address | Sector address to perform operation. |
#define user_nvm_mapram_recover ( (int32_t(*)(uint32_t)) addr_user_nvm_mapram_recover ) |
This user API function attempts to reconstruct map RAM by extracting mapping information from good pages.
It can be called if the NVM Service Algorithm (SA) fails to repair a corrupted data map sector. Requests to initialize the map RAM for an unavailable sector or for a linearly mapped sector are ignored. Pages that are mapped two or more times are counted as faulty pages.
sector_address | Address of the sector from which to recover mapping information. |
Non-Negative | successful execution, indicating the amount of good mapped pages that were found. |
ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID | |
ERR_LOG_CODE_NVM_ECC2_MAPRAM_ERROR | |
ERR_LOG_CODE_SEMAPHORE_RESERVED |
#define user_nvm_page_erase ( (int32_t(*)(uint32_t, uint32_t)) addr_user_nvm_page_erase ) |
This user API function erases a specified flash page.
When asked to erase an unused (new) page in a mapped sector, the function does nothing and returns success. When asked to erase a page in a linear sector, the function always performs the erase.
page_address | Address of the NVM page to erase. Non-aligned addresses are accepted. |
options | Page erase options. Supported options:
|
ERR_LOG_SUCCESS | |
#NVM_OP_STS_FLASH_0_BUSY | RWW operation on FLASH0 is triggered successfully. FLASH0 will be busy until the background RWW operation is complete. |
#NVM_OP_STS_FLASH_1_BUSY | RWW operation on FLASH1 is triggered successfully. FLASH1 will be busy until the background RWW operation is complete. |
ERR_LOG_CODE_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_SEGMENT_PROTECTED | |
ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID | |
ERR_LOG_CODE_ACCESS_AB_MODE_ERROR | |
ERR_LOG_CODE_NVM_ECC2_MAPRAM_ERROR |
#define user_nvm_page_write ( (int32_t(*)(uint32_t, user_nvm_page_write_t *)) addr_user_nvm_page_write ) |
This user API function writes a number of bytes from the source to the specified flash address page_address.
page_address | The address of the NVM page to which to write the data. |
params | NVM write parameters. For further information, refer to user_nvm_page_write_t. Supported params->options:
|
ERR_LOG_SUCCESS | |
#NVM_OP_STS_FLASH_0_BUSY | RWW operation on FLASH0 is triggered successfully. FLASH0 will be busy until the background RWW operation is complete. |
#NVM_OP_STS_FLASH_1_BUSY | RWW operation on FLASH1 is triggered successfully. FLASH1 will be busy until the background RWW is operation complete. |
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_ADDR_RANGE_INVALID | |
ERR_LOG_CODE_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_ACCESS_AB_MODE_ERROR | |
ERR_LOG_CODE_NVM_SPARE_PAGE_NOT_AVAILABLE | |
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_MAPRAM_INIT_FAIL | |
ERR_LOG_CODE_VERIFY_AND_MAPRAM_INIT_FAIL |
#define user_nvm_perm_protect_set ( (int32_t(*)(uint32_t)) addr_user_nvm_perm_protect_set ) |
This user API function sets permanent protection on NVM segments.
passphrase | An encoding of the target segment and the erase flag. Refer to the supported passphrase. |
#define user_nvm_reg_read ( (int32_t(*)(uint32_t, uint32_t *)) addr_user_nvm_reg_read ) |
This user API function performs a read access to NVM SFRs.
sfr_address | NVM SFR address to read from. |
value | Pointer to a word from which to read the SFR value. |
#define user_nvm_reg_write ( (int32_t(*)(uint32_t, uint32_t )) addr_user_nvm_reg_write ) |
This user API function performs a write access to NVM SFRs.
sfr_address | NVM SFR address to which to write. |
value | Value to write into the specified SFR. |
#define user_nvm_sector_erase ( (int32_t(*)(uint32_t, uint32_t)) addr_user_nvm_sector_erase ) |
This user API function erases a specified flash sector.
For a mapped sector, upon successful sector erase, the map RAM is initialized and a new spare page is selected.
sector_address | Address of the NVM sector to erase. Non-aligned addresses are accepted. |
options | Sector erase options. Supported options:
|
ERR_LOG_SUCCESS | |
#NVM_OP_STS_FLASH_0_BUSY | RWW operation on FLASH0 is triggered successfully. FLASH0 will be busy until the background RWW operation is complete. |
#NVM_OP_STS_FLASH_1_BUSY | RWW operation on FLASH1 is triggered successfully. FLASH1 will be busy until the background RWW operation is complete. |
ERR_LOG_CODE_MEM_ADDR_RANGE_INVALID | |
ERR_LOG_CODE_SEGMENT_PROTECTED | |
ERR_LOG_CODE_SEMAPHORE_RESERVED | |
ERR_LOG_CODE_MAPRAM_INIT_FAIL | |
ERR_LOG_CODE_ACCESS_AB_MODE_ERROR |
#define user_nvm_service_algorithm ( (int32_t(*)(uint32_t)) addr_user_nvm_service_algorithm ) |
This user API function runs the service algorithm on a mapped sector, attempting to repair faulty pages or double mappings.
sector_address | Address of the sector on which to run the service algorithm (SA). |
#define user_nvm_temp_protect_get ( (uint32_t(*)(user_nvm_segment_t)) addr_user_nvm_temp_protect_get ) |
This user API function gets the current protection status of a specified NVM segment.
segment | The NVM segment for which to report the current protection status. For more information, refer to user_nvm_segment_t. |
#NVM_RET_NOT_PROTECTED | Target segment is not protected. |
#NVM_RET_PROTECTED | Target segment is protected. |
#define user_nvm_ubsl_temp_protect_clear ( (int32_t(*)(uint32_t)) addr_user_nvm_ubsl_temp_protect_clear ) |
This user API function temporarily clears the write protection of the UBSL segment.
passphrase | The passphrase must be #NVM_SEG_PROT_UBSL_NO_ERASE. |
#define user_nvm_ubsl_temp_protect_set ( (int32_t(*)(uint32_t)) addr_user_nvm_ubsl_temp_protect_set ) |
This user API function temporarily sets the write protection of the UBSL segment.
passphrase | The passphrase must be #NVM_SEG_PROT_UBSL_NO_ERASE. |
#define user_nvm_ucode_temp_protect_clear ( (int32_t(*)(uint32_t)) addr_user_nvm_ucode_temp_protect_clear ) |
This user API function temporarily clears the write protection of the UCODE segment.
passphrase | The passphrase must be #NVM_SEG_PROT_CODE_NO_ERASE. |
#define user_nvm_ucode_temp_protect_set ( (int32_t(*)(uint32_t)) addr_user_nvm_ucode_temp_protect_set ) |
This user API function temporarily sets the write protection of the UCODE segment.
passphrase | The passphrase must be #NVM_SEG_PROT_CODE_NO_ERASE. |
#define user_nvm_udata_temp_protect_clear ( (int32_t(*)(uint32_t)) addr_user_nvm_udata_temp_protect_clear ) |
This user API function temporarily clears the write protection of the UDATA segment.
passphrase | The passphrase must be #NVM_SEG_PROT_DATA_NO_ERASE. |
#define user_nvm_udata_temp_protect_set ( (int32_t(*)(uint32_t)) addr_user_nvm_udata_temp_protect_set ) |
This user API function temporarily sets the write protection of the UDATA segment.
passphrase | The passphrase must be #NVM_SEG_PROT_DATA_NO_ERASE. |
#define user_nvm_write user_nvm_page_write |
#define user_ram_mbist ( (int32_t(*)(uint32_t, uint32_t)) addr_user_ram_mbist ) |
This user API function performs a MBIST on the specified SRAM range. Start address shall be smaller than end address.
start_address | RAM memory address at which to start the MBIST test. Range is 0x18000000 + device RAM size. |
end_address | RAM memory address up to which to perform the MBIST test. Range is 0x18000000 + device RAM size. |
#define user_secure_download_finish ( (int32_t(*)(void)) addr_user_secure_download_finish ) |
This user API function finalizes the secure download process.
The function concludes the entire secure download process and clears the cryptographic context.
#define user_secure_download_start ( (int32_t(*)(uint8_t, uint8_t, uint8_t *)) addr_user_secure_download_start ) |
This user API function initiates the secure container and starts the secure download process.
The function tries to decrypt the first [0th:31th] bytes of the input streaming data. Upon successful start of secure download operation, the next call of user_secure_download_update routine expects [32th:159th] byte of input streaming data.
key_id | The ID of the key for decryption, key ID range is 0 to 12. |
n_sectors | Size in sectors, of the new secure container. |
data | Address of the input buffer. |
#define user_secure_download_update ( (int32_t(*)(uint32_t, uint8_t *)) addr_user_secure_download_update ) |
This user API function continues the secure download process.
Call the user_secure_download_start routine before the first update operation. The function can be called multiple times. Each call decrypts 128 bytes of input streaming data and writes the decrypted data (128 bytes) into the target page. The user shall feed in new data with each call.
page_index | The index of the page to which to write, starting from a secure container start address. |
data | Address of the input buffer. |
#define user_secure_dualboot ( (int32_t(*)(uint32_t)) addr_user_secure_dualboot ) |
This user API function configures and enables the secondary UBSL image.
image_offset | New image address offset (the offset of startup page address), starting from the UBSL segment start address. |
#define user_ubsl_size_restore ( (void(*)(void)) addr_user_ubsl_size_restore ) |
This user API function is used to restore the UBSL size in case of a Stop mode exit w/o reset.
typedef struct user_100tp_read_t user_100tp_read_t |
typedef struct user_100tp_write_t user_100tp_write_t |
typedef enum user_cache_op_t user_cache_op_t |
typedef struct user_crypto_cbc_t user_crypto_cbc_t |
typedef struct user_crypto_cmac_t user_crypto_cmac_t |
typedef enum user_crypto_fid_t user_crypto_fid_t |
typedef struct user_crypto_inp_buf_t user_crypto_inp_buf_t |
typedef struct user_crypto_io_buf_t user_crypto_io_buf_t |
typedef struct user_crypto_out_buf_t user_crypto_out_buf_t |
typedef struct user_key_erase_params_t user_key_erase_params_t |
typedef struct user_key_erase_t user_key_erase_t |
typedef struct user_key_t user_key_t |
Key data structure aligned with CFS page (ignored reserved bytes)
typedef struct user_key_write_params_t user_key_write_params_t |
typedef struct user_key_write_t user_key_write_t |
typedef struct user_nvm_page_write_t user_nvm_page_write_t |
typedef enum user_nvm_segment_t user_nvm_segment_t |
NVM protection API password segment
enum user_cache_op_t |
enum user_crypto_fid_t |
enum user_nvm_segment_t |
NVM protection API password segment