Datasheet

Table Of Contents
43.3.4.4.7 Status Returned Values
Table 43-12. Fill Service Return Codes
Returned Status Importance Meaning
PUKCL_OK Service functioned correctly.
43.3.4.5 Fast Copy/Clear
43.3.4.5.1 Purpose
This service performs a copy from a memory area to another or a memory area clear.
43.3.4.5.2 How to Use the Service
43.3.4.5.3 Description
This service copies a number X into another number R, padding with zero on the MSB side up to the
length specified for R.
R = X
If the lengths of R and X are equal, a complete fast copy is processed.
If the length of R is strictly greater than the length of X, X is first copied in the Low Significant Bytes side
of R, and R is padded with zeros on the Most Significant Bytes side.
If the pointer on the X area equals zero, R is filled with zeros. This operation can also be made by using
the Fill service (see 43.3.4.4 Fill).
The service name for this operation is FastCopy.
Important:  The length of R must be greater or equal to the length of X.
43.3.4.5.4 Parameters Definition
This service can easily be accessed through the use of the PUKCL_FastCopy() macro.
Table 43-13. FastCopy Service Parameters
Parameter Type Direction Location Data Length Before Executing
the Service
After Executing the
Service
nu1XBase nu1 I Crypto RAM u2XLength Base of X Base of X number
untouched
nu1RBase nu1 I Crypto RAM u2RLength Base of R Base of R filled with X
u2RLength u2 I Length of R Length of R
u2XLength u2 I Length of X Length of X
43.3.4.5.5 Code Example
PUKCL_PARAM PUKCLParam;
PPUKCL_PARAM pvPUKCLParam = &PUKCLParam;
// Initialize parameters
PUKCL_FastCopy(nu1XBase) = <Base of the X number>;
PUKCL_FastCopy(nu1RBase) = <Base of the R number>;
PUKCL_FastCopy(u2XLength) = <Length of the X number>;
PUKCL_FastCopy(u2RLength) = <Length of the R number>;
SAM D5x/E5x Family Data Sheet
Public Key Cryptography Controller (PUKCC)
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1454