I'm working on an esp32-s2 based product and there are a number of boards that I have built up and am testing, but now two of them are crashing on spi_bus_initialize().
Board number 3 had this problem and I set it aside when I found that other boards weren't crashing at this point, thinking it was some kind of issue with just this board.
Now I'm working with board number 5 and it had been working reliably for a couple of weeks but it now also has the same problem. I reduced my code down to just this call and it definitely crashes at this point. There is no stack trace, no chance to retrieve or read an error, just a reset when this function is called.
To further verify this I built and installed an unchanged copy of the example for spi_master lcd and it also crashes continually.
I have the latest stable esp-idf 4.2 release (did a git pull this morning).
Doe anyone have any clues on where I can start looking to try and figure this one out?
Esp32-s2 crashes on spi_bus_initialize() [IDFGH-4023]
-
- Posts: 11
- Joined: Tue Sep 22, 2020 8:07 pm
Re: Esp32-s2 crashes on spi_bus_initialize()
Hi darrenbsydney,
Thanks for reporting and letting us know, and sorry for the inconvenience. Would you please help provide more details, information like elf, sdk configuration, backtrace, log outputs, commit ID and etc. would help us debug further. Thanks.
Alvin
Thanks for reporting and letting us know, and sorry for the inconvenience. Would you please help provide more details, information like elf, sdk configuration, backtrace, log outputs, commit ID and etc. would help us debug further. Thanks.
Alvin
Re: Esp32-s2 crashes on spi_bus_initialize() [IDFGH-4023]
Moderator's note: edit the topic title for issue tracking, thanks for reporting.
-
- Posts: 11
- Joined: Tue Sep 22, 2020 8:07 pm
Re: Esp32-s2 crashes on spi_bus_initialize() [IDFGH-4023]
Hi Alvin,
Thanks for replying.
The following output from idf.py monitor seems to have most of the things you asked for. If there's anything else you need please tell me where to find it and I'll chase it down for you.
Note this is the output from the unaltered spi_master lcd example code.
It continually resets and the sequence from a few resets is below.
Thanks for replying.
The following output from idf.py monitor seems to have most of the things you asked for. If there's anything else you need please tell me where to find it and I'll chase it down for you.
Note this is the output from the unaltered spi_master lcd example code.
It continually resets and the sequence from a few resets is below.
header(2048k).�ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0xb (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe8100,len:0x4
load:0x3ffe8104,len:0x183c
load:0x40050000,len:0x14b0
load:0x40054000,len:0x210c
entry 0x400502dc
I (47) boot: ESP-IDF v4.2-dev-2084-g98d5b5dfd-dirty 2nd stage bootloader
I (47) boot: compile time 05:44:10
I (47) boot: chip revision: 0
I (51) boot.esp32s2: SPI Speed : 80MHz
I (56) boot.esp32s2: SPI Mode : DIO
I (60) boot.esp32s2: SPI Flash Size : 2MB
I (65) boot: Enabling RNG early entropy source...
I (71) boot: Partition Table:
I (74) boot: ## Label Usage Type ST Offset Length
I (81) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (89) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (96) boot: 2 factory factory app 00 00 00010000 00100000
I (104) boot: End of partition table
I (108) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f000020 size=0x06344 ( 25412) map
I (122) esp_image: segment 1: paddr=0x0001636c vaddr=0x3ffbe550 size=0x0230c ( 8972) load
I (128) esp_image: segment 2: paddr=0x00018680 vaddr=0x40024000 size=0x00404 ( 1028) load
0x40024000: _WindowOverflow4 at C:/Users/darren3/Desktop/esp-idf/components/freertos/xtensa/xtensa_vectors.S:1730
I (135) esp_image: segment 3: paddr=0x00018a8c vaddr=0x40024404 size=0x0758c ( 30092) load
I (152) esp_image: segment 4: paddr=0x00020020 vaddr=0x40080020 size=0x1631c ( 90908) map
0x40080020: _stext at ??:?
I (172) esp_image: segment 5: paddr=0x00036344 vaddr=0x4002b990 size=0x02bbc ( 11196) load
0x4002b990: rtc_clk_cpu_freq_get_config at C:/Users/darren3/Desktop/esp-idf/components/soc/src/esp32s2/rtc_clk.c:399
I (181) boot: Loaded app from partition at offset 0x10000
I (181) boot: Disabling RNG early entropy source...
I (183) cache: Instruction cache : size 8KB, 4Ways, cache line size 32Byte
I (191) cpu_start: Pro cpu up.
I (195) cpu_start: Application information:
I (199) cpu_start: Project name: spi_master
I (205) cpu_start: App version: ea740c1
I (210) cpu_start: Compile time: Sep 23 2020 05:43:17
I (216) cpu_start: ELF file SHA256: ba74c1f90a3cd136...
I (222) cpu_start: ESP-IDF: v4.2-dev-2084-g98d5b5dfd-dirty
I (229) cpu_start: Single core mode
I (233) heap_init: Initializing. RAM available for dynamic allocation:
I (240) heap_init: At 3FFC1580 len 0003AA80 (234 KiB): DRAM
I (246) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM
I (252) cpu_start: Pro cpu start user code
I (314) spi_flash: detected chip: generic
I (315) spi_flash: flash io: dio
W (315) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k).�ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0xb (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe8100,len:0x4
load:0x3ffe8104,len:0x183c
load:0x40050000,len:0x14b0
load:0x40054000,len:0x210c
entry 0x400502dc
I (47) boot: ESP-IDF v4.2-dev-2084-g98d5b5dfd-dirty 2nd stage bootloader
I (47) boot: compile time 05:44:10
I (47) boot: chip revision: 0
I (51) boot.esp32s2: SPI Speed : 80MHz
I (56) boot.esp32s2: SPI Mode : DIO
I (60) boot.esp32s2: SPI Flash Size : 2MB
I (65) boot: Enabling RNG early entropy source...
I (71) boot: Partition Table:
I (74) boot: ## Label Usage Type ST Offset Length
I (81) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (89) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (96) boot: 2 factory factory app 00 00 00010000 00100000
I (104) boot: End of partition table
I (108) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f000020 size=0x06344 ( 25412) map
I (122) esp_image: segment 1: paddr=0x0001636c vaddr=0x3ffbe550 size=0x0230c ( 8972) load
I (128) esp_image: segment 2: paddr=0x00018680 vaddr=0x40024000 size=0x00404 ( 1028) load
0x40024000: _WindowOverflow4 at C:/Users/darren3/Desktop/esp-idf/components/freertos/xtensa/xtensa_vectors.S:1730
I (135) esp_image: segment 3: paddr=0x00018a8c vaddr=0x40024404 size=0x0758c ( 30092) load
I (152) esp_image: segment 4: paddr=0x00020020 vaddr=0x40080020 size=0x1631c ( 90908) map
0x40080020: _stext at ??:?
I (172) esp_image: segment 5: paddr=0x00036344 vaddr=0x4002b990 size=0x02bbc ( 11196) load
0x4002b990: rtc_clk_cpu_freq_get_config at C:/Users/darren3/Desktop/esp-idf/components/soc/src/esp32s2/rtc_clk.c:399
I (181) boot: Loaded app from partition at offset 0x10000
I (181) boot: Disabling RNG early entropy source...
I (183) cache: Instruction cache : size 8KB, 4Ways, cache line size 32Byte
I (191) cpu_start: Pro cpu up.
I (195) cpu_start: Application information:
I (199) cpu_start: Project name: spi_master
I (205) cpu_start: App version: ea740c1
I (210) cpu_start: Compile time: Sep 23 2020 05:43:17
I (216) cpu_start: ELF file SHA256: ba74c1f90a3cd136...
I (222) cpu_start: ESP-IDF: v4.2-dev-2084-g98d5b5dfd-dirty
I (229) cpu_start: Single core mode
I (233) heap_init: Initializing. RAM available for dynamic allocation:
I (240) heap_init: At 3FFC1580 len 0003AA80 (234 KiB): DRAM
I (246) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM
I (252) cpu_start: Pro cpu start user code
I (314) spi_flash: detected chip: generic
I (315) spi_flash: flash io: dio
W (315) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k).�ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0xb (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe8100,len:0x4
load:0x3ffe8104,len:0x183c
load:0x40050000,len:0x14b0
load:0x40054000,len:0x210c
entry 0x400502dc
I (47) boot: ESP-IDF v4.2-dev-2084-g98d5b5dfd-dirty 2nd stage bootloader
I (47) boot: compile time 05:44:10
I (47) boot: chip revision: 0
I (51) boot.esp32s2: SPI Speed : 80MHz
I (56) boot.esp32s2: SPI Mode : DIO
I (60) boot.esp32s2: SPI Flash Size : 2MB
I (65) boot: Enabling RNG early entropy source...
I (71) boot: Partition Table:
I (74) boot: ## Label Usage Type ST Offset Length
I (81) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (89) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (96) boot: 2 factory factory app 00 00 00010000 00100000
I (104) boot: End of partition table
I (108) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f000020 size=0x06344 ( 25412) map
I (122) esp_image: segment 1: paddr=0x0001636c vaddr=0x3ffbe550 size=0x0230c ( 8972) load
I (128) esp_image: segment 2: pa
-
- Posts: 11
- Joined: Tue Sep 22, 2020 8:07 pm
Re: Esp32-s2 crashes on spi_bus_initialize() [IDFGH-4023]
I managed to fix this. It's pretty obscure and probably my mistake for not knowing how to update my tools correctly. I'm still not sure if I know to update my tools correctly to be honest, but the following worked and may help somebody.
This all came from trying another computer which had a higher version reported from 'idf.py --version'. On this other computer I was not getting the SPI crashes.
The steps I took to update (on Windows) were..
This all came from trying another computer which had a higher version reported from 'idf.py --version'. On this other computer I was not getting the SPI crashes.
The steps I took to update (on Windows) were..
- 'git branch' to find out which branch I was on - it was release/v4.2
'git pull origin release/v4.2' to update everything
Any other installs required including in my case from the cmd prompt in the esp-idf directory running 'install.bat'
Re: Esp32-s2 crashes on spi_bus_initialize() [IDFGH-4023]
Hi Darren,
Glad you were able to resolve this, and sorry noone got back to you earlier.
The v4.2-dev versions are "development" versions so sometimes they will have bugs, I don't think this is any mistake of yours apart from bad luck.
We releasing v4.2-beta1 today, and getting closer to a v4.2 final release so it will be easier to pick a version to use for production.
Glad you were able to resolve this, and sorry noone got back to you earlier.
The v4.2-dev versions are "development" versions so sometimes they will have bugs, I don't think this is any mistake of yours apart from bad luck.
We releasing v4.2-beta1 today, and getting closer to a v4.2 final release so it will be easier to pick a version to use for production.
-
- Posts: 11
- Joined: Tue Sep 22, 2020 8:07 pm
Re: Esp32-s2 crashes on spi_bus_initialize() [IDFGH-4023]
Thanks Angus. Actually it's not resolved anymore. It's gone back to having the same problem even with everything updated. I'm trying to work out what's going on before posting an update.
I'm doing everything I can to try and isolate this problem. It's a tricky one because it takes time for this problem to occur, generally overnight. Yesterday for example I went back to Board 1, which was working, left it running overnight and in the morning it was continually resetting just like Boards 3 and 5 are now also doing.
Today I'm writing a minimal app which will get my LCD up and running and I'll see if I can get that to run for days.
Thanks also for the info about esp idf v4.2. I understand at least this version is required to work with the esp32-s2? If there was something more stable to use I would use it.
I'm doing everything I can to try and isolate this problem. It's a tricky one because it takes time for this problem to occur, generally overnight. Yesterday for example I went back to Board 1, which was working, left it running overnight and in the morning it was continually resetting just like Boards 3 and 5 are now also doing.
Today I'm writing a minimal app which will get my LCD up and running and I'll see if I can get that to run for days.
Thanks also for the info about esp idf v4.2. I understand at least this version is required to work with the esp32-s2? If there was something more stable to use I would use it.
Who is online
Users browsing this forum: Google [Bot] and 363 guests