-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HELP] ESP32-S3 Don't work ADC #14816
Comments
@shizacat thanks for finding this issue and reporting it here! @tmedicci @fdcavalcanti @eren-terzioglu |
Thanks for the report. I'll look into this. |
@shizacat Please share what NuttX version you are running.
|
@fdcavalcanti
Yes, I tested on ADC Channel 0,1,2, the voltage behavior on the pin was the same.
It stays low while the device is open. Steps:
|
@shizacat thanks. I did a quick test here without your RTC control modifications. The voltage is indeed returning a bad value. If I hold the ADC pin to 3v3 or GND I can see it changes 1 or 2 mV, which is not ok. Maybe some bad equation or calibration related? Also, measured with a voltmeter and it is not dropping as you showed. The difference when using the RTC code you suggested is that maybe something is not being properly shutdown, and it is externalizing that 1.4 V value, which is different than halving the input voltage. Weird anyway. Unfortunately we are not supporting register-based drivers anymore, we are now using the HAL approach. So I won't be able to go investigate this issue further. |
@fdcavalcanti maybe @nuttxs could take a look, he added this driver. As I remember the idea was to keep Xtensa as proper driver and new RISC (ESP32-C3/C6, etc) will use the HAL. |
@fdcavalcanti Thank you! |
@acassis It is not so easy to build - adc_oneshot.c.
esp-hal-3rdparty - how can I make changes there (send MR). There are also questions about the changes themselves, example:
And in general, I'm not sure if I'm moving in the right direction. Could you help, how to do it correctly (may be it is not necessary to do this and someone is already doing it). |
Hi @shizacat. That's would be a nice contribution! To accomplish this, you need to use other similar features as example. Since you are using Xtensa, take a look at Looking at the A similar question was asked regarding power management a couple of months ago. @tmedicci answered this on this thread. You will see that we use a specific branch of the Please take a look at the links I showed and use one of the features as an example. |
@shizacat I think if you get it working without using the 3rd-party-hal it will be better. ESP32 support was implemented in the standard registers description, as Greg Nutt did for all others MCUs. Using the HAL is good because Espressif can add support faster to new chips on NuttX, but is has this drawbacks, as it adds an external dependency. |
Description
Hello. I trying to read value from ADC, but have something problem.
in here: https://github.com/apache/nuttx/blob/master/arch/xtensa/src/esp32s3/esp32s3_adc.c#L441
I understand what happen. Please help!
Board: ESP32-S3 dev kit
Board connect
The voltage on pin before read.
The voltage on pin after read.
Configuration: ./tools/configure.sh -m esp32s3-devkit:adc
Console
Verification
The text was updated successfully, but these errors were encountered: