ctag-fh-kiel / ctag-straempler

An open source eurorack sample streaming and sound synthesis module.
Other
117 stars 21 forks source link

firmware crashes when trying to edit effects or cv matrix. #7

Closed thopman closed 4 years ago

thopman commented 4 years ago

firmware crashes when trying to edit effects or cv matrix. pretty much says it all. Firmware is the ready built version in the bin folder. When crashed the screen will freeze and all functionality stops.

ctag-fh-kiel commented 4 years ago

Thanks for reporting the issue, can you be a bit more specific, does it always crash on your system, immediately when you try to edit efx and / or cv matrix? (on my systems it works stable). What freesound sample are you manipulating? Or is it your own one?

thopman commented 4 years ago

i have no sample loaded. all i do is power up the module and play around in the effects section. As soon as i try to edit a parameter the screen freezes and becomes fully unresponsive. I have 2 modules, one working fine but was flashed via the vagrant esp-idf environment and compiled from the latest source and one flashed with the ./flash command in the bin folder. i have since deleted that vm so i used the compiled firmware.

ctag-fh-kiel commented 4 years ago

That's strange, I will test myself, the binary should be fine...

kooops commented 4 years ago

I have a similar issue: firmware will crashes whenever I enter a third level of the menu (for example trying to edit the type of gate). If I let the ctag runing without touching anything it'll be fine. However trying to read a sample either from the gate input or the switch will not launch anything. Trying to compile under the vagrant machine will return an error on the audio main.

ctag-fh-kiel commented 4 years ago

Ok, I will test the latest firmware asap... @kooops not beeing able to trigger sound like a cold solder point on the button?

ctag-fh-kiel commented 4 years ago

Ah, would it be possible for you to connect to the module with USB using the micro USB plug and get the monitor output? --> make monitor or idf.py monitor The output give some hints on the error...

kooops commented 4 years ago

