bootloader_efuse_esp32s2.c 600 B

1234567891011121314151617181920212223
  1. /*
  2. * SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #include "sdkconfig.h"
  7. #include "bootloader_clock.h"
  8. #include "bootloader_common.h"
  9. #include "soc/efuse_reg.h"
  10. uint8_t bootloader_common_get_chip_revision(void)
  11. {
  12. // should return the same value as esp_efuse_get_chip_ver()
  13. /* No other revisions for ESP32-S2 */
  14. return 0;
  15. }
  16. uint32_t bootloader_common_get_chip_ver_pkg(void)
  17. {
  18. // should return the same value as esp_efuse_get_pkg_ver()
  19. return REG_GET_FIELD(EFUSE_RD_MAC_SPI_SYS_4_REG, EFUSE_PKG_VERSION);
  20. }