Classes | Macros | Typedefs | Enumerations | Functions
gr55xx_hal_efuse.h File Reference

Header file containing functions prototypes of eFuse HAL library. More...

`#include "gr55xx_hal_def.h"`
`#include "gr55xx_ll_efuse.h"`
Include dependency graph for gr55xx_hal_efuse.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
struct | _efuse_init
| eFuse init Structure definition More...
struct | _efuse_handle
| eFuse handle Structure definition More...
struct | _keyram_mask
| eFuse Keyram Structure definition More...
struct | _hal_efuse_callback
| HAL_EFUSE Callback function definition. More...

## Macros
#define | HAL_EFUSE_ERROR_NONE ((uint32_t)0x00000000)
| No error More...
#define | HAL_EFUSE_ERROR_TIMEOUT ((uint32_t)0x00000001)
| Timeout error More...
#define | HAL_EFUSE_ERROR_INVALID_PARAM ((uint32_t)0x00000002)
| Invalid parameters error. More...
#define | EFUSE_FLAG_WRITE_KEYRAM_BUSY LL_EFUSE_WRITE_KEYRAM_BUSY
| Write keyram operation is in process More...
#define | EFUSE_FLAG_READ_TRIM_DONE LL_EFUSE_READ_TRIM_DONE
| Read trim from eFuse has done More...
#define | EFUSE_FLAG_CRC_CHECK_DONE LL_EFUSE_CRC_CHECK_DONE
| eFuse CRC check done More...
#define | EFUSE_FLAG_CRC_CHECK_SUCCESS LL_EFUSE_CRC_CHECK_SUCCESS
| CRC check succeeded More...
#define | EFUSE_FLAG_INIT_CHECK_DONE LL_EFUSE_INIT_CHECK_DONE
| eFuse initial value check done More...
#define | EFUSE_FLAG_INIT_CHECK_SUCCESS LL_EFUSE_INIT_CHECK_SUCCESS
| eFuse initial value check succeeded More...
#define | EFUSE_FLAG_WRITE_DONE LL_EFUSE_WRITE_DONE
| eFuse one word write done More...
#define | EFUSE_FLAG_TEST_DONE LL_EFUSE_TEST_DONE
| Read from eFuse has done in test mode More...
#define | EFUSE_OFFSET_USER_DSVD (0x0000UL)
| Reserved offset in backup info block More...
#define | EFUSE_OFFSET_BBLK_TRIM (0x0020UL)
| Triming offset in backup info block More...
#define | EFUSE_OFFSET_BBLK_CONFIG (0x005CUL)
| Configuration offset in backup info block More...
#define | EFUSE_OFFSET_BBLK_SWD (0x0060UL)
| SWD Enable offset in backup info block More...
#define | EFUSE_OFFSET_BBLK_EncMode (0x0062UL)
| Encryption Mode offset in backup info block More...
#define | EFUSE_OFFSET_BBLK_CRC32 (0x0064UL)
| CRC32 offset in backup info block More...
#define | EFUSE_OFFSET_BBLK_CHIP_ID (0x0068UL)
| Chip ID offset in backup info block More...
#define | EFUSE_OFFSET_BBLK_PRODUCT_ID (0x006EUL)
| Product ID offset in backup info block More...
#define | EFUSE_OFFSET_BBLK_FW_PUBLICKEY (0x0070UL)
| Firmware public key offset in backup info block. More...
#define | EFUSE_OFFSET_BBLK_ROOT_PUBLICKEY (0x0080UL)
| Root public key offset in backup info block More...
#define | EFUSE_OFFSET_BBLK_ECC_KEY (0x0090UL)
| ECC key offset in backup info block More...
#define | EFUSE_OFFSET_BBLK_FW_KEY (0x00B0UL)
| Firmware key offset in backup info block More...
#define | EFUSE_OFFSET_BBLK_HMAC_KEY (0x00D0UL)
| HMAC key offset in backup info block More...
#define | EFUSE_OFFSET_BBLK_DATA_KEY (0x00F0UL)
| Data key offset in backup info block More...
#define | EFUSE_OFFSET_MBLK_TRIM (0x0110UL)
| Triming offset in main info block More...
#define | EFUSE_OFFSET_MBLK_CONFIG (0x014CUL)
| Configuration offset in main info block More...
#define | EFUSE_OFFSET_MBLK_SWD (0x0150UL)
| SWD Enable offset in main info block More...
#define | EFUSE_OFFSET_MBLK_EncMode (0x0152UL)
| Encryption Mode offset in main info block More...
#define | EFUSE_OFFSET_MBLK_CRC32 (0x0154UL)
| CRC32 offset in main info block More...
#define | EFUSE_OFFSET_MBLK_CHIP_ID (0x0158UL)
| Chip ID offset in main info block More...
#define | EFUSE_OFFSET_MBLK_PRODUCT_ID (0x015EUL)
| Product ID offset in main info block More...
#define | EFUSE_OFFSET_MBLK_FW_PUBLICKEY (0x0160UL)
| Firmware public key offset in main info block More...
#define | EFUSE_OFFSET_MBLK_ROOT_PUBLICKEY (0x0170UL)
| Root public key offset in main info block More...
#define | EFUSE_OFFSET_MBLK_ECC_KEY (0x0180UL)
| ECC key offset in main info block More...
#define | EFUSE_OFFSET_MBLK_FW_KEY (0x01A0UL)
| Firmware key offset in main info block More...
#define | EFUSE_OFFSET_MBLK_HMAC_KEY (0x01C0UL)
| HMAC key offset in main info block More...
#define | EFUSE_OFFSET_MBLK_DATA_KEY (0x01E0UL)
| Data key offset in main info block More...
#define | EFUSE_OFFSET_END (0x0200UL)
| eFuse Offset end More...
#define | __HAL_EFUSE_ENABLE_MAIN_BACKUP(__HANDLE__) ll_efuse_enable_main_backup((__HANDLE__)->p_instance)
| Enable the eFuse main or backup. More...
#define | __HAL_EFUSE_DISABLE_MAIN_BACKUP(__HANDLE__) ll_efuse_disable_main_backup((__HANDLE__)->p_instance)
| Disable the eFuse main or backup. More...
#define | __HAL_EFUSE_ENABLE_PGENB(__HANDLE__) ll_efuse_enable_pgenb((__HANDLE__)->p_instance)
| Enable the eFuse PGENB. More...
#define | __HAL_EFUSE_DISABLE_PGENB(__HANDLE__) ll_efuse_disable_pgenb((__HANDLE__)->p_instance)
| Disable the eFuse PGENB. More...
#define | __HAL_EFUSE_GET_FLAG(__HANDLE__, __FLAG__) ((READ_BITS((__HANDLE__)->p_instance->STAT, (__FLAG__)) != 0) ? SET : RESET)
| Check whether the specified eFuse flag is set or not. More...