I don't think It's a cold solder joint as I checked and this is just an example of its behaviour. In other word it will freeze consistently whenever I enter a subMenu. Here is the log from my terminal following a make (sorry if its a long paste ) App "smplr" version: v0.8-22-g8414af8-dirty CC build/audio/audio.o /home/vagrant/ctag-straempler/components/audio/audio.c:76:31: error: missing braces around initializer [-Werror=missing-braces] atomic_bool trigModeLatch[2] ={false, false}; ^ /home/vagrant/ctag-straempler/components/audio/audio.c: In function 'enableTrigModeLatch': /home/vagrant/ctag-straempler/components/audio/audio.c:946:24: error: incompatible types when assigning to type 'atomic_bool' {aka 'struct '} from type 'int' trigModeLatch[vid] = true; ^ /home/vagrant/ctag-straempler/components/audio/audio.c: In function 'disableTrigModeLatch': /home/vagrant/ctag-straempler/components/audio/audio.c:951:24: error: incompatible types when assigning to type 'atomic_bool' {aka 'struct '} from type 'int' trigModeLatch[vid] = false; ^ /home/vagrant/ctag-straempler/components/audio/audio.c: In function 'audio_task': /home/vagrant/ctag-straempler/components/audio/audio.c:1035:20: error: used struct type value where scalar is required if(trigModeLatch[vid]){ ^~~~~ cc1: some warnings being treated as errors /home/vagrant/esp-idf/make/component_wrapper.mk:289: recipe for target 'audio.o' failed make[1]: [audio.o] Error 1 /home/vagrant/esp-idf/make/project.mk:582: recipe for target 'component-audio-build' failed make: [component-audio-build] Error 2 any idea?

ctag-fh-kiel commented 4 years ago

This is the terminal output, when you are trying to compile the application. It seems you are not using gcc 8.2, see here https://github.com/ctag-fh-kiel/ctag-straempler/wiki/GettingStarted#setup-toolchain and here https://esp32.com/viewtopic.php?t=7400 What I meant is the the monitor output when you attach the module through the USB cable and then do "make monitor", that should connect with the module and then give real-time information, about the crash during run-time...

kooops commented 4 years ago

here is the output of a make simple monitor make simple_monitorToolchain path: /home/vagrant/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc WARNING: Toolchain version is not supported: esp32-2019r1-rc2 Expected to see version: crosstool-ng-1.22.0-80-g6c4433a Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk. WARNING: Compiler version is not supported: 8.2.0 Expected to see version(s): 5.2.0 Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk. Python requirements from /home/vagrant/esp-idf/requirements.txt are satisfied. --- forcing DTR inactive --- forcing RTS inactive --- Miniterm on /dev/ttyUSB0 115200,8,N,1 --- --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x1b (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:1 load:0x3fff0018,len:4 load:0x3fff001c,len:6436 load:0x40078000,len:10456 load:0x40080400,len:7068 entry 0x40080750 I (29) boot: ESP-IDF v4.0-dev-487-g784daf8 2nd stage bootloader I (29) boot: compile time 17:47:26 I (29) boot: Enabling RNG early entropy source... I (35) qio_mode: Enabling default flash chip QIO I (40) boot: SPI Speed : 80MHz I (44) boot: SPI Mode : QIO I (48) boot: SPI Flash Size : 16MB I (52) boot: Partition Table: I (56) boot: ## Label Usage Type ST Offset Length I (63) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (71) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (78) boot: 2 factory factory app 00 00 00010000 00200000 I (86) boot: End of partition table I (90) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x29b90 (170896) map I (145) esp_image: segment 1: paddr=0x00039bb8 vaddr=0x3ffb0000 size=0x06114 ( 24852) load I (152) esp_image: segment 2: paddr=0x0003fcd4 vaddr=0x40080000 size=0x0033c ( 828) load I (153) esp_image: segment 3: paddr=0x00040018 vaddr=0x400d0018 size=0xbf104 (782596) map I (371) esp_image: segment 4: paddr=0x000ff124 vaddr=0x4008033c size=0x000c4 ( 196) load I (372) esp_image: segment 5: paddr=0x000ff1f0 vaddr=0x40080400 size=0x16a34 ( 92724) load I (423) boot: Loaded app from partition at offset 0x10000 I (423) boot: Disabling RNG early entropy source... I (424) spiram: Found 64MBit SPI RAM device I (428) spiram: SPI RAM mode: flash 80m sram 80m I (434) spiram: PSRAM initialized, cache is in low/high (2-core) mode. I (441) cpu_start: Pro cpu up. I (445) cpu_start: Application information: I (450) cpu_start: Project name: smplr I (454) cpu_start: App version: v0.8-21-gd54f802-dirty I (461) cpu_start: Compile time: Jul 21 2019 17:47:37 I (467) cpu_start: ELF file SHA256: 4a55c6babb07d1bd... I (473) cpu_start: ESP-IDF: v4.0-dev-487-g784daf8 I (479) cpu_start: Starting app cpu, entry point is 0x400814f4 I (0) cpu_start: App cpu up. I (964) spiram: SPI SRAM memory test OK I (964) heap_init: Initializing. RAM available for dynamic allocation: I (964) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (970) heap_init: At 3FFC0B20 len 0001F4E0 (125 KiB): DRAM I (976) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (983) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (989) heap_init: At 40096E34 len 000091CC (36 KiB): IRAM I (995) cpu_start: Pro cpu start user code I (1000) spiram: Adding pool of 4096K of external SPI memory to heap allocator I (125) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (126) SD: Initializing SD card I (126) gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 Name: SMI
Type: SDHC/SDXC Speed: 40 MHz Size: 7680MB SPI: display device added to spi bus (1) SPI: attached display device, speed=8000000 SPI: bus uses native pins: false SPI: display init... OK SPI: Max rd speed = 8000000 SPI: Changed speed to 26666666 I (5136) gpio: GPIO[33]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:2 I (5136) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:2 I (5136) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:2 I (5146) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (5156) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (5166) AUDIO: Starting audio task I (5176) I2S: DMA Malloc info, datalen=blocksize=256, dma_buf_count=4 I (5176) I2S: DMA Malloc info, datalen=blocksize=256, dma_buf_count=4 I (5186) I2S: APLL: Req RATE: 44100, real rate: 43945.238, BITS: 32, CLKM: 1, BCK_M: 8, MCLK: 22499962.000, SCLK: 2812495.250000, diva: 1, divb: 0 I (5396) wifi: wifi driver task: 3ffe1948, prio:23, stack:3584, core=0 I (5396) wifi: wifi firmware version: 7c00966 I (5396) wifi: config NVS flash: enabled I (5396) wifi: config nano formating: disabled I (5406) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (5416) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (5446) wifi: Init dynamic tx buffer num: 32 I (5446) wifi: Init data frame dynamic rx buffer num: 32 I (5446) wifi: Init management frame dynamic rx buffer num: 32 I (5446) wifi: Init management short buffer num: 32 I (5446) wifi: Init static rx buffer size: 1600 I (5456) wifi: Init static rx buffer num: 10 I (5456) wifi: Init dynamic rx buffer num: 32 I (5466) WIFI: Setting WiFi configuration SSID rajufree I (5546) phy: phy_version: 4100, 2a5dd04, Jan 23 2019, 21:00:07, 0, 0 I (5546) wifi: mode : sta (24:0a:c4:bf:f7:bc) I (6146) wifi: new:<6,0>, old:<1,0>, ap:<255,255>, sta:<6,0>, prof:1 I (6816) wifi: state: init -> auth (b0) I (6826) wifi: state: auth -> assoc (0) I (6826) wifi: state: assoc -> run (10)

I (6836) wifi: pm start, type: 1

I (9896) tcpip_adapter: sta ip: 192.168.0.23, mask: 255.255.255.0, gw: 192.168.0.254 I (9896) WIFI: Initializing SNTP I (9896) WIFI: Waiting for system time to be set... (1/20) I (10396) WIFI: System time is set. I (10396) MDNS: Initialize service... I (10396) REST-API: Starting server on port: '80', prio 5 I (10396) REST-API: Registering URI handlers

ctag-fh-kiel commented 4 years ago

That looks all good so far, no crash log visible. I have just flashed the firmware in the "bin" folder myself again and downloaded freesound files #342321 (assigned to slot #1) #233265 (slot #2) did some CV playback speed slot #2 assignment to cv5, assigned delay, set both slots to loop mode and trig latch, no problems on my end ... Strange, I can't trace the issue so far, as it seems working here. Try to exchange your SD card, some SD cards have issues with the ESP32 processor. I am using a 16GB Intenso HC class 10 card...

ctag-fh-kiel commented 4 years ago

Maybe your encoder switch is broken?

ctag-fh-kiel commented 4 years ago

here is the output of a make simple monitor make simple_monitorToolchain path: /home/vagrant/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc WARNING: Toolchain version is not supported: esp32-2019r1-rc2 Expected to see version: crosstool-ng-1.22.0-80-g6c4433a Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk. WARNING: Compiler version is not supported: 8.2.0 Expected to see version(s): 5.2.0 Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk. Python requirements from /home/vagrant/esp-idf/requirements.txt are satisfied. --- forcing DTR inactive --- forcing RTS inactive --- Miniterm on /dev/ttyUSB0 115200,8,N,1 --- --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x1b (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:1 load:0x3fff0018,len:4 load:0x3fff001c,len:6436 load:0x40078000,len:10456 load:0x40080400,len:7068 entry 0x40080750 I (29) boot: ESP-IDF v4.0-dev-487-g784daf8 2nd stage bootloader I (29) boot: compile time 17:47:26 I (29) boot: Enabling RNG early entropy source... I (35) qio_mode: Enabling default flash chip QIO I (40) boot: SPI Speed : 80MHz I (44) boot: SPI Mode : QIO I (48) boot: SPI Flash Size : 16MB I (52) boot: Partition Table: I (56) boot: ## Label Usage Type ST Offset Length I (63) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (71) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (78) boot: 2 factory factory app 00 00 00010000 00200000 I (86) boot: End of partition table I (90) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x29b90 (170896) map I (145) esp_image: segment 1: paddr=0x00039bb8 vaddr=0x3ffb0000 size=0x06114 ( 24852) load I (152) esp_image: segment 2: paddr=0x0003fcd4 vaddr=0x40080000 size=0x0033c ( 828) load I (153) esp_image: segment 3: paddr=0x00040018 vaddr=0x400d0018 size=0xbf104 (782596) map I (371) esp_image: segment 4: paddr=0x000ff124 vaddr=0x4008033c size=0x000c4 ( 196) load I (372) esp_image: segment 5: paddr=0x000ff1f0 vaddr=0x40080400 size=0x16a34 ( 92724) load I (423) boot: Loaded app from partition at offset 0x10000 I (423) boot: Disabling RNG early entropy source... I (424) spiram: Found 64MBit SPI RAM device I (428) spiram: SPI RAM mode: flash 80m sram 80m I (434) spiram: PSRAM initialized, cache is in low/high (2-core) mode. I (441) cpu_start: Pro cpu up. I (445) cpu_start: Application information: I (450) cpu_start: Project name: smplr I (454) cpu_start: App version: v0.8-21-gd54f802-dirty I (461) cpu_start: Compile time: Jul 21 2019 17:47:37 I (467) cpu_start: ELF file SHA256: 4a55c6babb07d1bd... I (473) cpu_start: ESP-IDF: v4.0-dev-487-g784daf8 I (479) cpu_start: Starting app cpu, entry point is 0x400814f4 I (0) cpu_start: App cpu up. I (964) spiram: SPI SRAM memory test OK I (964) heap_init: Initializing. RAM available for dynamic allocation: I (964) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (970) heap_init: At 3FFC0B20 len 0001F4E0 (125 KiB): DRAM I (976) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (983) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (989) heap_init: At 40096E34 len 000091CC (36 KiB): IRAM I (995) cpu_start: Pro cpu start user code I (1000) spiram: Adding pool of 4096K of external SPI memory to heap allocator I (125) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (126) SD: Initializing SD card I (126) gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 Name: SMI Type: SDHC/SDXC Speed: 40 MHz Size: 7680MB SPI: display device added to spi bus (1) SPI: attached display device, speed=8000000 SPI: bus uses native pins: false SPI: display init... OK SPI: Max rd speed = 8000000 SPI: Changed speed to 26666666 I (5136) gpio: GPIO[33]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:2 I (5136) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:2 I (5136) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:2 I (5146) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (5156) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (5166) AUDIO: Starting audio task I (5176) I2S: DMA Malloc info, datalen=blocksize=256, dma_buf_count=4 I (5176) I2S: DMA Malloc info, datalen=blocksize=256, dma_buf_count=4 I (5186) I2S: APLL: Req RATE: 44100, real rate: 43945.238, BITS: 32, CLKM: 1, BCK_M: 8, MCLK: 22499962.000, SCLK: 2812495.250000, diva: 1, divb: 0 I (5396) wifi: wifi driver task: 3ffe1948, prio:23, stack:3584, core=0 I (5396) wifi: wifi firmware version: 7c00966 I (5396) wifi: config NVS flash: enabled I (5396) wifi: config nano formating: disabled I (5406) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (5416) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (5446) wifi: Init dynamic tx buffer num: 32 I (5446) wifi: Init data frame dynamic rx buffer num: 32 I (5446) wifi: Init management frame dynamic rx buffer num: 32 I (5446) wifi: Init management short buffer num: 32 I (5446) wifi: Init static rx buffer size: 1600 I (5456) wifi: Init static rx buffer num: 10 I (5456) wifi: Init dynamic rx buffer num: 32 I (5466) WIFI: Setting WiFi configuration SSID rajufree I (5546) phy: phy_version: 4100, 2a5dd04, Jan 23 2019, 21:00:07, 0, 0 I (5546) wifi: mode : sta (24:0a:c4:bf:f7:bc) I (6146) wifi: new:<6,0>, old:<1,0>, ap:<255,255>, sta:<6,0>, prof:1 I (6816) wifi: state: init -> auth (b0) I (6826) wifi: state: auth -> assoc (0) I (6826) wifi: state: assoc -> run (10)

I (6836) wifi: pm start, type: 1

I (9896) tcpip_adapter: sta ip: 192.168.0.23, mask: 255.255.255.0, gw: 192.168.0.254 I (9896) WIFI: Initializing SNTP I (9896) WIFI: Waiting for system time to be set... (1/20) I (10396) WIFI: System time is set. I (10396) MDNS: Initialize service... I (10396) REST-API: Starting server on port: '80', prio 5 I (10396) REST-API: Registering URI handlers

Can you cause a crash and then capture the log?

kooops commented 4 years ago

Sure but the log won't reflect the cause of the crash: let's say I want to change in Play--Distortion--ON/OFF (third entry in the submenu level) it will crash. As for my encoder I had a doubt and already change it but eventually that won't explain why I could use it for the main menu etc etc without any trouble ? Anothe rthing I've noticed I can't do a make monitor I have to launch a make simple monitor otherwise I would end-up with the first warning related to the main audio. I think my gcc is 8.2 as mention at the top of my last log.

ctag-fh-kiel commented 4 years ago

Ok, that is strange. As to the crash, which sound file are you using? Can you send me a copy of your SD card data? I currently don't have a build environment set up, so fixing this may take some time... Thanks for reporting...

ctag-fh-kiel commented 4 years ago

Another thought, which ESP32 Module are you using (I need the exact name) WROVER "non B", which is the old WROVER module has issues at high clock rates... I use only WROVER IB modules (the I is for the IPEX connector).

thopman commented 4 years ago

i have just done the same run a monitor and checked for any crash-logs. I'm using the 16mb version of the wrover-ib module. Here's the log untill the display freezes.

I (28) boot: ESP-IDF v4.0-dev-487-g784daf8 2nd stage bootloader I (29) boot: compile time 17:47:26 I (29) boot: Enabling RNG early entropy source... I (34) qio_mode: Enabling default flash chip QIO I (40) boot: SPI Speed : 80MHz I (44) boot: SPI Mode : QIO I (48) boot: SPI Flash Size : 16MB I (52) boot: Partition Table: I (56) boot: ## Label Usage Type ST Offset Length I (63) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (70) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (78) boot: 2 factory factory app 00 00 00010000 00200000 I (85) boot: End of partition table I (89) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x29b90 (170896) map I (144) esp_image: segment 1: paddr=0x00039bb8 vaddr=0x3ffb0000 size=0x06114 ( 24852) load I (152) esp_image: segment 2: paddr=0x0003fcd4 vaddr=0x40080000 size=0x0033c ( 828) load I (152) esp_image: segment 3: paddr=0x00040018 vaddr=0x400d0018 size=0xbf104 (782596) map I (371) esp_image: segment 4: paddr=0x000ff124 vaddr=0x4008033c size=0x000c4 ( 196) load I (371) esp_image: segment 5: paddr=0x000ff1f0 vaddr=0x40080400 size=0x16a34 ( 92724) load I (423) boot: Loaded app from partition at offset 0x10000 I (423) boot: Disabling RNG early entropy source... I (424) spiram: Found 64MBit SPI RAM device I (428) spiram: SPI RAM mode: flash 80m sram 80m I (433) spiram: PSRAM initialized, cache is in low/high (2-core) mode. I (441) cpu_start: Pro cpu up. I (444) cpu_start: Application information: I (449) cpu_start: Project name: smplr I (454) cpu_start: App version: v0.8-21-gd54f802-dirty I (460) cpu_start: Compile time: Jul 21 2019 17:47:37 I (466) cpu_start: ELF file SHA256: 4a55c6babb07d1bd... I (472) cpu_start: ESP-IDF: v4.0-dev-487-g784daf8 I (478) cpu_start: Starting app cpu, entry point is 0x400814f4 I (0) cpu_start: App cpu up. I (963) spiram: SPI SRAM memory test OK I (964) heap_init: Initializing. RAM available for dynamic allocation: I (964) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (970) heap_init: At 3FFC0B20 len 0001F4E0 (125 KiB): DRAM I (976) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (982) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (989) heap_init: At 40096E34 len 000091CC (36 KiB): IRAM I (995) cpu_start: Pro cpu start user code I (1000) spiram: Adding pool of 4096K of external SPI memory to heap allocator I (125) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (126) SD: Initializing SD card I (126) gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 Name: SU02G Type: SDSC Speed: 20 MHz Size: 1938MB SPI: display device added to spi bus (1) SPI: attached display device, speed=8000000 SPI: bus uses native pins: false SPI: display init... OK SPI: Max rd speed = 1000000 SPI: Changed speed to 26666666 I (1636) gpio: GPIO[33]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:2 I (1636) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:2 I (1646) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:2 I (1656) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (1666) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (1676) AUDIO: Starting audio task I (1686) I2S: DMA Malloc info, datalen=blocksize=256, dma_buf_count=4 I (1686) I2S: DMA Malloc info, datalen=blocksize=256, dma_buf_count=4 I (1696) I2S: APLL: Req RATE: 44100, real rate: 43945.238, BITS: 32, CLKM: 1, BCK_M: 8, MCLK: 22499962.000, SCLK: 2812495.250000, diva: 1, divb: 0 I (1906) wifi: wifi driver task: 3ffe1948, prio:23, stack:3584, core=0 I (1906) wifi: wifi firmware version: 7c00966 I (1906) wifi: config NVS flash: enabled I (1906) wifi: config nano formating: disabled I (1916) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (1916) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (1946) wifi: Init dynamic tx buffer num: 32 I (1946) wifi: Init data frame dynamic rx buffer num: 32 I (1946) wifi: Init management frame dynamic rx buffer num: 32 I (1946) wifi: Init management short buffer num: 32 I (1956) wifi: Init static rx buffer size: 1600 I (1956) wifi: Init static rx buffer num: 10 I (1966) wifi: Init dynamic rx buffer num: 32 I (1966) WIFI: Setting WiFi configuration SSID myssid I (2056) phy: phy_version: 4100, 2a5dd04, Jan 23 2019, 21:00:07, 0, 0 I (2066) wifi: mode : sta (c4:4f:33:22:7a:75)

ctag-fh-kiel commented 4 years ago

Strange, there is no crash log visible at all... Can you try if it resolves when you change --flash_freq 80m to --flash_freq 40m in the flash.sh script?

thopman commented 4 years ago

same problem. though it starts the spi speed at 40Mhz, it will later say during the spiram init that the SPI RAM mode is: flash 80m sram 80m.

I (28) boot: ESP-IDF v4.0-dev-487-g784daf8 2nd stage bootloader I (28) boot: compile time 17:47:26 I (29) boot: Enabling RNG early entropy source... I (34) qio_mode: Enabling default flash chip QIO I (40) boot: SPI Speed : 40MHz I (44) boot: SPI Mode : QIO I (48) boot: SPI Flash Size : 16MB I (52) boot: Partition Table: I (56) boot: ## Label Usage Type ST Offset Length I (63) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (70) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (78) boot: 2 factory factory app 00 00 00010000 00200000 I (85) boot: End of partition table I (89) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x29b90 (170896) map I (150) esp_image: segment 1: paddr=0x00039bb8 vaddr=0x3ffb0000 size=0x06114 ( 24852) load I (158) esp_image: segment 2: paddr=0x0003fcd4 vaddr=0x40080000 size=0x0033c ( 828) load I (159) esp_image: segment 3: paddr=0x00040018 vaddr=0x400d0018 size=0xbf104 (782596) map I (402) esp_image: segment 4: paddr=0x000ff124 vaddr=0x4008033c size=0x000c4 ( 196) load I (402) esp_image: segment 5: paddr=0x000ff1f0 vaddr=0x40080400 size=0x16a34 ( 92724) load I (457) boot: Loaded app from partition at offset 0x10000 I (457) boot: Disabling RNG early entropy source... I (458) spiram: Found 64MBit SPI RAM device I (462) spiram: SPI RAM mode: flash 80m sram 80m I (468) spiram: PSRAM initialized, cache is in low/high (2-core) mode. I (475) cpu_start: Pro cpu up. I (479) cpu_start: Application information: I (483) cpu_start: Project name: smplr I (488) cpu_start: App version: v0.8-21-gd54f802-dirty I (495) cpu_start: Compile time: Jul 21 2019 17:47:37 I (501) cpu_start: ELF file SHA256: 4a55c6babb07d1bd... I (507) cpu_start: ESP-IDF: v4.0-dev-487-g784daf8 I (513) cpu_start: Starting app cpu, entry point is 0x400814f4 I (0) cpu_start: App cpu up. I (998) spiram: SPI SRAM memory test OK I (998) heap_init: Initializing. RAM available for dynamic allocation: I (998) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (1004) heap_init: At 3FFC0B20 len 0001F4E0 (125 KiB): DRAM I (1011) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (1017) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (1023) heap_init: At 40096E34 len 000091CC (36 KiB): IRAM I (1030) cpu_start: Pro cpu start user code I (1035) spiram: Adding pool of 4096K of external SPI memory to heap allocator I (160) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (160) SD: Initializing SD card I (160) gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 Name: SU02G Type: SDSC Speed: 20 MHz Size: 1938MB SPI: display device added to spi bus (1) SPI: attached display device, speed=8000000 SPI: bus uses native pins: false SPI: display init... OK SPI: Max rd speed = 1000000 SPI: Changed speed to 26666666 I (1670) gpio: GPIO[33]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:2 I (1670) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:2 I (1680) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:2 I (1690) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (1700) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (1710) AUDIO: Starting audio task I (1720) I2S: DMA Malloc info, datalen=blocksize=256, dma_buf_count=4 I (1720) I2S: DMA Malloc info, datalen=blocksize=256, dma_buf_count=4 I (1730) I2S: APLL: Req RATE: 44100, real rate: 43945.238, BITS: 32, CLKM: 1, BCK_M: 8, MCLK: 22499962.000, SCLK: 2812495.250000, diva: 1, divb: 0 I (1940) wifi: wifi driver task: 3ffe1948, prio:23, stack:3584, core=0 I (1940) wifi: wifi firmware version: 7c00966 I (1940) wifi: config NVS flash: enabled I (1940) wifi: config nano formating: disabled I (1950) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (1950) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (1980) wifi: Init dynamic tx buffer num: 32 I (1980) wifi: Init data frame dynamic rx buffer num: 32 I (1980) wifi: Init management frame dynamic rx buffer num: 32 I (1980) wifi: Init management short buffer num: 32 I (1990) wifi: Init static rx buffer size: 1600 I (1990) wifi: Init static rx buffer num: 10 I (2000) wifi: Init dynamic rx buffer num: 32 I (2000) WIFI: Setting WiFi configuration SSID myssid I (2090) phy: phy_version: 4100, 2a5dd04, Jan 23 2019, 21:00:07, 0, 0 I (2090) wifi: mode : sta (c4:4f:33:22:7a:75)

ctag-fh-kiel commented 4 years ago

Ok, I have commited a new branch for 40MHz settings https://github.com/ctag-fh-kiel/ctag-straempler/tree/40MHz

Please check this...

ctag-fh-kiel commented 4 years ago

I tried your SD card data, again no problems on my end, everything works as it should. Very strange, maybe some cold solder points? Maybe PSU voltage issues? Sorry I can't reproduce it :( I have erased you SDCARD post, as it contains secrets...

thopman commented 4 years ago

i tried the 40Mhz branch and the problem still persists. I had to change the ./flash.sh script and the sdkconfig file to use /dev/ttyUSB0 but apart from that i changed nothing. the Wrover modules i have are these: 356-ESP32WROIB(16MB) (mouser part number), the same module i have on my working strampler unit. I'm not at my workshop so i can't scope the power rails, but i'll do so when i'm there again. I'll report back when i verified all hardware.

ctag-fh-kiel commented 4 years ago

The WROVER modules should be ok... Weird, so you say one module works properly?

thopman commented 4 years ago

yes the other one i built works just fine. Both of them made with paste and stencil, baked on a hotplate. All the parts are from mouser according to the bom, apart from the displays. Those i got from ali-express. it must be a hardware issue if one works and the other doesn't. But it's very strange that it only happens when i'm a few levels down into the menu and adjust a parameter.

ctag-fh-kiel commented 4 years ago

Strange indeed, last thing I could think of is a stack overflow somewhere, but that should be visible in the log... I'll try to cut another binary with increased stack sizes...

ctag-fh-kiel commented 4 years ago

Ok, this branch has increased stack sizes for all tasks, maybe a remedy... https://github.com/ctag-fh-kiel/ctag-straempler/tree/40MHz_plusIncStackSz

thopman commented 4 years ago

i tried it and still no dice. I do appreciate all the effort you are putting into this. I hope to have some time later this week to see if it's not a hardware fault after all. Will keep you posted.

As a side note i've been active helping with the development of the esp32 architecture for the faust programming language. I might be nice to have support for faust with the strampler as well. That would be a great way to extend the functionality of the strampler.

kooops commented 4 years ago

Same thing on my side : not much luck with the new 40mhz version. The weird things is now I have a second Ctag which behave exactly in the same way (freeze at the same places). I ve been trying a different SD card just in case. I ve also tried without SD. What about you thopman Could you swap the SD just to check this point.

ctag-fh-kiel commented 4 years ago

Ok, I keep this issue open for the moment... Maybe there will be still updates from your end, once HW is double checked. @thopman integrating with FAUST would be awesome, in fact, I have recently learned about your esp32 efforts. Also, I have a differen HW project in the works, which would be an excellent fit. I'd be deligted to discuss, just send me an email: paradenker@gmail.com

thopman commented 4 years ago

Hi Robert, i managed to find the issue with my module. It turned out my codec was broken. (Probably cooked it, first time soldering lead free...) After replacing it, all problems were gone. I have a hunch what caused the freeze, but i haven't had the time to go through the code and verify it. I found out the codec wasn't working when i made a quick driver for the wm8731 and ran some compiled faust code on the strampler. I got audio on my working module but not on the broken module. Anyway, i'll email you later about faust integration and i'll invite you to the faust slack. Thanks again for your time and effort, i really appreciate it. With kind regards, Thomas

kooops commented 4 years ago

Thank you to both of you. Same thing for me I had to reflow the codec and now it is working great.

ctag-fh-kiel commented 4 years ago

Awesome, thanks for tracing down the issue, closing it for now...