Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

embassy_boot BlockingFirmwareUpdater::prepare_update() needs more time then possible with Watchdog (RP PicoW) #3568

Open
kolbma opened this issue Nov 24, 2024 · 1 comment

Comments

@kolbma
Copy link

kolbma commented Nov 24, 2024

I'm stumbling at the moment over some strange stuff.
I've 2 RP PicoW boards.
While board A has no problem with the code:

watchdog.feed();
let writer = updater
    .prepare_update()
    .map_err(|err| {
        error!("flash-update: {:?}", err);
    })
    .unwrap();
debug!("flash-update: writer available");

It is far quicker then the 8 watchdog seconds. (~2 seconds)

The board B hangs in updater.prepare_update() and is reset by watchdog.
With disabled watchdog board B works, too. But it needs indeed about 10 seconds to continue.

Next to this there is no difference detectable for me when writing flash to the 2 boards with the usual tools.

@kolbma
Copy link
Author

kolbma commented Nov 24, 2024

Is there any tracing I can somehow activate to see what it is doing in the 10 seconds exactly?

I've enabled defmt feature for everything I could find, but there is only the following:

TRACE DFU: 0xe6000 - 0x1c6000
└─ embassy_boot::firmware_updater::blocking::{impl#0}::from_linkerfile_blocking @ .cargo/git/checkouts/embassy-9312dcb0ed774b29/c9abff5/embassy-boot/src/firmware_updater/blocking.rs:68  
TRACE STATE: 0x6000 - 0x7000
└─ embassy_boot::firmware_updater::blocking::{impl#0}::from_linkerfile_blocking @.cargo/git/checkouts/embassy-9312dcb0ed774b29/c9abff5/embassy-boot/src/firmware_updater/blocking.rs:75  
INFO  flash-update: preparing
└─ rp2040w_santas_sleigh::flash_update::flash_update @ src/flash_update.rs:100 
TRACE Reading from 0x10006000 to 0x10006001
└─ embassy_rp::flash::{impl#4}::blocking_read @ .cargo/git/checkouts/embassy-9312dcb0ed774b29/c9abff5/embassy-rp/src/flash.rs:128 
TRACE Erasing from 0x100e6000 to 0x101c6000
└─ embassy_rp::flash::{impl#4}::blocking_erase @ .cargo/git/checkouts/embassy-9312dcb0ed774b29/c9abff5/embassy-rp/src/flash.rs:152 
DEBUG flash-update: writer available

With started watchdog it never comes to the last line, with commented out watchdog start I get the above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant