Copyright © https://mongoose-os.com

Mongoose OS Forum

frame
ATTENTION! This forum has moved to:

https://community.mongoose-os.com

Do not post any new messages.

Crash on FS.Mkfs with external SPI flash

edited February 26 in Mongoose OS

Hello,

I am using Mongoose OS 2.12.1 with external SPI flash "Winbond 25q64f vsig". I use https://github.com/mongoose-os-libs/vfs-dev-spi-flash library. MCU is ESP32 (Wemos LOLIN32).

Calling FS.Mkfs unfortunately fails and in the console I see following messages:

[Feb 26 11:57:05.289] mg_rpc.c:482            0x3ffb4ed4 GOT FRAME (182): {"src":"mos","id":1317936499356,"method":"FS.Mkfs","params":{"dev_type":"spi_flash","dev_opts":"{\"freq\": 20000000, \"cs\": 0}","fs_type":"SPIFFS","fs_opts":"{\"size\": 1048576}"}}
[Feb 26 11:57:05.309] 
[Feb 26 11:57:05.309] mg_rpc.c:376            '1317936499356' 'mos' '' 'FS.Mkfs'
[Feb 26 11:57:05.315] mgos_rpc.c:361          Called 'FS.Mkfs', acl for it: '*'
[Feb 26 11:57:05.321] mg_rpc.c:293            FS.Mkfs via WS_in 192.168.0.102:36168
[Feb 26 11:57:05.325] mgos_vfs_dev_spi_fl:382 JEDEC ID: ef 40 17 SR: 00
[Feb 26 11:57:05.331] mgos_vfs_dev_spi_fl:400 SFDP 1.0 len 36
[Feb 26 11:57:05.335] mgos_vfs_dev_spi_fl:423 Read modes : 1-1-2 1-2-2 1-4-4 1-1-4 4-4-4
[Feb 26 11:57:05.340] mgos_vfs_dev_spi_fl:455 Erase: 0x20:4096,1ms 0x52:32768,1ms 0xd8:65536,1ms 0x0:0,1ms chip:16ms
[Feb 26 11:57:05.349] mgos_vfs_dev_spi_fl:489 Chip ID: ef 40, size: 8388608
[Feb 26 11:57:05.354] mgos_vfs_dev_spi_fl:554 DPD: no, 0x00/0x00, 0us
[Feb 26 11:57:05.360] mgos_vfs.c:100          Create SPIFFS (dev 0x3ffb5250, opts {"size": 1048576})
[Feb 26 11:57:05.367] mgos_vfs_fs_spiffs.:155 addr 0x0 size 1048576 bs 4096 ps 256 es 4096 nfd 10 encr 0 => -10025
[Feb 26 11:57:35.287] E (36298) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
[Feb 26 11:57:35.295]  - mgos (CPU 0/1), backtrace: 0x400fa03f 0x400fa1c3 0x400fa27e 0x400fa377 0x400e8976 0x400ebd5d 0x400ef5ee 0x400ee6a5 0x400ebded 0x400e7b7e 0x400e7bf4 0x400f8738 0x400f6de2 0x400f6f4d 0x400f94a2 0x401b91aa 0x401b966a 0x401b993f 0x401b91aa 0x401ba456 0x401bcfa8 0x401bcfd7 0x401cab39 0x401b5129 0x40082fe2 0x4008318d
[Feb 26 11:57:35.323] 
[Feb 26 11:57:35.323] E (36298) task_wdt: Tasks currently running:
[Feb 26 11:57:35.328] E (36298) task_wdt: CPU 0: mgos
[Feb 26 11:57:35.331] E (36298) task_wdt: Aborting.
[Feb 26 11:57:35.337] abort() was called at PC 0x400d0af0 on core 0
[Feb 26 11:57:35.340] 
[Feb 26 11:57:35.340] Backtrace: 0x4009303b 0x400931bd 0x400d0af0 0x4008167e 0x400fa03c
[Feb 26 11:57:35.345] 
[Feb 26 11:57:35.345] --- BEGIN CORE DUMP ---

Sometimes I see different initial messages with empty Read modes:

