forked from espressif/esp-idf
feat(rng): add comment of reserved channel in RNG
This commit is contained in:
@ -30,11 +30,11 @@ void bootloader_random_enable(void)
|
|||||||
adc_digi_pattern_config_t pattern_config = {};
|
adc_digi_pattern_config_t pattern_config = {};
|
||||||
pattern_config.unit = ADC_UNIT_1;
|
pattern_config.unit = ADC_UNIT_1;
|
||||||
pattern_config.atten = ADC_ATTEN_DB_12;
|
pattern_config.atten = ADC_ATTEN_DB_12;
|
||||||
pattern_config.channel = ADC_CHANNEL_7;
|
pattern_config.channel = ADC_CHANNEL_7; //Use reserved channel to get internal voltage
|
||||||
adc_ll_digi_set_pattern_table(ADC_UNIT_1, 0, pattern_config);
|
adc_ll_digi_set_pattern_table(ADC_UNIT_1, 0, pattern_config);
|
||||||
pattern_config.unit = ADC_UNIT_2;
|
pattern_config.unit = ADC_UNIT_2;
|
||||||
pattern_config.atten = ADC_ATTEN_DB_12;
|
pattern_config.atten = ADC_ATTEN_DB_12;
|
||||||
pattern_config.channel = ADC_CHANNEL_1;
|
pattern_config.channel = ADC_CHANNEL_1; //Use reserved ADC2 and reserved channel to get internal voltage
|
||||||
adc_ll_digi_set_pattern_table(ADC_UNIT_2, 1, pattern_config);
|
adc_ll_digi_set_pattern_table(ADC_UNIT_2, 1, pattern_config);
|
||||||
|
|
||||||
adc_ll_digi_set_pattern_table_len(ADC_UNIT_1, 2);
|
adc_ll_digi_set_pattern_table_len(ADC_UNIT_1, 2);
|
||||||
|
@ -30,11 +30,11 @@ void bootloader_random_enable(void)
|
|||||||
adc_digi_pattern_config_t pattern_config = {};
|
adc_digi_pattern_config_t pattern_config = {};
|
||||||
pattern_config.unit = ADC_UNIT_2;
|
pattern_config.unit = ADC_UNIT_2;
|
||||||
pattern_config.atten = ADC_ATTEN_DB_2_5;
|
pattern_config.atten = ADC_ATTEN_DB_2_5;
|
||||||
pattern_config.channel = ADC_CHANNEL_1;
|
pattern_config.channel = ADC_CHANNEL_1; //Use reserved channel to get internal voltage
|
||||||
adc_ll_digi_set_pattern_table(ADC_UNIT_1, 0, pattern_config);
|
adc_ll_digi_set_pattern_table(ADC_UNIT_1, 0, pattern_config);
|
||||||
pattern_config.unit = ADC_UNIT_2;
|
pattern_config.unit = ADC_UNIT_2;
|
||||||
pattern_config.atten = ADC_ATTEN_DB_2_5;
|
pattern_config.atten = ADC_ATTEN_DB_2_5;
|
||||||
pattern_config.channel = ADC_CHANNEL_1;
|
pattern_config.channel = ADC_CHANNEL_1; //Use reserved ADC2 and reserved channel to get internal voltage
|
||||||
adc_ll_digi_set_pattern_table(ADC_UNIT_2, 1, pattern_config);
|
adc_ll_digi_set_pattern_table(ADC_UNIT_2, 1, pattern_config);
|
||||||
adc_ll_digi_set_pattern_table_len(ADC_UNIT_2, 2);
|
adc_ll_digi_set_pattern_table_len(ADC_UNIT_2, 2);
|
||||||
|
|
||||||
|
@ -30,11 +30,11 @@ void bootloader_random_enable(void)
|
|||||||
adc_digi_pattern_config_t pattern_config = {};
|
adc_digi_pattern_config_t pattern_config = {};
|
||||||
pattern_config.unit = ADC_UNIT_1;
|
pattern_config.unit = ADC_UNIT_1;
|
||||||
pattern_config.atten = ADC_ATTEN_DB_12;
|
pattern_config.atten = ADC_ATTEN_DB_12;
|
||||||
pattern_config.channel = ADC_CHANNEL_7;
|
pattern_config.channel = ADC_CHANNEL_7; //Use reserved channel to get internal voltage
|
||||||
adc_ll_digi_set_pattern_table(ADC_UNIT_1, 0, pattern_config);
|
adc_ll_digi_set_pattern_table(ADC_UNIT_1, 0, pattern_config);
|
||||||
pattern_config.unit = ADC_UNIT_2;
|
pattern_config.unit = ADC_UNIT_2;
|
||||||
pattern_config.atten = ADC_ATTEN_DB_12;
|
pattern_config.atten = ADC_ATTEN_DB_12;
|
||||||
pattern_config.channel = ADC_CHANNEL_1;
|
pattern_config.channel = ADC_CHANNEL_1; //Use reserved ADC2 and reserved channel to get internal voltage
|
||||||
adc_ll_digi_set_pattern_table(ADC_UNIT_2, 1, pattern_config);
|
adc_ll_digi_set_pattern_table(ADC_UNIT_2, 1, pattern_config);
|
||||||
adc_ll_digi_set_pattern_table_len(ADC_UNIT_1, 2);
|
adc_ll_digi_set_pattern_table_len(ADC_UNIT_1, 2);
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ void bootloader_random_enable(void)
|
|||||||
adc_ll_digi_set_pattern_table(ADC_UNIT_1, 0, pattern_config);
|
adc_ll_digi_set_pattern_table(ADC_UNIT_1, 0, pattern_config);
|
||||||
pattern_config.unit = ADC_UNIT_2;
|
pattern_config.unit = ADC_UNIT_2;
|
||||||
pattern_config.atten = ADC_ATTEN_DB_2_5;
|
pattern_config.atten = ADC_ATTEN_DB_2_5;
|
||||||
pattern_config.channel = ADC_CHANNEL_1;
|
pattern_config.channel = ADC_CHANNEL_1; //Use reserved ADC2 and reserved channel to get internal voltage
|
||||||
adc_ll_digi_set_pattern_table(ADC_UNIT_2, 1, pattern_config);
|
adc_ll_digi_set_pattern_table(ADC_UNIT_2, 1, pattern_config);
|
||||||
adc_ll_digi_set_pattern_table_len(ADC_UNIT_1, 1);
|
adc_ll_digi_set_pattern_table_len(ADC_UNIT_1, 1);
|
||||||
|
|
||||||
|
@ -896,7 +896,7 @@ static inline void adc_ll_set_ent_param(uint32_t param)
|
|||||||
__attribute__((always_inline))
|
__attribute__((always_inline))
|
||||||
static inline void adc_ll_enable_calibration_ref(adc_unit_t adc_n, bool en)
|
static inline void adc_ll_enable_calibration_ref(adc_unit_t adc_n, bool en)
|
||||||
{
|
{
|
||||||
//C6 doesn't support ADC2, here is for backward compatibility for RNG
|
//C5 doesn't support ADC2, here is for backward compatibility for RNG
|
||||||
if (adc_n == ADC_UNIT_1) {
|
if (adc_n == ADC_UNIT_1) {
|
||||||
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC1_EN_TOUT_ADDR, en);
|
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC1_EN_TOUT_ADDR, en);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user