3.2.7 Main Entry Function

The main entry function is dp_top defined in dpalg.c. It must be called to initiate the programming operation. Prior to calling the function, a global variable Action_code must be assigned a value as defined in dpuser.h. Action codes are listed in the following codeblock.

#define DP_DEVICE_INFO_ACTION_CODE 1
#define DP_READ_IDCODE_ACTION_CODE 2
#define DP_ERASE_ACTION_CODE 3
#define DP_PROGRAM_ACTION_CODE 4
#define DP_VERIFY_ACTION_CODE 5
#define DP_ENC_DATA_AUTHENTICATION_ACTION_CODE 6
#define DP_VERIFY_DIGEST_ACTION_CODE 7
#define DP_READ_DEVICE_CERTIFICATE_ACTION_CODE 30u
#define DP_ZEROIZE_LIKE_NEW_ACTION_CODE 31u
#define DP_ZEROIZE_UNRECOVERABLE_ACTION_CODE 32u
Note:

Programming of individual blocks, such as array only, eNVM only, or security only is not possible with one data file because of how the data is constructed. If you wish to use such a feature, you must generate multiple data files.