Skip to content
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

DMA ADC Read Failed On Connection to AP when in WiFi STA (station) mode (IDFGH-2168) #4322

Closed
wammaw1314 opened this issue Nov 12, 2019 · 7 comments
Labels
Status: Done Issue is done internally

Comments

@wammaw1314
Copy link

My problem is basically the same as #3714, but there are some supplements.

Environment

  • Development Kit: ESP32-DevKitC
  • Module or chip used: ESP32-WROOM-32
  • IDF version (run git describe --tags to find it):
    v4.1-dev-815-ga45e998-dirty
  • Build System: Make
  • Compiler version (run xtensa-esp32-elf-gcc --version to find it):
    xtensa-esp32-elf-gcc (crosstool-NG esp32-2019r1) 8.2.0
  • Operating System: Linux
  • Power Supply: USB

Problem Description

When acquiring ADC data through DMA transfers and the device is in station mode (WIFI_MODE_STA). As the device connects to the AP, the ADC DMA buffer ceases to show valid data and continues to read (a probably random) fixed value.
I experimented with #3714 and added this line of code during WiFi initialization: esp_wifi_set_ps(WIFI_PS_NONE);

Get the following results:

  1. The DMA ADC can read the normal value without restarting the device.
  2. After executing esp_restart();, the device DMA ADC is read only as a zero value.
  3. If the device is reset by resetting the IO via ESP32, the result is normal.

Code to reproduce this issue

The full code
Copy your ESP_IDF example structure:
examples\peripherals\i2s_adc_dac\main\app_main.c
and replace everything in app_main.c with this:
app_main.zip

Debug Logs

Program running debugging log is as follows:
I2S-DMA-ADC-WiFi-Reboot-log.txt

I hope to get your help, thank you !

@github-actions github-actions bot changed the title DMA ADC Read Failed On Connection to AP when in WiFi STA (station) mode DMA ADC Read Failed On Connection to AP when in WiFi STA (station) mode (IDFGH-2168) Nov 12, 2019
@negativekelvin
Copy link
Contributor

Did you see the comment #3973 (comment) ?

@wammaw1314
Copy link
Author

@negativekelvin Thanks, I saw it. I am using the latest master branch, so now I have to wait for the fix to be ready, right?

@negativekelvin
Copy link
Contributor

Right

@koobest
Copy link
Contributor

koobest commented Nov 18, 2019

@wammaw1314
The patch to solve this issue has been added to the master branch, please help test it :)
(https://github.com/espressif/esp-idf/blob/master/components/bootloader_support/src/bootloader_random.c)

thanks !!

@negativekelvin
Copy link
Contributor

ba72de2

@original-standard
Copy link

I'm in the same situation with the bluetooth connection.
Can the WIFI_PS_NONE mode help with my problem?

0xFEEDC0DE64 pushed a commit to 0xFEEDC0DE64/esp-idf that referenced this issue May 5, 2021
@espressif-bot espressif-bot added the Status: Done Issue is done internally label May 7, 2021
@tom-borcin
Copy link
Collaborator

Hi @wammaw1314,

we think the issue is fixed now and therefore we are closing it to keep our backlog manageable. If you don't agree with this decision, please let me know.

Thank you,

Tomas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

6 participants