Skip to content

Unable to reflash STM32 using Katapult after first time #149

@sshantt

Description

@sshantt

I am trying to get Katapult working on my STM32H723 board. I want to get it working so that I can update firmware remotely.

I first connected the board to my macbook and flashed Katapult. I set the LED pin correctly and as soon as the flash was over the LED started blinking once every two seconds indicating that the board was in Katapult flash mode. Still on my macbook, I proceeded to use the Katapult python commands in order to flash Klipper on there. I made sure the Klipper offset was set to 128kb when creating the firmware file. The operation was successful and I tested klipper on a raspberry pi that had mainsail and klipper installed and verified it worked perfectly.

The next step was to verify Katapult could enter into Katapult flash mode remotely. So I connected it back to my Macbook (does not have klipper installed) and tried to flash again using the same Katapult python command. This resulted in failure with the following message "Attempting to connect to bootloader INFO:root:Response for command CONNECT timed out". Clearly Katapult was no longer able to put the board into katapult flash mode anymore for some reason. I tried to connect it to the raspberry pi and try to flash it remotely that way but got the same message.

Since I enabled the "Support bootloader entry on rapid double click of reset button" option, I tried to do that in order to check if the board would go into katapult flash mode. This didnt work since the LED didnt start flashing like it did when I first installed katapult.

Next I connected the board to the macbook using DFU mode to check if Katapult was still on the STM32 chip. Reading the content showed me that the first 6kb or so were identical to the katapult.bin file I used initially. Next there was 122kb of empty space followed by the 31kb of data which matched up with the klipper.bin I used. As far as I could tell, Katapult was still on there and hadnt been replaced.

I tried all different baud rates, I tried stopping all processes that were using the particular USB interface and a few more things but was not able to get the python code to get past "Attempting to connect to bootloader". I tried to completely clear the flash on the STM32 chip using STM32Cubeprogrammer and installing Katapult again from scratch and then using it to install klipper, and got the same results.

While klipper is installed and running on the STM32 board, the commands that Katapult python script sends are not working. I proved this by deleting kilobytes 128 onwards that contained klipper. The board then immediately booted into katapult on the next boot. I was able to verify this by observing the LED blink every 2 seconds again and the next flash through katapult worked just fine. Subsequent flashes once klipper was installed failed.

Not sure what to try next. Has anyone experienced this or knows what I should do?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions