-
-
Notifications
You must be signed in to change notification settings - Fork 24
Closed
Description
I have the ESP32 Audio kit V2.2 and I am running this code:
#include <Arduino.h>
/**
* @brief We use a predefied board (AudioKitEs8388V1) and output_device a sine
* with the help of the AudioTools I2SCodecStream
* @author phil schatzmann
*/
#include "AudioTools.h" // install https://github.com/pschatzmann/arduino-audio-tools
#include "AudioLibs/I2SCodecStream.h"
AudioInfo info(44100, 2, 16);
SineWaveGenerator<int16_t> sineWave(32000);
GeneratedSoundStream<int16_t> sound(sineWave);
I2SCodecStream out(AudioKitEs8388V1);
StreamCopy copier(out, sound);
void setup()
{
// Setup logging
Serial.begin(115200);
AudioLogger::instance().begin(Serial, AudioLogger::Warning);
LOGLEVEL_AUDIODRIVER = AudioDriverWarning;
// start I2S & codec with i2c and i2s configured above
Serial.println("starting I2S...");
auto config = out.defaultConfig();
config.copyFrom(info);
out.begin(config);
// Setup sine wave
sineWave.begin(info, N_B4);
}
// Arduino loop - copy sound to out
void loop() { copier.copy(); }
on PlatformIO
with this platformio.ini
[platformio]
description = Audio Example
default_envs = esp32dev
[env:esp32dev]
platform = https://github.com/platformio/platform-espressif32.git
board = esp32dev
framework = arduino
lib_deps =
https://github.com/pschatzmann/arduino-audio-tools.git
https://github.com/pschatzmann/arduino-audio-driver.git
lib_ldf_mode = deep+
build_flags = -DCORE_DEBUG_LEVEL=5 -DAUDIOKIT_BOARD=5
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
Compile and upload work fine, but it keeps rebooting with this message :
ELF file SHA256: 11734f0e505573e4
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13232
load:0x40080400,len:3028
entry 0x400805e4
[ 23][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
starting I2S...
Warning: Pin '13' not set up because of conflict
[ 35][I][esp32-hal-i2c.c:75] i2cInit(): Initialising I2C Master: sda=33 scl=32 freq=100000
Error: ->p_wire->endTransmission: 2
Error: ES8388 not found on I2C address 10, check wiring
Error: AudioDriver::begin::init failed
Error: ->p_wire->endTransmission: 2
Error: ->p_wire->endTransmission: 2
Error: ->p_wire->endTransmission: 2
Error: ->p_wire->endTransmission: 2
Error: ->p_wire->endTransmission: 2
Error: ->p_wire->endTransmission: 2
[E] I2SCodecStream.h : 73 - virtual bool audio_tools::I2SCodecStream::begin()
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x400e1cda PS : 0x00060a30 A0 : 0x800d3f4b A1 : 0x3ffb2120
A2 : 0x00000000 A3 : 0x3ffba8a0 A4 : 0x00000400 A5 : 0x3ffb2160
A6 : 0xffffffff A7 : 0x3ffc2f24 A8 : 0x00000000 A9 : 0x3ffb2120
A10 : 0x3ffb2164 A11 : 0x00000010 A12 : 0x40ac101f A13 : 0x37354443
A14 : 0x00000000 A15 : 0x00000000 SAR : 0x0000001d EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000018 LBEG : 0x400029ac LEND : 0x400029cb LCOUNT : 0x00000000
Backtrace: 0x400e1cd7:0x3ffb2120 0x400d3f48:0x3ffb2160 0x400d3ff9:0x3ffb21d0 0x400d4039:0x3ffb21f0 0x400d5cd7:0x3ffb2210 0x400d5e90:0x3ffb2230 0x400d5fa6:0x3ffb2270 0x400de4a9:0x3ffb2290
ELF file SHA256: 11734f0e505573e4
Rebooting...
What am I doing wrong?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels