atomic14 / esp32-walkie-talkie

A Walkie-Talkie based around the ESP32 using UDP broadcast or ESP-NOW
MIT License
410 stars 108 forks source link

ADC sampling : second call to i2s_adc_enable() blocks the code #27

Open umesh-srushty opened 1 year ago

umesh-srushty commented 1 year ago

Environment:

Visual Studio Code : 1.74.0 Platform IO : 3.0.0 Platform: Espressif 32 version 6.0.0 Windows 10 pro Dev Kit : LILYGO Controller : ESP32 WROVER B

platform.ini file

[env:esp-wrover-kit]
framework = arduino
platform = espressif32
board = esp-wrover-kit
upload_port = COM10
; monitor_port = /dev/cu.SLAB_USBtoUART
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
build_flags = -Ofast -D `CORE_DEBUG_LEVEL=5

Problem Description:

In this program that uses the I2S from-ADC , I can only call i2s_adc_enable() once, second time in blocks in i2s_adc_enable and it never returns.

I am generating a sine wave from another board to GPIO35, Connected a button to GPIO 23.

Code Compiled successfully and attached screenshot below.

image_2023-02-04_171634420.

I have referred this similar issue link #https://github.com/espressif/esp-idf/issues/2964 but I couldn't get the exact solution.

Full Code link below.

esp32-walkie-talkie-main.zip

The adc code worked well with this author's another similar project #https://github.com/atomic14/esp32_audio/tree/master/i2s_sampling. This project executed well and raw audio file is stored in the respective location.

I compared both the project's adc read code, everything looks same, but the I couldn't get the code running.

FedericoBusero commented 1 year ago

It should be fixed now

umesh-srushty commented 4 months ago

Thanks @FedericoBusero, I will check and let you know the feedback.