Error on downloading to M5StickC



  • Would you like to create a sub category for M5 StickC?

    Anyway, I have caught a following error at downloading with "ESP32 Pico Kit".
    Do you have a counter measure about that?

    -------->8---------------->8---------------->8--------
    /Users/username/Library/Arduino15/packages/esp32/tools/esptool_py/2.6.1/esptool --chip esp32 --port /dev/cu.usbserial-AD52EECE41 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 /Users/username/Library/Arduino15/packages/esp32/hardware/esp32/1.0.2-rc1/tools/partitions/boot_app0.bin 0x1000 /Users/username/Library/Arduino15/packages/esp32/hardware/esp32/1.0.2-rc1/tools/sdk/bin/bootloader_dio_80m.bin 0x10000 /var/folders/bw/h67q3vkj4rl_2pdg5k3h5yqm0000gn/T/arduino_build_835267/FactoryTest.ino.bin 0x8000 /var/folders/bw/h67q3vkj4rl_2pdg5k3h5yqm0000gn/T/arduino_build_835267/FactoryTest.ino.partitions.bin
    esptool.py v2.6
    Serial port /dev/cu.usbserial-AD52EECE41
    Connecting....
    Chip is ESP32-PICO-D4 (revision 1)
    Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, VRef calibration in efuse, Coding Scheme None
    MAC: d8:a0:1d:69:5d:b8
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 921600
    Changed.
    Configuring flash size...

    A fatal error occurred: Timed out waiting for packet header
    A fatal error occurred: Timed out waiting for packet header
    -------->8---------------->8---------------->8--------



  • The error has been solved myself.
    It seems that the baud rate 921600 does not supported by M5StickC.
    1.5M might be best by modified "boards.txt."


  • M5Stack

    Congratulation to you @tokuhira

    M5StickC 支持的波特率: 1200 ~115200, 250K, 500K, 750K, 1500K



  • @m5-docs

    OK, so I too am experiencing the "out of the box 'Timed out waiting for packet header' " error. I'm on Mac OSX and using the latest version of the Arduino IDE. The getting started video (https://www.youtube.com/watch?v=ppXkl0046dc) says to use a baud rate of 115200, but that produces the error.

    It sounds like one solution is to modify boards.txt and add an option for a baud rate of 1500K...
    (please correct me if I'm wrong)

    On OSX, it appears that boards.txt is located inside the application's package contents, so after "show package contents, it's in /Contents/Java/hardware/arduino/avr/boards.txt
    (again, please correct me if I'm wrong, and let me know if there's a different boards.txt I should be editing)

    OK, so I have boards.txt opened in a text editor... I'm unfamiliar with this file and its format... what needs to be changed? Looking through the file, it appears that there are groups of settings for different boards, however, I searched the file for "m5" and also "stick" but these strings were not found within the file.

    Thanks,

    Jeff



  • @jeffb no, no, no don't edit the files!

    There are 2 causes for the error that has plagued M5Stack since the beginning.

    1st - driver issue. the driver is temperamental in osx and often does not work.
    2nd and most important as its the biggest issue. The factory USB leads are often faulty and or just rubbish. Always use a high quality USB sync/data lead. something over the £10/$10 price range and never fold the lead, always roll it.

    I had this issue when I first started as I have only OSX.
    Also, when you install any new board or library in arduino, ALWAYS close arduino and restart it!