LPCOpen Platform for LPC18XX/43XX microcontrollers  18XX43XX
LPCOpen Platform for the NXP LPC18XX/43XX family of Microcontrollers
Data Structures | Enumerations | Functions
CHIP: LPC18xx/43xx OTP Controller driver

Detailed Description

Data Structures

struct  LPC_OTP_T
 OTP Register block. More...
 

Enumerations

enum  CHIP_OTP_BOOT_SRC_T {
  CHIP_OTP_BOOTSRC_PINS, CHIP_OTP_BOOTSRC_UART0, CHIP_OTP_BOOTSRC_SPIFI, CHIP_OTP_BOOTSRC_EMC8,
  CHIP_OTP_BOOTSRC_EMC16, CHIP_OTP_BOOTSRC_EMC32, CHIP_OTP_BOOTSRC_USB0, CHIP_OTP_BOOTSRC_USB1,
  CHIP_OTP_BOOTSRC_SPI, CHIP_OTP_BOOTSRC_UART3
}
 OTP Boot Source selection used in Chip driver. More...
 

Functions

uint32_t Chip_OTP_Init (void)
 Initialize for OTP Controller functions. More...
 
uint32_t Chip_OTP_ProgBootSrc (CHIP_OTP_BOOT_SRC_T BootSrc)
 Program boot source in OTP Controller. More...
 
uint32_t Chip_OTP_ProgJTAGDis (void)
 Program the JTAG bit in OTP Controller. More...
 
uint32_t Chip_OTP_ProgUSBID (uint32_t ProductID, uint32_t VendorID)
 Program USB ID in OTP Controller. More...
 
uint32_t Chip_OTP_ProgGPWord (uint32_t WordNum, uint32_t Data, uint32_t Mask)
 Program OTP GP Word memory. More...
 
uint32_t Chip_OTP_ProgKey (uint32_t KeyNum, uint8_t *key)
 Program AES Key. More...
 
uint32_t Chip_OTP_GenRand (void)
 Generate Random Number using HW Random Number Generator. More...
 

Enumeration Type Documentation

OTP Boot Source selection used in Chip driver.

Enumerator
CHIP_OTP_BOOTSRC_PINS 

Boot source - External pins

CHIP_OTP_BOOTSRC_UART0 

Boot source - UART0

CHIP_OTP_BOOTSRC_SPIFI 

Boot source - EMC 8-bit memory

CHIP_OTP_BOOTSRC_EMC8 

Boot source - EMC 16-bit memory

CHIP_OTP_BOOTSRC_EMC16 

Boot source - EMC 32-bit memory

CHIP_OTP_BOOTSRC_EMC32 

Boot source - EMC 32-bit memory

CHIP_OTP_BOOTSRC_USB0 

Boot source - DFU USB0 boot

CHIP_OTP_BOOTSRC_USB1 

Boot source - DFU USB1 boot

CHIP_OTP_BOOTSRC_SPI 

Boot source - SPI boot

CHIP_OTP_BOOTSRC_UART3 

Boot source - UART3

Definition at line 69 of file otp_18xx_43xx.h.

Function Documentation

uint32_t Chip_OTP_GenRand ( void  )

Generate Random Number using HW Random Number Generator.

Returns
Random Number value

Definition at line 142 of file otp_18xx_43xx.c.

uint32_t Chip_OTP_Init ( void  )

Initialize for OTP Controller functions.

Returns
Status of Otp_Init function This function will initialise all the OTP driver function pointers and call the ROM OTP Initialisation function.

Definition at line 66 of file otp_18xx_43xx.c.

uint32_t Chip_OTP_ProgBootSrc ( CHIP_OTP_BOOT_SRC_T  BootSrc)

Program boot source in OTP Controller.

Parameters
BootSrc: Boot Source enum value
Returns
Status

Definition at line 87 of file otp_18xx_43xx.c.

uint32_t Chip_OTP_ProgGPWord ( uint32_t  WordNum,
uint32_t  Data,
uint32_t  Mask 
)

Program OTP GP Word memory.

Parameters
WordNum: Word Number (Select word 0 or word 1 or word 2)
Data: Data value
Mask: Mask value
Returns
Status This function available in devices which are not AES capable

Definition at line 105 of file otp_18xx_43xx.c.

uint32_t Chip_OTP_ProgJTAGDis ( void  )

Program the JTAG bit in OTP Controller.

Returns
Status

Definition at line 93 of file otp_18xx_43xx.c.

uint32_t Chip_OTP_ProgKey ( uint32_t  KeyNum,
uint8_t *  key 
)

Program AES Key.

Parameters
KeyNum: Key Number (Select 0 or 1)
key: Pointer to AES Key (16 bytes required)
Returns
Status This function available in devices which are AES capable

Definition at line 128 of file otp_18xx_43xx.c.

uint32_t Chip_OTP_ProgUSBID ( uint32_t  ProductID,
uint32_t  VendorID 
)

Program USB ID in OTP Controller.

Parameters
ProductID: USB Product ID
VendorID: USB Vendor ID
Returns
Status

Definition at line 99 of file otp_18xx_43xx.c.