ESP32-S3 ADC1 drop down the voltage when read value (NuttX only)
Posted: Sat Nov 16, 2024 8:17 am
Hello!
Please help me. I don't understand what happen.
I'm reading the value from ADC1, but at the moment I'm trying to read the value, the voltage on the pin to be dropping.
Usage os NuttX: 12.7.0. On Arduino all work fine.
I tried to compare registers with arduino, but all same...
Board: ESP32-S3 devkit
OS: NuttX
adc mode: one short
Link on driver adc on nuttx: https://github.com/apache/nuttx/blob/ma ... 32s3_adc.c
I add only this code into 441 line (adc_samplecfg function):
Output from console:
Please help me. I don't understand what happen.
I'm reading the value from ADC1, but at the moment I'm trying to read the value, the voltage on the pin to be dropping.
Usage os NuttX: 12.7.0. On Arduino all work fine.
I tried to compare registers with arduino, but all same...
Board: ESP32-S3 devkit
OS: NuttX
adc mode: one short
Link on driver adc on nuttx: https://github.com/apache/nuttx/blob/ma ... 32s3_adc.c
I add only this code into 441 line (adc_samplecfg function):
- /* Select RTC control */
- regval = getreg32(SENS_SAR_MEAS1_MUX_REG);
- regval &= ~(SENS_SAR1_DIG_FORCE_M);
- // regval |= (0 << SENS_SAR1_DIG_FORCE_S); // 1: Select digital control; 0: Select RTC control.
- putreg32(regval, SENS_SAR_MEAS1_MUX_REG);
- nsh> adc -n 2
- Sample:
- 1: channel: 0 value: 1727
- Sample:
- 1: channel: 0 value: 1534