Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3847

General • Re: New way to upgrade firm

$
0
0
It can also trigger accidentally, as I've already seen happening.
I suggested the baud rate trigger should be a two-step process, one unusual baud rate followed by another within a time window, so opening at 1200 baud could be done without triggering an entry into BOOTSEL mode but they went for the instant trigger approach.

What annoys me is that MicroPython by default doesn't accept either, not baud rate change nor 'picotool' vendor USB commands, so you have to invoke BOOTSEL mode via a forced program.

In that respect, and because 'ampy' is outdated and has some issues under Bookworm, I have just finished updating my utility which will force BOOTSEL mode as quickly as possible regardless of what's running on the chip. For interest the algorithm is as follows -

Code:

If already in BOOTSEL mode    FinishedIf 'lsusb' indicates MicroPython is running    If the '/dev/ttyACMn' serial port exists        If 'mpremiote' installed            Use 'mpremote' to execute a "machine.bootloader()" command            If in BOOTSEL mode                FinishedUse 'picotool' to force entry to BOOTSEL modeIf in BOOTSEL mode    Finished   If the '/dev/ttyACMn' serial port exists    Open the serial paort with 1200 baud    If in BOOTSEL mode        Finished    If 'mpremote' installed        Use 'mpremote' to execute a "machine.bootloader()" command        If in BOOTSEL mode            FinishedReport BOOTSEL mode must be manually entered
I just wish other frameworks - yes I'm looking at you PlatformIO, but I'm sure I have seen others - would do something smarter than just opening with 1200 baud, expecting it to have worked, and reporting an error when it doesn't.

Statistics: Posted by hippy — Mon Dec 02, 2024 8:49 pm



Viewing all articles
Browse latest Browse all 3847

Trending Articles