version: Fix missed version checks

This commit is contained in:
KonstantinKondrashov
2023-03-03 21:29:09 +08:00
committed by Xiao Xufeng
parent f368737a26
commit ab87a1012f
2 changed files with 3 additions and 2 deletions

View File

@ -38,6 +38,7 @@
#include "esp_attr.h" #include "esp_attr.h"
#include "esp_log.h" #include "esp_log.h"
#include "esp_pm.h" #include "esp_pm.h"
#include "soc/chip_revision.h"
#include "hal/efuse_hal.h" #include "hal/efuse_hal.h"
#include "esp_rom_gpio.h" #include "esp_rom_gpio.h"
@ -192,7 +193,7 @@ static float i2s_apll_get_fi2s(int bits_per_sample, int sdm0, int sdm1, int sdm2
#if CONFIG_IDF_TARGET_ESP32 #if CONFIG_IDF_TARGET_ESP32
/* ESP32 rev0 silicon issue for APLL range/accuracy, please see ESP32 ECO document for more information on this */ /* ESP32 rev0 silicon issue for APLL range/accuracy, please see ESP32 ECO document for more information on this */
if (efuse_hal_get_major_chip_version() == 0) { if (!ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(), 100)) {
sdm0 = 0; sdm0 = 0;
sdm1 = 0; sdm1 = 0;
} }

View File

@ -288,7 +288,7 @@ void rtc_clk_apll_enable(bool enable, uint32_t sdm0, uint32_t sdm1, uint32_t sdm
if (enable) { if (enable) {
uint8_t sdm_stop_val_2 = APLL_SDM_STOP_VAL_2_REV1; uint8_t sdm_stop_val_2 = APLL_SDM_STOP_VAL_2_REV1;
if (efuse_hal_get_major_chip_version() == 0) { if (!ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(), 100)) {
sdm0 = 0; sdm0 = 0;
sdm1 = 0; sdm1 = 0;
sdm_stop_val_2 = APLL_SDM_STOP_VAL_2_REV0; sdm_stop_val_2 = APLL_SDM_STOP_VAL_2_REV0;