forked from espressif/esp-idf
Merge branch 'bugfix/adds_iram_attr_for_efuse_apis_v4.3' into 'release/v4.3'
bootloader_efuse: Adds IRAM_ATTR for efuse API (v4.3) See merge request espressif/esp-idf!18562
This commit is contained in:
@@ -16,8 +16,9 @@
|
|||||||
#include "bootloader_clock.h"
|
#include "bootloader_clock.h"
|
||||||
#include "soc/efuse_reg.h"
|
#include "soc/efuse_reg.h"
|
||||||
#include "soc/apb_ctrl_reg.h"
|
#include "soc/apb_ctrl_reg.h"
|
||||||
|
#include "esp_attr.h"
|
||||||
|
|
||||||
uint8_t bootloader_common_get_chip_revision(void)
|
IRAM_ATTR uint8_t bootloader_common_get_chip_revision(void)
|
||||||
{
|
{
|
||||||
uint8_t eco_bit0, eco_bit1, eco_bit2;
|
uint8_t eco_bit0, eco_bit1, eco_bit2;
|
||||||
eco_bit0 = (REG_READ(EFUSE_BLK0_RDATA3_REG) & 0xF000) >> 15;
|
eco_bit0 = (REG_READ(EFUSE_BLK0_RDATA3_REG) & 0xF000) >> 15;
|
||||||
@@ -45,7 +46,7 @@ uint8_t bootloader_common_get_chip_revision(void)
|
|||||||
return chip_ver;
|
return chip_ver;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t bootloader_common_get_chip_ver_pkg(void)
|
IRAM_ATTR uint32_t bootloader_common_get_chip_ver_pkg(void)
|
||||||
{
|
{
|
||||||
uint32_t pkg_version = REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_PKG);
|
uint32_t pkg_version = REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_PKG);
|
||||||
uint32_t pkg_version_4bit = REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_PKG_4BIT);
|
uint32_t pkg_version_4bit = REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_PKG_4BIT);
|
||||||
|
@@ -14,14 +14,15 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "soc/efuse_reg.h"
|
#include "soc/efuse_reg.h"
|
||||||
|
#include "esp_attr.h"
|
||||||
|
|
||||||
uint8_t bootloader_common_get_chip_revision(void)
|
IRAM_ATTR uint8_t bootloader_common_get_chip_revision(void)
|
||||||
{
|
{
|
||||||
// should return the same value as esp_efuse_get_chip_ver()
|
// 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);
|
return REG_GET_FIELD(EFUSE_RD_MAC_SPI_SYS_3_REG, EFUSE_WAFER_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t bootloader_common_get_chip_ver_pkg(void)
|
IRAM_ATTR uint32_t bootloader_common_get_chip_ver_pkg(void)
|
||||||
{
|
{
|
||||||
// should return the same value as esp_efuse_get_pkg_ver()
|
// 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);
|
return REG_GET_FIELD(EFUSE_RD_MAC_SPI_SYS_3_REG, EFUSE_PKG_VERSION);
|
||||||
|
@@ -16,15 +16,16 @@
|
|||||||
#include "bootloader_clock.h"
|
#include "bootloader_clock.h"
|
||||||
#include "bootloader_common.h"
|
#include "bootloader_common.h"
|
||||||
#include "soc/efuse_reg.h"
|
#include "soc/efuse_reg.h"
|
||||||
|
#include "esp_attr.h"
|
||||||
|
|
||||||
uint8_t bootloader_common_get_chip_revision(void)
|
IRAM_ATTR uint8_t bootloader_common_get_chip_revision(void)
|
||||||
{
|
{
|
||||||
// should return the same value as esp_efuse_get_chip_ver()
|
// 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);
|
return REG_GET_FIELD(EFUSE_RD_MAC_SPI_SYS_3_REG, EFUSE_WAFER_VERSION);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t bootloader_common_get_chip_ver_pkg(void)
|
IRAM_ATTR uint32_t bootloader_common_get_chip_ver_pkg(void)
|
||||||
{
|
{
|
||||||
// should return the same value as esp_efuse_get_pkg_ver()
|
// should return the same value as esp_efuse_get_pkg_ver()
|
||||||
return REG_GET_FIELD(EFUSE_RD_MAC_SPI_SYS_4_REG, EFUSE_PKG_VERSION);
|
return REG_GET_FIELD(EFUSE_RD_MAC_SPI_SYS_4_REG, EFUSE_PKG_VERSION);
|
||||||
|
@@ -13,15 +13,16 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include "esp_attr.h"
|
||||||
|
|
||||||
uint8_t bootloader_common_get_chip_revision(void)
|
IRAM_ATTR uint8_t bootloader_common_get_chip_revision(void)
|
||||||
{
|
{
|
||||||
// should return the same value as esp_efuse_get_chip_ver()
|
// should return the same value as esp_efuse_get_chip_ver()
|
||||||
/* No other revisions for ESP32-S3 */
|
/* No other revisions for ESP32-S3 */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t bootloader_common_get_chip_ver_pkg(void)
|
IRAM_ATTR uint32_t bootloader_common_get_chip_ver_pkg(void)
|
||||||
{
|
{
|
||||||
// should return the same value as esp_efuse_get_pkg_ver()
|
// should return the same value as esp_efuse_get_pkg_ver()
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user