EFUSE

[English]

EFUSE API Status

API

BK7258

BK7258_cp1

bk_efuse_driver_init()

Y

Y

bk_efuse_driver_deinit()

Y

Y

bk_efuse_write()

Y

Y

bk_efuse_read()

Y

Y

Efuse API Reference

Header File

Functions

bk_err_t bk_efuse_driver_init(void)

Init the EFUSE driver.

This API init the resoure common:

  • Init EFUSE driver control memory

Attention

1. This API should be called before any other EFUSE APIs.

Returns

  • BK_OK: succeed

  • others: other errors.

bk_err_t bk_efuse_driver_deinit(void)

Deinit the EFUSE driver.

This API free all resource related to EFUSE and disable EFUSE.

Returns

  • BK_OK: succeed

  • others: other errors.

bk_err_t bk_efuse_write_byte(uint8_t addr, uint8_t data)

Efuse write operation @Notice: Each efuse address area has specific usage, please apply the area from PM before write data to the efuse address.

Parameters
  • addr – efuse write address

  • data – efuse write data

Returns

  • BK_OK: succeed

  • BK_ERR_EFUSE_DRIVER_NOT_INIT: EFUSE driver not init

  • BK_ERR_EFUSE_ADDR_OUT_OF_RANGE: EFUSE address is out of range

  • BK_ERR_EFUSE_CANNOT_WRTIE: EFUSE cannot write, cannot change bit from 1 to 0

  • BK_ERR_EFUSE_WRTIE_NOT_EQUAL: EFUSE data read is not equal to the data written

  • others: other errors.

bk_err_t bk_efuse_read_byte(uint8_t addr, uint8_t *data)

Efuse read operation.

Parameters
  • addr – read address

  • data – pointer to accept value of efuse read data

Returns

  • BK_OK: succeed

  • BK_ERR_EFUSE_DRIVER_NOT_INIT: EFUSE driver not init

  • BK_ERR_EFUSE_ADDR_OUT_OF_RANGE: EFUSE address is out of range

  • others: other errors.

Efuse API Typedefs

Header File

Header File

Macros

BK_ERR_EFUSE_DRIVER_NOT_INIT

EFUSE driver not init

BK_ERR_EFUSE_ADDR_OUT_OF_RANGE

EFUSE address is out of range

BK_ERR_EFUSE_CANNOT_WRTIE

EFUSE cannot write, cannot change bit from 1 to 0

BK_ERR_EFUSE_WRTIE_NOT_EQUAL

EFUSE data read is not equal to the data written

BK_ERR_EFUSE_READ_FAIL

EFUSE data read fail

EFUSE_ADDR_BYTE0

efuse address defines @Notice: Each efuse address area has specific usage, please apply the area from PM before write data to the efuse address.

EFUSE_ADDR_BYTE1
EFUSE_ADDR_BYTE2
EFUSE_ADDR_BYTE3
EFUSE_ADDR_BYTE4
EFUSE_ADDR_BYTE5
EFUSE_ADDR_BYTE6
EFUSE_ADDR_BYTE7
EFUSE_ADDR_BYTE8
EFUSE_ADDR_BYTE9
EFUSE_ADDR_BYTE10
EFUSE_ADDR_BYTE11
EFUSE_ADDR_BYTE12
EFUSE_ADDR_BYTE13
EFUSE_ADDR_BYTE14
EFUSE_ADDR_BYTE15
EFUSE_ADDR_BYTE16
EFUSE_ADDR_BYTE17
EFUSE_ADDR_BYTE18
EFUSE_ADDR_BYTE19
EFUSE_ADDR_BYTE20
EFUSE_ADDR_BYTE21
EFUSE_ADDR_BYTE22
EFUSE_ADDR_BYTE23
EFUSE_ADDR_BYTE24
EFUSE_ADDR_BYTE25
EFUSE_ADDR_BYTE26
EFUSE_ADDR_BYTE27
EFUSE_ADDR_BYTE28
EFUSE_ADDR_BYTE29
EFUSE_ADDR_BYTE30
EFUSE_ADDR_BYTE31
EFUSE_DEVICE_ID_BYTE_NUM

efuse device id defines the device id stores in efuse address byte 0x18 ~ 0x1c the efuse device id is set via ate cmds

EFUSE_DEVICE_ID_SN_MINIMUM
EFUSE_DEVICE_ID_SN_MAXIMUM
EFUSE_WAFER_ID_MINIMUM
EFUSE_WAFER_ID_MAXIMUM

Type Definitions

typedef uint8_t efuse_unit_t

efuse uint id