mirror of
https://github.com/espressif/esp-idf.git
synced 2026-07-14 06:53:05 +03:00
Fixes startup of app for case: bootloader with 40Mhz and app with 80Mhz (ESPTOOLPY_FLASHFREQ) Closes https://github.com/espressif/esp-idf/issues/9156
22 lines
597 B
C
22 lines
597 B
C
/*
|
|
* SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <stdint.h>
|
|
#include "soc/efuse_reg.h"
|
|
#include "esp_attr.h"
|
|
|
|
IRAM_ATTR uint8_t bootloader_common_get_chip_revision(void)
|
|
{
|
|
// should return the same value as esp_efuse_get_chip_ver()
|
|
return REG_GET_FIELD(EFUSE_RD_MAC_SPI_SYS_3_REG, EFUSE_WAFER_VERSION);
|
|
}
|
|
|
|
IRAM_ATTR uint32_t bootloader_common_get_chip_ver_pkg(void)
|
|
{
|
|
// should return the same value as esp_efuse_get_pkg_ver()
|
|
return REG_GET_FIELD(EFUSE_RD_MAC_SPI_SYS_3_REG, EFUSE_PKG_VERSION);
|
|
}
|