Resetting the variable to the previous 4000000 (4M), enables this script to work with the SKR Mini E3 V3 board. Unclear to me why this is the case, but I think this issue should be reopened.
The error message with spi speed set to default: 400K
Flashing /home/pi/klipper/out/klipper.bin to /dev/ttyAMA0
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 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 1328, in _configure_mcu_spibus
"Failed to Initialize SD Card. Is it inserted?")
SPIFlashError: Failed to Initialize SD Card. Is it inserted?
Change SD_SPI_SPEED = 4000000
Flashing /home/pi/klipper/out/klipper.bin to /dev/ttyAMA0
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 Information:
Version: 2.0
SDHC/SDXC: True
Write Protected: False
Sectors: 62333952
manufacturer_id: 3
oem_id: SD
product_name: SE32G
product_revision: 8.128
serial_number: 2174F315
manufacturing_date: 8/2019
capacity: 29.7 GiB
fs_type: FAT32
volume_label: UNTITLED
volume_serial: 2130514434
Uploading Klipper Firmware to SD Card...Done
Validating Upload...Done
Firmware Upload Complete: firmware.bin, Size: 26020, Checksum (SHA1): 7B08ECCCC5823C01FA284C6AAC7768F45091153F
Attempting MCU Reset...Done
Waiting for device to reconnect...Done
Connecting to MCU...Connected
Verifying Flash...Version matched...Done
Firmware Flash Successful
Current Firmware: v0.11.0-169-g83308a10
Attempting MCU Reset...Done
SD Card Flash Complete
Reference GitHub issue #5465, which has been closed.
What is the best way to reopen this ticket and change the board rate back to 4000000 (4M)?
Hi @Sineos, sorry to ping you. Do you remember this SD_SPI_SPEED issue raised over at Github? #5465
I have been personally experiencing this issue and I have seen a few here in this forum having the same issue with the change of the SPI speed from 4M to 400K. Since the change last year I have no longer been able to flash the Spider via the flash-sdcard.sh. I have to manually change the SD_SPI_SPEED to 4M every time I git pull klipper.
Since your username was on the original issue and you confirmed this was the issue, are you able to assist?
Actually this is quite strange. I had this issue once with my SKR 1.4T board (where I posted in the mentioned GH issue) but I have not been able to reproduce it. Directly flashing it works without a hitch and I flash really often.
Maybe @Arksine has an idea.