🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    New Core FIRE devices: SD card not working in UIFlow

    Bug Report
    1
    1
    210
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Z
      zshall2
      last edited by

      The UIFlow 1.x firmware doesn't appear to be working with recently purchased Core FIREs. I've tried the factory firmware (1.8.1) as well as some other versions (1.9.1, 1.9.6, and 1.13.5). The error code I get in MicroPython is ENODEV (code 19).

      I'm using a 16GB SD card formatted with FAT32. The code of the program is the demo code for opening and reading a file, which I've verified exists on the card:

      5e173cb4-9d98-41f8-9078-79e761baac44-image.png

      Steps I've tried to troubleshoot include:

      • Switching UIFlow firmwares
      • Switching microSD cards
      • Trying the Arduino library with the Fire board (version 2.1.1) to see if I can open the SD card from this instead; the error I get is "SD Card initialization failed!" so SD.begin() is failing, which seems like the same category of error I saw in UIFlow (ENODEV).
      #include <M5Stack.h>
      #include <SD.h>
      #include <SPI.h>
      
      void setup() {
        // Initialize the M5Stack object
        M5.begin();
        
        // Set up the screen
        M5.Lcd.begin();
        M5.Lcd.setTextSize(2);
        M5.Lcd.setCursor(0, 0);
        M5.Lcd.fillScreen(BLACK);
        M5.Lcd.setTextColor(WHITE);
        
        // Initialize SD card
        if (!SD.begin()) {
          M5.Lcd.println("SD Card initialization failed!");
          return;
        }
        
        M5.Lcd.println("SD Card initialized.");
        
        // Open file
        File file = SD.open("/config.json");
        if (!file) {
          M5.Lcd.println("Failed to open config.json!");
          return;
        }
        
        M5.Lcd.println("config.json contents:");
        
        // Read file and print to screen
        while (file.available()) {
          char c = file.read();
          M5.Lcd.print(c);
        }
        
        // Close file
        file.close();
      }
      
      void loop() {
        // Nothing to do here
      }
      

      I've tried downloading a 3rd party firmware (the MP3 player in M5Burner, published in 2020) to see if others programs fail to open the SD card and this one failed; telling me to insert the SD card and reboot over and over.

      I downloaded a 3rd party firmware published recently (M5Launcher Core 16Mb (Fire, Basic, Gray)) and this one did successfully open the SD card and could see the files on there, which makes me think it's related to firmware or software in some way.

      One year ago I bought some other Core FIRE devices and these ones worked with the SD card. The new ones purchased in the last few weeks do not appear to behave the same way; when updating them to the latest UIFlow firmware I've experienced black screens on multiple devices with boot loops. Here's one example from the serial monitor:

      Rebooting...
      ets Jul 29 2019 12:21:46
      
      rst:0xc (SW_CPU_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:1
      load:0x3fff0018,len:4
      load:0x3fff001c,len:5228
      load:0x40078000,len:13424
      load:0x40080400,len:3568
      entry 0x4008063c
      Guru Meditation Error: Core  0 panic'ed (InstrFetchProhibited). Exception was unhandled.
      Core 0 register dump:
      PC      : 0x8018b0cc  PS      : 0x00060530  A0      : 0x80098e02  A1      : 0x3ffbbcf0  
      A2      : 0x3ffc6c0c  A3      : 0x00000008  A4      : 0x00000001  A5      : 0x00000000  
      A6      : 0x00000001  A7      : 0x00060e23  A8      : 0x8018b0cc  A9      : 0x3ffbbcd0  
      A10     : 0x00000000  A11     : 0x40093634  A12     : 0x401fedbc  A13     : 0x3f55c2b3  
      A14     : 0x00000003  A15     : 0x00060023  SAR     : 0x00000000  EXCCAUSE: 0x00000014  
      EXCVADDR: 0x8018b0cc  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000  
      
      ELF file SHA256: 0000000000000000
      
      Backtrace: 0x4018b0c9:0x3ffbbcf0 0x40098dff:0x3ffbbd10 0x40097949:0x3ffbbd30
      

      I never experienced anything like this on the devices I bought last year; is it possible that the hardware internals have changed in a way that is causing bugs on these new devices that wasn't happening on the older ones?

      Any help is greatly appreciated!

      1 Reply Last reply Reply Quote 0
      • First post
        Last post