SDK4.0 This document shows Ameba SDK 4.0 APIs

- Main Page
- Modules
- Data Structures
- Files

EFUSE
Ameba SDK » HAL

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

  0 | Success

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

  address | Specifies the offset of the programmed efuse.
  len | Specifies the data length of programmed data.
  buf | Specified the data to be programmed.

Return values

  0 | Success
  -1 | Failure

int efuse_key2_write | ( | u8 | address,
|  | u8 | len,
|  | u8 * | buf
| ) |  |

Write key2 to efuse.

Parameters

  address | Specifies the offset of the programmed efuse.
  len | Specifies the data length of programmed data.
  buf | Specified the data to be programmed.

Return values

  0 | Success
  -1 | Failure

void efuse_mtp_read | ( | uint8_t * | data | ) |

Read efuse contant of specified user.

Parameters

  data | Specified 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

  data | Specified the data to be programmed.
  len | Specifies 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

  OtfKey | 16B 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

  buf | Specified the data to be programmed.
  len | Specifies the data length of programmed data.

Return values

  0 | Success
  -1 | Failure

int efuse_otp_read | ( | u8 | address,
|  | u8 | len,
|  | u8 * | buf
| ) |  |

Read efuse OTP contant.

Parameters

  address | Specifies the offset of the OTP.
  len | Specifies the length of readback data.
  buf | Specified the address to save the readback data.

Return values

  0 | Success
  -1 | Failure

int efuse_otp_write | ( | u8 | address,
|  | u8 | len,
|  | u8 * | buf
| ) |  |

Write user's contant to OTP efuse.

Parameters

  address | Specifies the offset of the programmed OTP.
  len | Specifies the data length of programmed data.
  buf | Specified the data to be programmed.

Return values

  0 | Success
  -1 | Failure

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_key | 16B EFUSE KEY

Note
  can not change or read back after write.