Closed alport closed 4 years ago
Hi Mike, Drat! It looks like you're running into some strange download problem with the binary file on my Google Driver folder.
Here is the same binary file inside the zip file linked below. It is based on MicroPython v1.11. Please try to load it onto your board and see if you can get it working. esp32spiram-i2s-20191022-v1.11.zip
Hi Mike, No, I think your .bin file was OK after all - problem on my side. OK, Ive loaded it onto an ESP32 and get the log below after boot. Could be a problem with the SPIram - does that require an external SPIram SD? All the .bins I have used so far have not been the SPIram versions. I also have a question about the pins - which I will send in a following comment. Here is the boot dump:
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT) ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x17 (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:0x3fff0018,len:4 load:0x3fff001c,len:4880 ho 0 tail 12 room 4 load:0x40078000,len:10532 load:0x40080400,len:6736 entry 0x400806f0 I (552) psram: This chip is ESP32-D0WD E (552) spiram: SPI RAM enabled but initialization failed. Bailing out. I (552) cpu_start: Failed to init external RAM; continuing without it. I (559) cpu_start: Pro cpu up. I (563) cpu_start: Application information: I (568) cpu_start: Compile time: Oct 22 2019 08:18:54 I (574) cpu_start: ELF file SHA256: 0000000000000000... I (580) cpu_start: ESP-IDF: v3.3 I (585) cpu_start: Starting app cpu, entry point is 0x40085790 I (0) cpu_start: App cpu up. I (595) heap_init: Initializing. RAM available for dynamic allocation: I (602) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (608) heap_init: At 3FFBA690 len 00025970 (150 KiB): DRAM I (614) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (621) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (627) heap_init: At 4009716C len 00008E94 (35 KiB): IRAM I (633) cpu_start: Pro cpu start user code I (316) cpu_start: Chip Revision: 0 I (317) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. E (40) spiram: SPI RAM not initialized I (320) I2S: DMA Malloc info, datalen=blocksize=1024, dma_buf_count=8 I (320) I2S: PLL_D2: Req RATE: 16000, real rate: 16025.000, BITS: 16, CLKM: 39, BCK: 8, MCLK: 4096000.000, SCLK: 512800.000000, diva: 64, divb: 4
In your example file: play-mono-wav.py you give the pin definitions as:
bck_pin = Pin(32)
ws_pin = Pin(33)
sdout_pin = Pin(25)
But I am using the Adafruit breakount board: https://www.adafruit.com/product/3006 where the pins are labelled LRC, BCLK &DIN So what pins should I use: bck_pin = Pin(32) >>BCLK ws_pin = Pin(33) >>LRC sdout_pin = Pin(25) >>DIN Is that correct?
You seem to be using the same pin names for the amplifier output and the microphone input examples which makes it a bit confusing.
Update: Now loaded onto another ESP32 - seems to be running fine - getting believable pulses on the pins - as viewed on a scope. So may take a best guess on the pin allocation and connect up the MAX98357A. stand by ...
OK, getting some speech - using my suggested pin allocation. But there is also a lot of background hiss - and the speech itself is noisy - need to play with the gain and perhaps also generate a single frequency .wav file.
Could be a problem with the SPIram - does that require an external SPIram SD?
Yes-that is the problem. The binary was built for an ESP32 module with external spiram.
Here is a new up-to-date binary that will run on an ESP32 module with no external spiram. esp32-i2s-2020-05-13-v1-12.zip
OK, getting some speech - using my suggested pin allocation. But there is also a lot of background hiss - and the speech itself is noisy
Great! When I use this Adafruit module on a breadboard I also get a lot of noise. I get the best results when I connect the ESP32 to the MAX98357A module using soldered connections, for example, using an Adafruit Perma-Proto board, https://www.adafruit.com/product/1609
Hi Mike, I am trying to run your I2S example on a ESP32 for audio output on the Max98357. Currently I am struggling to load your I2S library: from machine import I2S. I am running the current micropython V1.12 (micropython.org). I have come across your bin: esp32spiram-i2s-20191022-v1.11.bin but was surprised to see it was only 11k, rather than a full micropython .bin. So, my question is: what is the easiest way to make your I2S available? Thanks, Mike