## Typedefs
typedef struct _efuse_init | efuse_init_t
| eFuse init Structure definition More...
typedef struct _efuse_handle | efuse_handle_t
| eFuse handle Structure definition More...
typedef struct _keyram_mask | keyram_mask_t
| eFuse Keyram Structure definition More...
typedef struct _hal_efuse_callback | hal_efuse_callback_t
| HAL_EFUSE Callback function definition. More...

## Enumerations
enum | hal_efuse_state_t { HAL_EFUSE_STATE_RESET = 0x00, HAL_EFUSE_STATE_READY = 0x01, HAL_EFUSE_STATE_BUSY = 0x02, HAL_EFUSE_STATE_ERROR = 0x04 }
| HAL eFuse State Enumerations definition. More...

## Functions
hal_status_t | hal_efuse_init (efuse_handle_t *p_efuse)
| Initialize the eFuse according to the specified parameters in the efuse_init_t and initialize the associated handle. More...
hal_status_t | hal_efuse_deinit (efuse_handle_t *p_efuse)
| De-initialize the eFuse peripheral. More...
void | hal_efuse_msp_init (efuse_handle_t *p_efuse)
| Initialize the eFuse MSP. More...
void | hal_efuse_msp_deinit (efuse_handle_t *p_efuse)
| De-initialize the eFuse MSP. More...
hal_status_t | hal_efuse_write (efuse_handle_t *p_efuse, uint32_t word_offset, uint32_t *p_data, uint32_t nword)
| Write the eFuse memory data. More...
hal_status_t | hal_efuse_read (efuse_handle_t *p_efuse, uint32_t word_offset, uint32_t *p_data, uint32_t nword)
| Read the eFuse memory data. More...
hal_status_t | hal_efuse_write_keyram (efuse_handle_t *p_efuse, keyram_mask_t *p_mask)
| Read the key from eFuse memory and write to keyram. More...
hal_status_t | hal_efuse_initial_value_check (efuse_handle_t *p_efuse)
| Check the eFuse memory with 0, if memory are all 0, return HAL_OK, then return HAL_ERROR. More...
hal_status_t | hal_efuse_crc_calculate (efuse_handle_t *p_efuse, uint32_t word_offset, uint32_t nword, uint32_t *p_result)
| Calculate CRC of the eFuse memory data. More...
hal_status_t | hal_efuse_read_trim (efuse_handle_t *p_efuse, uint32_t word_offset, uint32_t *p_data, uint32_t nword)
| Read trim from eFuse memory data. More...
hal_status_t | hal_efuse_set_main_backup (efuse_handle_t *p_efuse)
| Set the main or backup info of the eFuse memory. More...

## Detailed Description

Header file containing functions prototypes of eFuse HAL library.

Author
  BLE Driver Team

Attention

  ##### Copyright (c) 2019 GOODIX

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file gr55xx_hal_efuse.h.