mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
Merge branch 'feature/efuse_rev_major_minor' into 'master'
efuse: Adds major and minor versions See merge request espressif/esp-idf!18255
This commit is contained in:
@@ -12,8 +12,7 @@
|
||||
#include "hal/efuse_hal.h"
|
||||
#include "soc/syscon_reg.h"
|
||||
|
||||
|
||||
uint32_t efuse_hal_get_chip_revision(void)
|
||||
uint32_t efuse_hal_get_major_chip_version(void)
|
||||
{
|
||||
uint8_t eco_bit0 = efuse_ll_get_chip_ver_rev1();
|
||||
uint8_t eco_bit1 = efuse_ll_get_chip_ver_rev2();
|
||||
@@ -45,6 +44,11 @@ uint32_t efuse_hal_get_chip_revision(void)
|
||||
return chip_ver;
|
||||
}
|
||||
|
||||
uint32_t efuse_hal_get_minor_chip_version(void)
|
||||
{
|
||||
return efuse_ll_get_chip_wafer_version_minor();
|
||||
}
|
||||
|
||||
uint32_t efuse_hal_get_rated_freq_mhz(void)
|
||||
{
|
||||
//Check if ESP32 is rated for a CPU frequency of 160MHz only
|
||||
|
@@ -16,11 +16,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief get chip version
|
||||
*/
|
||||
uint32_t efuse_hal_get_chip_revision(void);
|
||||
|
||||
/**
|
||||
* @brief get rated frequency in MHz
|
||||
*/
|
||||
|
@@ -98,16 +98,29 @@ __attribute__((always_inline)) static inline uint32_t efuse_ll_get_chip_ver_pkg(
|
||||
return (pkg_version_4bit << 3) | pkg_version;
|
||||
}
|
||||
|
||||
// use efuse_hal_get_major_chip_version() to get full major chip version
|
||||
__attribute__((always_inline)) static inline bool efuse_ll_get_chip_ver_rev1(void)
|
||||
{
|
||||
return REG_GET_BIT(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_REV1);
|
||||
}
|
||||
|
||||
// use efuse_hal_get_major_chip_version() to get full major chip version
|
||||
__attribute__((always_inline)) static inline bool efuse_ll_get_chip_ver_rev2(void)
|
||||
{
|
||||
return REG_GET_BIT(EFUSE_BLK0_RDATA5_REG, EFUSE_RD_CHIP_VER_REV2);
|
||||
}
|
||||
|
||||
// use efuse_hal_get_minor_chip_version() to get minor chip version
|
||||
__attribute__((always_inline)) static inline uint32_t efuse_ll_get_chip_wafer_version_minor(void)
|
||||
{
|
||||
return REG_GET_FIELD(EFUSE_BLK0_RDATA5_REG, EFUSE_RD_WAFER_VERSION_MINOR);
|
||||
}
|
||||
|
||||
__attribute__((always_inline)) static inline bool efuse_ll_get_disable_wafer_version_major(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
__attribute__((always_inline)) static inline uint32_t efuse_ll_get_coding_scheme(void)
|
||||
{
|
||||
return REG_GET_FIELD(EFUSE_BLK0_RDATA6_REG, EFUSE_CODING_SCHEME);
|
||||
|
Reference in New Issue
Block a user