Access to an external sd card with LoPy or WiPy (firmware 1.6.11.b1): Guru meditation error.
mrainone last edited by
I’m Marco Rainone, software engineer and collaborator of ICTP wireless laboratory (http://wireless.ictp.it/)
In our laboratory we are testing some wipy 2.0 and lopy boards. Weeks ago we updated the boards firmware, installing ver. 1.6.11.b1.
Our test are based on sample programs that we found here:
We have found a problem managing an external SD card, using the example described in:
- I have a lopy (or wipy 2.0, it does not matter) installed on the expansion board.
- on expansion board I’ve installed a 2GB SD card, empty and formatted with FAT32 in windows environment. The Sd has no errors: I’ve checked it with a disk tool.
This is the example loaded to the pycom board (I’ve named it sdtst.py):
from machine import SD
sd = SD()
f = open('/sd/test.txt', 'w')
f.write('Testing SD card write operations')
f = open('/sd/test.txt', 'r')
using repl, I’ve launch the sdtst.py program using the command:
I immediately got a Guru meditation error:
/Users/danicampora/Code/Pycom/esp-idf-2017-03-12/components/freertos/./queue.c:1444 (xQueueGenericReceive)- assert failed!
abort() was called at PC 0x400844a9
Guru Meditation Error: Core 0 panic'ed (abort)
Backtrace: 0x40008155:0x3ffc54e0 0x40007d16:0x3ffc5500 0x401203bd:0x3ffc5540 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
================= CORE DUMP END =================
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
mode:QIO, clock div:2
I (1556) wifi: wifi firmware version: 90b1b8b
I (1557) wifi: config NVS flash: disabled
I (1557) wifi: config nano formating: disabled
I (1572) wifi: Init dynamic tx buffer num: 32
I (1573) wifi: wifi driver task: 3ffd5608, prio:23, stack:3584
I (1573) wifi: Init static rx buffer num: 10
I (1575) wifi: Init dynamic rx buffer num: 0
I (1579) wifi: Init rx ampdu len mblock:7
I (1583) wifi: Init lldesc rx ampdu entry mblock:4
I (1587) wifi: wifi power manager task: 0x3ffda9c4 prio: 21 stack: 2560
I (1594) wifi: sleep disable
I (2583) wifi: wifi timer task: 3ffdba40, prio:22, stack:3584
I (2599) wifi: Init ampdu: 0
I (2599) wifi: mode : softAP (24:0a:c4:00:a8:1d)
MicroPython v1.8.6-593-g8e4ed0fa on 2017-04-12; WiPy with ESP32
Type "help()" for more information.
I always got guru meditation error using another sd card (4GB, formatted FAT32) or changing board model used in the experiment (lopy instead of wipy) and changing the expansion board.
To verify the instructions could be causing problems, I tried to comment the source leaving as little as possible.
to get the core dump I just perform these steps:
from machine import SD
sd = SD()
As a last resort, I updated the firmware to the latest version (1.6.12.b1) of a wipy board and repeated the tests.
The execution of “sd = SD()” has always generated the same error.
Finally, I have verified that the error does not occur if I run individually and sequentially the instructions of the previous example on repl command line prompt.
In this case, all steps are executed correctly.
Is there a quick fix for this problem?
@mrainone @daniel Behavior confirmed. I added a few print statements between the lines to see where it fails. Sometimes it passed through the script, sometimes it just stalled, sometimes I get an guru mediation error. In case of failure, it happened at the statement:
sd = SD()
Pasting the scripts into REPL always works.
The core dump starts with (calling for saint Daniel):
/Users/danicampora/Code/Pycom/esp-idf-2017-03-12/components/freertos/./queue.c:1444 (xQueueGenericReceive)- assert failed! abort() was called at PC 0x40085501 Guru Meditation Error: Core 0 panic'ed (abort) Backtrace: 0x40008155:0x3ffc5670 0x40007d16:0x3ffc5690 0x40125065:0x3ffc56d0 0x4019e230:0x3ffc5700 0x401977b4:0x3ffc5720 0x40197ba6:0x3ffc5770 0x400e0ee0:0x3ffc57a0 0x400df756:0x3ffc57f0 0x400f2b8e:0x3ffc5830 0x400eace0:0x3ffc5850 0x400f62e8:0x3ffc5870 0x400ee697:0x3ffc5910 0x400eace0:0x3ffc5990 0x400eb776:0x3ffc59b0 0x400f3d46:0x3ffc5a40 0x400f40b5:0x3ffc5a70 0x400eb602:0x3ffc5b50 0x400f65d4:0x3ffc5b90 0x400ee697:0x3ffc5c30 0x400eace0:0x3ffc5cb0 0x400ead09:0x3ffc5cd0 0x400d8c38:0x3ffc5cf0 0x400d8eb3:0x3ffc5d80 0x400d7f76:0x3ffc5dc0 ================= CORE DUMP START ================= YCgAAAwAAABsAQAA 6D38P7BV/D9QX/w/ wFT8P/Be/D8ubAAA7Dr8P+w6/D/oPfw/5Dr8PxQAAAAMf/s/DH/7P+g9/D8AAAAA BQAAAFQ//D9NaWNyb1B5AAAAAAAAAAAAAAAAAFBf/D8AAAAAIQAGAAUAAAABAAAA AAAAAMhm/D8AAAAAAAAAAAAAAAC4MPs/IDH7P4gx+z8AAAAAAAAAAAEAAAAAAAAA iKNCPwAAAABIHQBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAA== KYEIgFWBAEA2BwYAFn0AgHBW/D97AAAAewAAABAAAAD/////AAAAAOv///9UOfw/ AQAAACQAAAAkAAAACAAAAP////8AAAAA/////wUAAAABAAAAAAAAAODCAED2wgBA AAAAAAgAAAD/////aBAIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA