4 How to Use the PUF Driver

The PUF driver provided by Microchip for PIC32 MCUs offers an easy access to the PUF hardware module, its configuration and the PUF operations. It is delivered as an include file and a library.

To use the PUF driver, this guidelines must be followed:
  1. Initialize base addresses to the hardware registers of the PUF module. This is performed by calling DRV_PUF_Initialize function.
  2. Optionally, reset the PUF module with DRV_PUF_SoftReset function and power down the SRAM with DRV_PUF_SramPwrSwitchDisable function.
  3. Start the PUF module by calling DRV_PUF_Start function. This function enables the PUF clock and initializes the PUF state machine. It also allows to configure several things, such as disabling of commands, SRAM power-up, and privileged access. These configurations can also be set with independent functions once the PUF driver has been initialized.
  4. If there is no Activation Code available, run the Enroll command with DRV_PUF_EnrollCmd function and store the returned AC in NVM.
  5. If there is an Activation Code available, run the Start command with DRV_PUF_StartCmd function.
  6. Perform key operations (Get Key, Wrap, Wrap Generated Random, and Unwrap) and random number generation with the corresponding functions.
  7. Run the Stop command with DRV_PUF_StopCmd function and power down the SRAM with DRV_PUF_SramPwrSwitchDisable function when the PUF module is not going to be used for a long time.

In case of errors, refer to the PUF Error Handling section.

For details on all available functions, refer to the PUF API references.

To see examples on how to use the PUF module, refer to the PUF demo applications.