![]() |
MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
Enumerations | |
enum | |
OTP Status Group. | |
enum | { kStatus_OTP_InvalidAddress = MAKE_STATUS(kStatusGroup_OtpGroup, 1), kStatus_OTP_ProgramFail = MAKE_STATUS(kStatusGroup_OtpGroup, 2), kStatus_OTP_CrcFail = MAKE_STATUS(kStatusGroup_OtpGroup, 3), kStatus_OTP_Error = MAKE_STATUS(kStatusGroup_OtpGroup, 4), kStatus_OTP_EccCheckFail = MAKE_STATUS(kStatusGroup_OtpGroup, 5), kStatus_OTP_Locked = MAKE_STATUS(kStatusGroup_OtpGroup, 6), kStatus_OTP_Timeout = MAKE_STATUS(kStatusGroup_OtpGroup, 7), kStatus_OTP_CrcCheckPass = MAKE_STATUS(kStatusGroup_OtpGroup, 8) } |
OTP Error Status definitions. More... | |
Functions | |
status_t | IAP_OtpInit (uint32_t src_clk_freq) |
Initialize OTP controller. More... | |
status_t | IAP_OtpDeinit (void) |
De-Initialize OTP controller. More... | |
status_t | IAP_OtpFuseRead (uint32_t addr, uint32_t *data) |
Read Fuse value from OTP Fuse Block. More... | |
status_t | IAP_OtpFuseProgram (uint32_t addr, uint32_t data, bool lock) |
Program value to OTP Fuse block. More... | |
status_t | IAP_OtpShadowRegisterReload (void) |
Reload all shadow registers from OTP fuse block. More... | |
status_t | IAP_OtpCrcCheck (uint32_t start_addr, uint32_t end_addr, uint32_t crc_addr) |
Do CRC Check via OTP controller. More... | |
status_t | IAP_OtpCrcCalc (uint32_t *src, uint32_t numberOfWords, uint32_t *crcChecksum) |
Calculate the CRC checksum for specified data for OTP. More... | |
anonymous enum |
status_t IAP_OtpInit | ( | uint32_t | src_clk_freq | ) |
This function enables OTP Controller clock.
src_clk_freq | The Frequency of the source clock of OTP controller |
status_t IAP_OtpDeinit | ( | void | ) |
This functin disables OTP Controller Clock.
status_t IAP_OtpFuseRead | ( | uint32_t | addr, |
uint32_t * | data | ||
) |
This function read fuse data from OTP Fuse block to specified data buffer.
addr | Fuse address |
data | Buffer to hold the data read from OTP Fuse block |
status_t IAP_OtpFuseProgram | ( | uint32_t | addr, |
uint32_t | data, | ||
bool | lock | ||
) |
This function program data to specified OTP Fuse address.
addr | Fuse address |
data | data to be programmed into OTP Fuse block |
lock | lock the fuse field or not |
status_t IAP_OtpShadowRegisterReload | ( | void | ) |
This function reloads all the shadow registers from OTP Fuse block
status_t IAP_OtpCrcCheck | ( | uint32_t | start_addr, |
uint32_t | end_addr, | ||
uint32_t | crc_addr | ||
) |
This function checks whether data in specified fuse address ranges match the crc value in the specified CRC address and return the actual crc value as needed.
start_addr | Start address of selected Fuse address range |
end_addr | End address of selected Fuse address range |
crc_addr | Address that hold CRC data |
status_t IAP_OtpCrcCalc | ( | uint32_t * | src, |
uint32_t | numberOfWords, | ||
uint32_t * | crcChecksum | ||
) |
This function calculates the CRC checksum for specified data for OTP
src | the source address of data |
numberOfWords | number of Fuse words |
crcChecksum | Buffer to store the CRC checksum |