InPlay API
eFuse Profile

HAL eFuse. More...

Enumerations

enum  efuse_result_status { EFUSE_ERR_OK = 0, EFUSE_ERR_NO_OPEN = -1, EFUSE_ERR_OS = -2, EFUSE_ERR_EFUSE_BUSY = -3 }
 eFuse status result More...
 

Functions

int hal_efuse_open (void)
 Initialize eFuse driver. More...
 
int hal_efuse_close (void)
 Stop and cleanup eFuse driver. More...
 
int hal_efuse_read_word (int word_num, uint32_t *out)
 Read eFuse word. More...
 
int hal_efuse_write_word (int word_num, uint32_t data)
 Write eFuse word. More...
 
uint32_t hal_efuse_read_hw_param (void)
 Read HW configuration parameters in efuse from the register Note: efuse's word 0, by default, will be read by the HW and store in the register, so SW can retrieve it without accessing efuse directly.. More...
 
void hal_efuse_read_uuid (uint32_t uuid[3])
 Read UUID in efuse from the registers Note: efuse's word 1 - 3, by default, will be read by the HW and store in the register, so SW can retrieve it without accessing efuse directly.. More...
 
uint32_t hal_efuse_read_feature_param (void)
 Read feature parameters in efuse from the register Note: efuse's word 4, by default, will be read by the HW and store in the register, so SW can retrieve it without accessing efuse directly.. More...
 
uint32_t hal_efuse_read_vbat_param (void)
 Read vbat parameters in efuse from the register Note: efuse's word 5, by default, will be read by the HW and store in the register, so SW can retrieve it without accessing efuse directly.. More...
 
uint32_t hal_efuse_read_temp_param (void)
 Read temperature parameters in efuse from the register Note: efuse's word 6, by default, will be read by the HW and store in the register, so SW can retrieve it without accessing efuse directly.. More...
 
uint32_t hal_efuse_read_usr_param (void)
 Read user configuration parameters in efuse from the register Note: efuse's word 7, by default, will be read by the HW and store in the register, so SW can retrieve it without accessing efuse directly.. More...
 
void hal_efuse_read_public_keys (uint8_t x[32], uint8_t y[32])
 Read public keys from efuse. More...
 

Detailed Description

HAL eFuse.

Enumeration Type Documentation

◆ efuse_result_status

eFuse status result

Enumerator
EFUSE_ERR_OK 

No error. Good.

EFUSE_ERR_NO_OPEN 

Error. driver is not open, call hal_efuse_open.

EFUSE_ERR_OS 

Error. Os apis failed.

EFUSE_ERR_EFUSE_BUSY 

Error, already been used.

Function Documentation

◆ hal_efuse_close()

int hal_efuse_close ( void  )

Stop and cleanup eFuse driver.

Returns
EFUSE_ERR_OK if efuse uninitializes successfully, error otherwise.
See also
enum efuse_result_status.

◆ hal_efuse_open()

int hal_efuse_open ( void  )

Initialize eFuse driver.

Returns
EFUSE_ERR_OK if eFuse initializes successfully, error otherwise.
See also
enum efuse_result_status.

◆ hal_efuse_read_feature_param()

uint32_t hal_efuse_read_feature_param ( void  )

Read feature parameters in efuse from the register Note: efuse's word 4, by default, will be read by the HW and store in the register, so SW can retrieve it without accessing efuse directly..

Returns
32 bits efuse word 4 which user should cast it with "efuse_feature_param_t" to see each bit definition

◆ hal_efuse_read_hw_param()

uint32_t hal_efuse_read_hw_param ( void  )

Read HW configuration parameters in efuse from the register Note: efuse's word 0, by default, will be read by the HW and store in the register, so SW can retrieve it without accessing efuse directly..

Returns
32 bits efuse word 0 which user should cast it with "efuse_hw_param_t" to see each bit definition

◆ hal_efuse_read_public_keys()

void hal_efuse_read_public_keys ( uint8_t  x[32],
uint8_t  y[32] 
)

Read public keys from efuse.

Parameters
[in]x[32]Ecc's public key in byte unit
[in]y[32]Ecc's public key in byte unit
Returns
No return

◆ hal_efuse_read_temp_param()

uint32_t hal_efuse_read_temp_param ( void  )

Read temperature parameters in efuse from the register Note: efuse's word 6, by default, will be read by the HW and store in the register, so SW can retrieve it without accessing efuse directly..

Returns
32 bits efuse word 6 which user should cast it with "efuse_temp_param_t" to see each bit definition

◆ hal_efuse_read_usr_param()

uint32_t hal_efuse_read_usr_param ( void  )

Read user configuration parameters in efuse from the register Note: efuse's word 7, by default, will be read by the HW and store in the register, so SW can retrieve it without accessing efuse directly..

Returns
32 bits efuse word 7 which user should cast it with "efuse_usr_param_t" to see each bit definition

◆ hal_efuse_read_uuid()

void hal_efuse_read_uuid ( uint32_t  uuid[3])

Read UUID in efuse from the registers Note: efuse's word 1 - 3, by default, will be read by the HW and store in the register, so SW can retrieve it without accessing efuse directly..

Parameters
[in]uuid[3]A uuid array with each element 32 bits
Returns
No return

◆ hal_efuse_read_vbat_param()

uint32_t hal_efuse_read_vbat_param ( void  )

Read vbat parameters in efuse from the register Note: efuse's word 5, by default, will be read by the HW and store in the register, so SW can retrieve it without accessing efuse directly..

Returns
32 bits efuse word 5 which user should cast it with "efuse_vbat_param_t" to see each bit definition

◆ hal_efuse_read_word()

int hal_efuse_read_word ( int  word_num,
uint32_t *  out 
)

Read eFuse word.

Parameters
[in]bank_ideFuse bank ID number to be read.
[in]word_numeFuse bank word number to be read.
[in]outPointer to write location of eFuse word.
Returns
EFUSE_ERR_OK if eFuse read word is successful, error otherwise.
See also
enum efuse_result_status.

◆ hal_efuse_write_word()

int hal_efuse_write_word ( int  word_num,
uint32_t  data 
)

Write eFuse word.

Parameters
[in]bank_ideFuse bank ID number to be read.
[in]word_numeFuse bank word number to be read.
[in]dataData to be written to eFuse word.
Returns
EFUSE_ERR_OK if eFuse write word is successful, error otherwise.
See also
enum efuse_result_status.