-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
analogRead() returns bogus values when i2s DAC running #4782
Comments
Problematic analog pins 2 and 4 are ADC2, while working pin 35 is ADC1, so i guess this affects whole ADC2. |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions. |
Not sure if this stale bot thing is useful... "let's just pretend problem doesn't exist because it was reported more than 5 months ago". Also the first notice is considered a spam by gmail, so there wasn't even a warning. |
There are many issue reports that are left abandoned by their submitter. The stale bot is there to take care of those. It's enough to just chime-in a message if the bot puts "stale" flag and the issue will be un-staled. We will also get an email that an issue is still active, which let's us know that the problem described persists and that there is someone on the other end. |
[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future. |
1 similar comment
[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future. |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
bump |
[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future. |
@Harvie Can you please give it a shot on v2.0.3-RC1? Thanks |
Hello @Harvie, I'm trying to understand your issue, can you please help me by answering a few questions?
|
Ahoj @PilnyTomas , Unfortunately as soon as i've enabled the I2S DMA, some of the analog inputs started giving me wrong values. |
Ahoj @Harvie, |
It was year ago, so i don't really remember, but certainly i had used whatewer default pins for I2S_NUM_0 are, because i always try to avoid pin remapping or muxing wherever possible and there was no reason to do so. |
Hi, I tried using analogRead with I2S installed and analog reads returned 0. |
Yes, but i don't have the esp32 board with me right now, i will find it and check again later. It was year ago, so perhaps the issue might be already resolved in recent arduino library... |
Alright, I will wait until you test it with the latest version (2.0.3-RC1) |
Hello. Pin usage: Pin Connection Environments : If you comment out "int unsigned value = analogRead(26);" in "dmaRead()", the pulse is output normally. ---- code ---- #include <driver/i2s.h> #define I2S_SAMPLE_RATE 1000 //1.2M void i2sInit() void dmaRead() { i2s_read(I2S_NUM_0, &buffer, sizeof(buffer), &bytes_read, 15); for(int i = 0; i < 512; i ++){ //Analog void setup() { //PWM //I2S //analogRead ADC2_Ch9 void loop() { |
Please refer to the Installing guide and use the second link containing development versions: |
folks, any chance you gave this a shot? Thanks! |
Closing this as expired. If it's needed, you can reopen the issue. |
bump
|
Hello, i have issues with
analogRead()
when running DMA for I2S DAC. To be honest i don't understand why running external DAC messes up internal ADC. But it surely is problem:Is there any chance to get proper ADC readings on all analog pins without shutting down I2S entirely? (this would cause audio glitching, so it is not possible)
The text was updated successfully, but these errors were encountered: