shizacat opened a new issue, #14816:
URL: https://github.com/apache/nuttx/issues/14816

   ### Description
   
   Hello. I trying to read value from ADC, but have something problem.
   1) Added this code, without it don't get anything. It always returns the 
same value, regardless of the applied voltage to the pin.
   
   ```
     /* 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);
   ```
   in here: 
https://github.com/apache/nuttx/blob/master/arch/xtensa/src/esp32s3/esp32s3_adc.c#L441
   
   2) After, I got the value from ADC, but happed something strange, the 
voltage on pin drop down.
   I understand what happen. Please help!
   
   Board: ESP32-S3 dev kit
   
   Board connect
   
![img1](https://github.com/user-attachments/assets/0e5316dd-e20c-4cf1-91c1-5361f1e013ec)
   The voltage on pin before read.
   
![img3](https://github.com/user-attachments/assets/db9ae3af-618f-48ce-b07c-9aa3f2f2f31c)
   The voltage on pin after read.
   
![img2](https://github.com/user-attachments/assets/cb09bd47-fbf2-4175-9e9e-6724245d6a46)
   
   Configuration: ./tools/configure.sh -m esp32s3-devkit:adc
   
   Console
   ```
   # on pin 3V before read
   nsh> adc -n 2
   Sample:
   1: channel: 0 value: 1727
   Sample:
   1: channel: 0 value: 1534
   nsh>
   ```
   
   ### Verification
   
   - [X] I have verified before submitting the report.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to