Skip to content

Commit

Permalink
Merge branch 'bugfix/fix_adc_cali_workround_wrong_range_v5.1' into 'r…
Browse files Browse the repository at this point in the history
…elease/v5.1'

fix(regi2c): wrong ADC_CALI_PD_WORKAROUND on c6, h2 (v5.1)

See merge request espressif/esp-idf!24747
  • Loading branch information
suda-morris committed Jul 13, 2023
2 parents adc2bf1 + 6acc155 commit cfa70ab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 deletions.
7 changes: 2 additions & 5 deletions components/esp_hw_support/regi2c_ctrl.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2020-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -79,7 +79,7 @@ void IRAM_ATTR regi2c_analog_cali_reg_write(void)
regi2c_ctrl_write_reg(I2C_SAR_ADC, I2C_SAR_ADC_HOSTID, i, reg_val[i]);
}
}

#endif //#if ADC_CALI_PD_WORKAROUND

/**
* REGI2C_SARADC reference count
Expand Down Expand Up @@ -109,6 +109,3 @@ void regi2c_saradc_disable(void)
regi2c_exit_critical();

}


#endif //#if ADC_CALI_PD_WORKAROUND
10 changes: 1 addition & 9 deletions components/soc/esp32c6/include/soc/regi2c_defs.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -27,11 +27,3 @@
#define ANA_CONFIG2_M BIT(18)

#define ANA_I2C_SAR_FORCE_PU BIT(16)


/**
* Restore regi2c analog calibration related configuration registers.
* This is a workaround, and is fixed on later chips
*/
#define REGI2C_ANA_CALI_PD_WORKAROUND 1
#define REGI2C_ANA_CALI_BYTE_NUM 8
7 changes: 0 additions & 7 deletions components/soc/esp32h2/include/soc/regi2c_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,3 @@
#define ANA_CONFIG2_M BIT(18)

#define ANA_I2C_SAR_FORCE_PU BIT(16)

/**
* Restore regi2c analog calibration related configuration registers.
* This is a workaround, and is fixed on later chips
*/
#define REGI2C_ANA_CALI_PD_WORKAROUND 1
#define REGI2C_ANA_CALI_BYTE_NUM 8

0 comments on commit cfa70ab

Please sign in to comment.