Skip to content

Commit

Permalink
fix(rng): avoid clearing PMU_PERIF_I2C_RSTB in random disable API f…
Browse files Browse the repository at this point in the history
…or C6

This configuration bit is required for ADC operation as well and hence
should not be cleared in the RNG API sequence.

Ideally, the ADC driver should take care of initializing this bit but
still the RNG layer change is required because of interleaved API usage
scenario described in following linked issue.

Closes #14124
Closes #14280
  • Loading branch information
mahavirj committed Aug 12, 2024
1 parent b7ed2b5 commit 2babada
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions components/bootloader_support/src/bootloader_random_esp32c6.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ void bootloader_random_disable(void)
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC1_ENCAL_REF_ADDR, 0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC2_ENCAL_REF_ADDR, 0);

// Revert PMU_RF_PWC_REG to it's initial value
CLEAR_PERI_REG_MASK(PMU_RF_PWC_REG, PMU_PERIF_I2C_RSTB);

// disable ADC_CTRL_CLK (SAR ADC function clock)
REG_WRITE(PCR_SARADC_CLKM_CONF_REG, 0x00404000);

Expand Down

0 comments on commit 2babada

Please sign in to comment.