MCUXpresso SDK API Reference Manual  Rev 2.16.000
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
OCOTP Driver

Overview

OCOTP driver supports fuse read.

Files

file  fsl_ocotp.h
 

Macros

#define FSL_OCOTP_UID_LENGTH   16U
 OCOTP unique ID length. More...
 

Enumerations

enum  
 OTP Status Group.
 
enum  {
  kStatus_OTP_InvalidAddress = MAKE_STATUS(kStatusGroup_OtpGroup, 1),
  kStatus_OTP_Timeout = MAKE_STATUS(kStatusGroup_OtpGroup, 7)
}
 OTP Error Status definitions. More...
 

Functions

status_t OCOTP_OtpInit (void)
 Initialize OTP controller. More...
 
status_t OCOTP_OtpDeinit (void)
 De-Initialize OTP controller. More...
 
status_t OCOTP_OtpFuseRead (uint32_t addr, uint32_t *data)
 Read Fuse value from OTP Fuse Block. More...
 
status_t OCOTP_ReadSocOtp (uint64_t *data, uint32_t tag)
 Read Fuse line with specific tag value from SoC OTP. More...
 
status_t OCOTP_ReadUniqueID (uint8_t *uid, uint32_t *idLen)
 Read unique ID from OTP Fuse Block. More...
 
status_t OCOTP_ReadSVC (uint64_t *svc)
 Read Static Voltage Compansation from SOC OTP. More...
 
status_t OCOTP_ReadPackage (uint32_t *pack)
 Read package type from SOC OTP. More...
 

Driver version

#define FSL_OCOTP_DRIVER_VERSION   (MAKE_VERSION(2, 2, 1))
 OCOTP driver version 2.2.1. More...
 

Macro Definition Documentation

#define FSL_OCOTP_DRIVER_VERSION   (MAKE_VERSION(2, 2, 1))
#define FSL_OCOTP_UID_LENGTH   16U

Enumeration Type Documentation

anonymous enum
Enumerator
kStatus_OTP_InvalidAddress 

Invalid OTP address.

kStatus_OTP_Timeout 

OTP operation time out.

Function Documentation

status_t OCOTP_OtpInit ( void  )

This function enables OTP Controller clock.

Returns
kStatus_Success
status_t OCOTP_OtpDeinit ( void  )

This functin disables OTP Controller Clock.

Returns
kStatus_Success
status_t OCOTP_OtpFuseRead ( uint32_t  addr,
uint32_t *  data 
)

This function read fuse data from OTP Fuse block to specified data buffer.

Parameters
addrFuse address
dataBuffer to hold the data read from OTP Fuse block
Returns
kStatus_Success - Data read from OTP Fuse block successfully kStatus_OTP_Timeout - OTP read timeout kStatus_InvalidArgument - data pointer is invalid
status_t OCOTP_ReadSocOtp ( uint64_t *  data,
uint32_t  tag 
)

This function read Fuse line with specific tag value from SoC OTP to specified data buffer.

Parameters
dataBuffer to hold the data read from SoC OTP
tagTag value to match
Returns
kStatus_Success - Data read from SoC OTP successfully kStatus_Fail - Data read from SoC OTP failed, or cannot find the tag kStatus_InvalidArgument - data pointer is invalid
status_t OCOTP_ReadUniqueID ( uint8_t *  uid,
uint32_t *  idLen 
)

This function read unique ID from OTP Fuse block to specified data buffer.

Parameters
uidThe buffer to store unique ID, buffer byte length is FSL_OCOTP_UID_LENGTH.
idLen[in/out]The unique ID byte length. Set the length to read, return the length read out.
Returns
kStatus_Success - Data read from OTP Fuse block successfully kStatus_OTP_Timeout - OTP read timeout kStatus_InvalidArgument - data pointer is invalid
status_t OCOTP_ReadSVC ( uint64_t *  svc)

This function read SVC from OTP Fuse block to specified data buffer.

Parameters
svcThe buffer to store SVC.
Returns
kStatus_Success - Data read from SOC OTP successfully kStatus_Fail - SOC OTP read failure
status_t OCOTP_ReadPackage ( uint32_t *  pack)
Parameters
packThe buffer to store package type.
Returns
kStatus_Success - Data read from SOC OTP successfully kStatus_Fail - SOC OTP read failure