SDK3.5
This document shows Ameba SDK 3.5 APIs
EFUSE

efuse functions More...

Ameba Common

int efuse_get_remaining_length (void)
 Get remaining efuse length. More...
 
void efuse_mtp_read (uint8_t *data)
 Read efuse contant of specified user. More...
 
int efuse_mtp_write (uint8_t *data, uint8_t len)
 Write user's contant to efuse. More...
 
int efuse_otp_read (u8 address, u8 len, u8 *buf)
 Read efuse OTP contant. More...
 
int efuse_otp_write (u8 address, u8 len, u8 *buf)
 Write user's contant to OTP efuse. More...
 
int efuse_otp_chk (u8 len, u8 *buf)
 ckeck user's contant to OTP efuse More...
 
int efuse_disable_jtag (void)
 Disable jtag. More...
 

Ameba1 Only

int efuse_key1_write (u8 address, u8 len, u8 *buf)
 Write key1 to efuse. More...
 
int efuse_key2_write (u8 address, u8 len, u8 *buf)
 Write key2 to efuse. More...
 

AmebaZ Only

void efuse_rdp_enable (void)
 Set RDP Enable. More...
 
void efuse_rdp_keyset (u8 *rdp_key)
 Set 16B RDP key into EFUSE. More...
 
void efuse_otf_keyset (u8 *otf_key)
 Set 16B OTF key into EFUSE. More...
 

Detailed Description

efuse functions

Function Documentation

int efuse_disable_jtag ( void  )

Disable jtag.

Return values
0Success
int efuse_get_remaining_length ( void  )

Get remaining efuse length.

Return values
remaining efuse length
int efuse_key1_write ( u8  address,
u8  len,
u8 *  buf 
)

Write key1 to efuse.

Parameters
addressSpecifies the offset of the programmed efuse.
lenSpecifies the data length of programmed data.
bufSpecified the data to be programmed.
Return values
0Success
-1Failure
int efuse_key2_write ( u8  address,
u8  len,
u8 *  buf 
)

Write key2 to efuse.

Parameters
addressSpecifies the offset of the programmed efuse.
lenSpecifies the data length of programmed data.
bufSpecified the data to be programmed.
Return values
0Success
-1Failure
void efuse_mtp_read ( uint8_t *  data)

Read efuse contant of specified user.

Parameters
dataSpecified the address to save the readback data.
Return values
none
int efuse_mtp_write ( uint8_t *  data,
uint8_t  len 
)

Write user's contant to efuse.

Parameters
dataSpecified the data to be programmed.
lenSpecifies the data length of programmed data.
Return values
value
  • 0~32: Success
  • -1: Failure
void efuse_otf_keyset ( u8 *  otf_key)

Set 16B OTF key into EFUSE.

Parameters
OtfKey16B EFUSE KEY
Note
can not change or read back after write.
int efuse_otp_chk ( u8  len,
u8 *  buf 
)

ckeck user's contant to OTP efuse

Parameters
bufSpecified the data to be programmed.
lenSpecifies the data length of programmed data.
Return values
0Success
-1Failure
int efuse_otp_read ( u8  address,
u8  len,
u8 *  buf 
)

Read efuse OTP contant.

Parameters
addressSpecifies the offset of the OTP.
lenSpecifies the length of readback data.
bufSpecified the address to save the readback data.
Return values
0Success
-1Failure
int efuse_otp_write ( u8  address,
u8  len,
u8 *  buf 
)

Write user's contant to OTP efuse.

Parameters
addressSpecifies the offset of the programmed OTP.
lenSpecifies the data length of programmed data.
bufSpecified the data to be programmed.
Return values
0Success
-1Failure
void efuse_rdp_enable ( void  )

Set RDP Enable.

Parameters
none
Note
can not change or read back after write.
void efuse_rdp_keyset ( u8 *  rdp_key)

Set 16B RDP key into EFUSE.

Parameters
rdp_key16B EFUSE KEY
Note
can not change or read back after write.