1.28.12 OTP Memory Controller (OTPC)

OTP memory area is mapped into 32-bit words. Each 32-bit word is part of one packet.Each packet contains a 32-bit header and 32-bit words of payload(data). The number of payload words is defined in the header.

This mapping system allows three important functions for an OTP memory:

  • Gives a flexible size for any type of data

  • Improves the security by identifying and masking key areas to the System bus

  • Provides an easy way to invalidate a packet and create a replacement packet (key, data) while free space is available in OTP

Using The Library

OTPC plib supports the following activities on the user area of the OTP:

  1. Create a new packet in the otp area with a given payload

  2. Update the payload of an existing user packet

  3. Read the payload associated with a packet

  4. Lock the packet to prevent any further modification

  5. Invalidate a packet to make sure that it is no longer used

  6. Hide a packet to prevent reading its payload

Library Interface

OTP Memory Controller peripheral library provides the following interfaces:

Functions

Name Description
OTPC_Initialize Initializes given OTPC instancee
OTPC_WritePacket Perform an OTPC packet write
OTPC_UpdatePayload Updates the payload of a packet
OTPC_ReadPacket Reads a User packet from OTPC from a given address
OTPC_LockPacket Locks the packet
OTPC_InvalidatePacket Invalidates the packet
OTPC_HidePacket Hides the packet

Data types and constants

Name Type Description
OTPC_PACKET_TYPE Enum Identifies user area packet types
otpc_error_code_t Enum Identifies OTPC error codes
OTPC_NEW_PACKET Struct Structure identifying a new OTPC packet