[Feb 26 11:58:00.249] mg_rpc.c:482            0x3ffb4ed4 GOT FRAME (182): {"src":"mos","id":1324104535189,"method":"FS.Mkfs","params":{"dev_type":"spi_flash","dev_opts":"{\"freq\": 20000000, \"cs\": 0}","fs_type":"SPIFFS","fs_opts":"{\"size\": 1048576}"}}
[Feb 26 11:58:00.270] 
[Feb 26 11:58:00.270] mg_rpc.c:376            '1324104535189' 'mos' '' 'FS.Mkfs'
[Feb 26 11:58:00.276] mgos_rpc.c:361          Called 'FS.Mkfs', acl for it: '*'
[Feb 26 11:58:00.281] mg_rpc.c:293            FS.Mkfs via WS_in 192.168.0.102:36174
[Feb 26 11:58:00.286] mgos_vfs_dev_spi_fl:382 JEDEC ID: ef 40 17 SR: 00
[Feb 26 11:58:00.291] mgos_vfs_dev_spi_fl:400 SFDP 1.0 len 36
[Feb 26 11:58:00.295] mgos_vfs_dev_spi_fl:423 Read modes :
[Feb 26 11:58:00.298] mgos_vfs_dev_spi_fl:455 Erase: 0x0:0,1ms 0x0:0,1ms 0x0:0,1ms 0x0:0,1ms chip:16ms
[Feb 26 11:58:00.306] mgos_vfs_dev_spi_fl:489 Chip ID: ef 40, size: 8388608
[Feb 26 11:58:00.312] mgos_vfs_dev_spi_fl:554 DPD: no, 0x00/0x00, 0us
[Feb 26 11:58:00.315] mgos_vfs.c:100          Create SPIFFS (dev 0x3ffb5250, opts {"size": 1048576})
[Feb 26 11:58:00.324] mgos_vfs_fs_spiffs.:155 addr 0x0 size 1048576 bs 4096 ps 256 es 4096 nfd 10 encr 0 => -10025
[Feb 26 11:58:30.247] E (35987) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
[Feb 26 11:58:30.256]  - mgos (CPU 0/1), backtrace: 0x400f9c9d 0x400fa02f 0x400fa1c3 0x400fa229 0x400fa25c 0x400fa377 0x400e8976 0x400ebd5d 0x400ef5ee 0x400ee6a5 0x400ebded 0x400e7b7e 0x400e7bf4 0x400f8738 0x400f6de2 0x400f6f4d 0x400f94a2 0x401b91aa 0x401b966a 0x401b993f 0x401b91aa 0x401ba456 0x401bcfa8 0x401bcfd7 0x401cab39 0x401b5129 0x40082fe2 0x4008318d
[Feb 26 11:58:30.286] 
[Feb 26 11:58:30.286] E (35987) task_wdt: Tasks currently running:
[Feb 26 11:58:30.292] E (35987) task_wdt: CPU 0: mgos
[Feb 26 11:58:30.294] E (35987) task_wdt: Aborting.
[Feb 26 11:58:30.297] abort() was called at PC 0x400d0af0 on core 0
[Feb 26 11:58:30.303] 
[Feb 26 11:58:30.303] Backtrace: 0x4009303b 0x400931bd 0x400d0af0 0x4008167e 0x400f9c9a
[Feb 26 11:58:30.308] 
[Feb 26 11:58:30.308] --- BEGIN CORE DUMP ---

I've also tried other flash - cFeon F32-100HIP but also without success:

[Feb 26 11:55:49.400] mg_rpc.c:482            0x3ffb4ed4 GOT FRAME (182): {"src":"mos","id":1733596113958,"method":"FS.Mkfs","params":{"dev_type":"spi_flash","dev_opts":"{\"freq\": 20000000, \"cs\": 0}","fs_type":"SPIFFS","fs_opts":"{\"size\": 1048576}"}}
[Feb 26 11:55:49.420] 
[Feb 26 11:55:49.420] mg_rpc.c:376            '1733596113958' 'mos' '' 'FS.Mkfs'
[Feb 26 11:55:49.426] mgos_rpc.c:361          Called 'FS.Mkfs', acl for it: '*'
[Feb 26 11:55:49.432] mg_rpc.c:293            FS.Mkfs via WS_in 192.168.0.102:36156
[Feb 26 11:55:49.439] mgos_vfs_dev_spi_fl:382 JEDEC ID: 1c 31 16 SR: 00
[Feb 26 11:55:49.442] mgos_vfs_dev_spi_fl:393 Invalid SFDP magic (got 0x00000000)
[Feb 26 11:55:49.448] mgos_vfs_dev_spi_fl:489 Chip ID: 1c 31, size: 4194304
[Feb 26 11:55:49.454] mgos_vfs_dev_spi_fl:554 DPD: no, 0x00/0x00, 0us
[Feb 26 11:55:49.457] mgos_vfs.c:100          Create SPIFFS (dev 0x3ffb5250, opts {"size": 1048576})
[Feb 26 11:55:49.466] mgos_vfs_fs_spiffs.:155 addr 0x0 size 1048576 bs 4096 ps 256 es 4096 nfd 10 encr 0 => -10025
[Feb 26 11:55:55.690] mg_lwip_net_if.c:364    0x3ffb4460 conn 0x3ffb5e88 from 192.168.0.102:36158
[Feb 26 11:55:55.696] mg_net.c:544            0x3ffb4460 0x3ffb6004 1073438856 0
[Feb 26 11:56:19.398] E (33277) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
[Feb 26 11:56:19.406]  - mgos (CPU 0/1), backtrace: 0x400fa02f 0x400fa1c3 0x400fa229 0x400fa25c 0x400fa377 0x400e8976 0x400ebd5d 0x400ef5ee 0x400ee6a5 0x400ebded 0x400e7b7e 0x400e7bf4 0x400f8738 0x400f6de2 0x400f6f4d 0x400f94a2 0x401b91aa 0x401b966a 0x401b993f 0x401b91aa 0x401ba456 0x401bcfa8 0x401bcfd7 0x401cab39 0x401b5129 0x40082fe2 0x4008318d
[Feb 26 11:56:19.434] 
[Feb 26 11:56:19.434] E (33277) task_wdt: Tasks currently running:
[Feb 26 11:56:19.440] E (33277) task_wdt: CPU 0: mgos
[Feb 26 11:56:19.445] E (33277) task_wdt: Aborting.
[Feb 26 11:56:19.448] abort() was called at PC 0x400d0af0 on core 0
[Feb 26 11:56:19.451] 
[Feb 26 11:56:19.451] Backtrace: 0x4009303b 0x400931bd 0x400d0af0 0x4008167e 0x400fa02c
[Feb 26 11:56:19.459] 
[Feb 26 11:56:19.459] --- BEGIN CORE DUMP ---

I've also tried lowering SPI frequencies and using LFS instead of SPIFFS buth with simmilar results.

Could anybody please give me some hint how to track down the issue?

Best regards

Comments

Sign In or Register to comment.