Skip to content

Modchip fails to flash large (>80Kb) firmware updates #24

@lulle2007200

Description

@lulle2007200

I tried to flash a a large firmware to the rp2040 (by writing it to boot0, and setting the firmware update command), but that didn't work.
I did investigate a bit and found the following:

  • The modchip successfully copies the new firmware from BOOT0 to the inactive firmware slot (I've checked that the entire binary is written to the modchip flash and that the CRC matches with what is expected)
  • The modchip successfully issues a reset by watchdog_enable(0, false) (see here)
  • The busk bootloader runs again as expected, but it doesn't try to boot the other firmware slot that has just been updated. watchdog_enable_caused_reboot() and watchdog_caused_reboot() both evaluate to false, so the bootloader boots the initial slot with the "old" firmware again (see here)
  • What appears to fix the issue is disabling the pull down on the reset pin PIN_RST early on in busk bootloader, then the new firmware is flashed successfully and the busk bootloader boots swaps the slots and boots the new firmware as expected.

I have no idea what might cause this. It works fine without modifications for smaller firmwares.

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