Datasheet

Table Of Contents
Please note the following rules about return codes:
A status value indicating a severe error, means that an expected operation has not been executed or
has been corrupted. Therefore, the result of such an operation should never be used.
A status value indicating a warning should be looked at precisely, as the expected correctness of the
result cannot be guaranteed.
A status value indicating an information always means that the result is correct with no possible
misinterpretation of the values.
A status value zero indicates that there is no error or no severity.
In the following sections, for each service, the constraints on the parameters placement are detailed. For
reduced code size and higher execution speed, tests are processed on these constraints. It is important
that PUKCL users take these placement constraints into consideration at the development and test
stages to ensure the correct functioning of the library.
43.3.4 Basic Arithmetic and Cryptographic Services
43.3.4.1 SelfTest
43.3.4.1.1 Purpose
This service is used to initialize the PUKCL. It resets the PUKCC, clears the Crypto RAM, and returns the
library and PUKCC version numbers.
It must be called before using any other services in the library and the user must verify the return status
at the end of the service execution.
43.3.4.1.2 How to Use the Service
43.3.4.1.3 Description
This service processes internal tests and returns information and status codes as described in 43.3.4.1.7
Status Returned Values. The service name for this operation is SelfTest.
43.3.4.1.4 Parameters Definition
It is possible to directly address this service through the PUKCL_SelfTest() macro.
Table 43-5. SelfTest Service Parameters
Parameter Type Dir. Location Data Length Before Executing
the Service
After Executing the
Service
u4Version u4 O PUKCL version
u4PUKCCVersion u4 O PUKCC Version
u4CheckNum1 u4 O Test result value 1
u4CheckNum2 u4 O Test result value 2
u1Step u1 O Latest correctly executed
step
43.3.4.1.5 Code Example
PUKCL_PARAM PUKCLParam;
PPUKCL_PARAM pvPUKCLParam = &PUKCLParam;
// vPUKCL_Process() is a macro command, which populates the service name
// and then calls the library
vPUKCL_Process(SelfTest,pvPUKCLParam);
if (PUKCL(u2Status) == PUKCL_OK)
SAM D5x/E5x Family Data Sheet
Public Key Cryptography Controller (PUKCC)
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1450