esp_efuse.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. * SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. /**
  11. * @brief Type of eFuse blocks ESP32S2
  12. */
  13. typedef enum {
  14. EFUSE_BLK0 = 0, /**< Number of eFuse BLOCK0. REPEAT_DATA */
  15. EFUSE_BLK1 = 1, /**< Number of eFuse BLOCK1. MAC_SPI_8M_SYS */
  16. EFUSE_BLK2 = 2, /**< Number of eFuse BLOCK2. SYS_DATA_PART1 */
  17. EFUSE_BLK_SYS_DATA_PART1 = 2, /**< Number of eFuse BLOCK2. SYS_DATA_PART1 */
  18. EFUSE_BLK3 = 3, /**< Number of eFuse BLOCK3. USER_DATA*/
  19. EFUSE_BLK_USER_DATA = 3, /**< Number of eFuse BLOCK3. USER_DATA*/
  20. EFUSE_BLK4 = 4, /**< Number of eFuse BLOCK4. KEY0 */
  21. EFUSE_BLK_KEY0 = 4, /**< Number of eFuse BLOCK4. KEY0 */
  22. EFUSE_BLK5 = 5, /**< Number of eFuse BLOCK5. KEY1 */
  23. EFUSE_BLK_KEY1 = 5, /**< Number of eFuse BLOCK5. KEY1 */
  24. EFUSE_BLK6 = 6, /**< Number of eFuse BLOCK6. KEY2 */
  25. EFUSE_BLK_KEY2 = 6, /**< Number of eFuse BLOCK6. KEY2 */
  26. EFUSE_BLK7 = 7, /**< Number of eFuse BLOCK7. KEY3 */
  27. EFUSE_BLK_KEY3 = 7, /**< Number of eFuse BLOCK7. KEY3 */
  28. EFUSE_BLK8 = 8, /**< Number of eFuse BLOCK8. KEY4 */
  29. EFUSE_BLK_KEY4 = 8, /**< Number of eFuse BLOCK8. KEY4 */
  30. EFUSE_BLK9 = 9, /**< Number of eFuse BLOCK9. KEY5 */
  31. EFUSE_BLK_KEY5 = 9, /**< Number of eFuse BLOCK9. KEY5 */
  32. EFUSE_BLK_KEY_MAX = 10,
  33. EFUSE_BLK10 = 10, /**< Number of eFuse BLOCK10. SYS_DATA_PART2 */
  34. EFUSE_BLK_SYS_DATA_PART2 = 10, /**< Number of eFuse BLOCK10. SYS_DATA_PART2 */
  35. EFUSE_BLK_MAX
  36. } esp_efuse_block_t;
  37. /**
  38. * @brief Type of coding scheme
  39. */
  40. typedef enum {
  41. EFUSE_CODING_SCHEME_NONE = 0, /**< None */
  42. EFUSE_CODING_SCHEME_RS = 3, /**< Reed-Solomon coding */
  43. } esp_efuse_coding_scheme_t;
  44. /**
  45. * @brief Type of key purpose
  46. */
  47. typedef enum {
  48. ESP_EFUSE_KEY_PURPOSE_USER = 0, /**< User purposes (software-only use) */
  49. ESP_EFUSE_KEY_PURPOSE_RESERVED = 1, /**< Reserved */
  50. ESP_EFUSE_KEY_PURPOSE_XTS_AES_256_KEY_1 = 2, /**< XTS_AES_256_KEY_1 (flash/PSRAM encryption) */
  51. ESP_EFUSE_KEY_PURPOSE_XTS_AES_256_KEY_2 = 3, /**< XTS_AES_256_KEY_2 (flash/PSRAM encryption) */
  52. ESP_EFUSE_KEY_PURPOSE_XTS_AES_128_KEY = 4, /**< XTS_AES_128_KEY (flash/PSRAM encryption) */
  53. ESP_EFUSE_KEY_PURPOSE_HMAC_DOWN_ALL = 5, /**< HMAC Downstream mode */
  54. ESP_EFUSE_KEY_PURPOSE_HMAC_DOWN_JTAG = 6, /**< JTAG soft enable key (uses HMAC Downstream mode) */
  55. ESP_EFUSE_KEY_PURPOSE_HMAC_DOWN_DIGITAL_SIGNATURE = 7, /**< Digital Signature peripheral key (uses HMAC Downstream mode) */
  56. ESP_EFUSE_KEY_PURPOSE_HMAC_UP = 8, /**< HMAC Upstream mode */
  57. ESP_EFUSE_KEY_PURPOSE_SECURE_BOOT_DIGEST0 = 9, /**< SECURE_BOOT_DIGEST0 (Secure Boot key digest) */
  58. ESP_EFUSE_KEY_PURPOSE_SECURE_BOOT_DIGEST1 = 10, /**< SECURE_BOOT_DIGEST1 (Secure Boot key digest) */
  59. ESP_EFUSE_KEY_PURPOSE_SECURE_BOOT_DIGEST2 = 11, /**< SECURE_BOOT_DIGEST2 (Secure Boot key digest) */
  60. ESP_EFUSE_KEY_PURPOSE_MAX, /**< MAX PURPOSE */
  61. } esp_efuse_purpose_t;
  62. #ifdef __cplusplus
  63. }
  64. #endif