Flash-sdcard.sh always fails on BTT Octopus v1.1

Basic Information:

Printer Model: Voron 2.4
MCU / Printerboard: BTT Octopus v1.1

Describe your issue:

When running this:
./scripts/flash-sdcard.sh /dev/serial/by-id/usb-Klipper_stm32f446xx_…-if00 btt-octopus-f446-v1.1

I get this:
Checking FatFS CFFI Build…
Connecting to MCU…Connected
Checking Current MCU Configuration…Done
MCU needs restart: is_config=1, is_shutdown=0
Attempting MCU Reset…Done
Waiting for device to reconnect…Done
Connecting to MCU…Connected
Initializing SD Card and Mounting file system…

SD Card Flash Error: Failed to Initialize SD Card. Is it inserted?
Traceback (most recent call last):
File “/home/pi/klipper/scripts/spi_flash/spi_flash.py”, line 1324, in _configure_mcu_spibus
self.fatfs.mount(printfunc)
File “/home/pi/klipper/scripts/spi_flash/spi_flash.py”, line 327, in mount
raise OSError(“flash_sdcard: failed to mount SD Card, returned %s”
OSError: flash_sdcard: failed to mount SD Card, returned FR_NOT_READY

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/pi/klipper/scripts/spi_flash/spi_flash.py”, line 1647, in main
spiflash.run()
File “/home/pi/klipper/scripts/spi_flash/spi_flash.py”, line 1587, in run
self.run_reactor_task(self.run_sdcard_upload)
File “/home/pi/klipper/scripts/spi_flash/spi_flash.py”, line 1570, in run_reactor_task
k_reactor.run()
File “/home/pi/klipper/klippy/reactor.py”, line 292, in run
g_next.switch()
File “/home/pi/klipper/klippy/reactor.py”, line 340, in _dispatch_loop
timeout = self._check_timers(eventtime, busy)
File “/home/pi/klipper/klippy/reactor.py”, line 158, in _check_timers
t.waketime = waketime = t.callback(eventtime)
File “/home/pi/klipper/klippy/reactor.py”, line 48, in invoke
res = self.callback(eventtime)
File “/home/pi/klipper/scripts/spi_flash/spi_flash.py”, line 1542, in run_sdcard_upload
self.mcu_conn.configure_mcu(printfunc=output_line)
File “/home/pi/klipper/scripts/spi_flash/spi_flash.py”, line 1359, in configure_mcu
self._configure_mcu_spibus(printfunc=printfunc)
File “/home/pi/klipper/scripts/spi_flash/spi_flash.py”, line 1327, in _configure_mcu_spibus
raise SPIFlashError(
SPIFlashError: Failed to Initialize SD Card. Is it inserted?

The SD card is inserted, and so far has been written by hand by removing it and putting it a computer to upload the latest firmware.

Since the BTT Octopus is listed in various versions as supported by the flash-sdcard.sh script, why would this not work?

Not all SD cards work with this method, especially big one like 64GB+. Try different cards and make sure they are properly formatted, e.g. with SD Memory Card Formatter for Windows/Mac | SD Association

You beat me to the reply. I have a number of 4GB (full size and micro) SD cards that I use for firmware updates on various printers/boards.

Maybe @Cyberwizzard has an old camera or phone that has an SD Card he can salvage or maybe a dollar store would have some he can try.

If I remember correctly that script only works with boards that use SPI and not DIO. I don’t think the Octopus boards use SPI for interfacing with the SD card.

Should work: https://github.com/Klipper3d/klipper/blob/6749985302fe002a9cb5672dab9badb11e4e3c36/scripts/spi_flash/board_defs.py#L61

I ran into the same error you were getting on this post. Based on what was discussed in this thread I went on an adventure to find the oldest microSD I could find. I tracked down a 16GB card. Once it was installed into the Octopus board. I was able to push the firmware using the flash-sdcard script. Thanks for the info.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.