mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/fix_ocode_check_on_c6' into 'master'
adc_cali: fix the condition of ocode calibration See merge request espressif/esp-idf!23916
This commit is contained in:
commit
8c2b709817
@ -19,10 +19,8 @@
|
||||
|
||||
int esp_efuse_rtc_calib_get_ver(void)
|
||||
{
|
||||
uint32_t blk_ver = efuse_hal_blk_version();
|
||||
|
||||
uint32_t cali_version = 0;
|
||||
if (blk_ver > 0) {
|
||||
if (efuse_hal_blk_version() >= 1) {
|
||||
cali_version = ESP_EFUSE_ADC_CALIB_VER;
|
||||
} else {
|
||||
ESP_LOGW("eFuse", "calibration efuse version does not match, set default version to 0");
|
||||
|
@ -78,20 +78,8 @@ static void calibrate_ocode(void)
|
||||
|
||||
void esp_ocode_calib_init(void)
|
||||
{
|
||||
bool ignore_major = efuse_ll_get_disable_blk_version_major();
|
||||
uint32_t blk_version = efuse_hal_blk_version();
|
||||
|
||||
uint8_t ocode_scheme_ver = 0;
|
||||
if(blk_version == 0 && !ignore_major) {
|
||||
ESP_HW_LOGE(TAG, "Invalid blk_version\n");
|
||||
abort();
|
||||
}
|
||||
if(blk_version > 0) {
|
||||
ocode_scheme_ver = 1;
|
||||
}
|
||||
|
||||
if (ocode_scheme_ver == 1) {
|
||||
set_ocode_by_efuse(ocode_scheme_ver);
|
||||
if (efuse_hal_blk_version() >= 1) {
|
||||
set_ocode_by_efuse(1);
|
||||
} else {
|
||||
calibrate_ocode();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user