Flash power-up in boot_stage2 #2111

Open
opened 2024-11-28 03:14:52 -06:00 by matsobdev · 1 comment
matsobdev commented 2024-11-28 03:14:52 -06:00 (Migrated from github.com)

User gmx suggested on the forum, that powering flash down can further lower power consumption. And it works indeed - about 10 uA (typically). Using powman with BOOT0..3 registers set to 0, as I understand it boots back from flash, especially when sleeping in P1.7 with no SRAM retention, like in powman example here. Powered down flash responds to 0xAB instruction only, and any boot2 doesn't seem to revive it that way.
So my request here is, that maybe it will be useful to have conditional (ex. using SCRATCH0..7 register value) sending of an 0xAB instruction in case, flash was powered down before.

User `gmx` suggested on the [forum](https://forums.raspberrypi.com/viewtopic.php?t=378659&start=25#p2272217), that powering flash down can further lower power consumption. And it works indeed - about 10 uA (typically). Using `powman` with `BOOT0..3` registers set to 0, as I understand it boots back from flash, especially when sleeping in `P1.7` with no SRAM retention, like in `powman` example [here](https://github.com/peterharperuk/pico-examples/tree/powman/powman). Powered down flash responds to `0xAB` instruction only, and any `boot2` doesn't seem to revive it that way. So my request here is, that maybe it will be useful to have conditional (ex. using `SCRATCH0..7` register value) sending of an `0xAB` instruction in case, flash was powered down before.
matsobdev commented 2024-12-04 16:53:39 -06:00 (Migrated from github.com)

Actually it was easier done, than said. Just reused:

    // Send revive command, discard RX
    movs r0, #CMD_REVIVE
    str r0, [r3, #QMI_DIRECT_TX_OFFSET]
    bl wait_qmi_ready
    ldr r0, [r3, #QMI_DIRECT_RX_OFFSET]

as the fist command (for ARM) and it works both for cold start and restart from sleep at powman. I think I can make a PR out of it.

Actually it was easier done, than said. Just reused: ``` // Send revive command, discard RX movs r0, #CMD_REVIVE str r0, [r3, #QMI_DIRECT_TX_OFFSET] bl wait_qmi_ready ldr r0, [r3, #QMI_DIRECT_RX_OFFSET] ``` as the fist command (for ARM) and it works both for cold start and restart from sleep at `powman`. I think I can make a PR out of it.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk#2111
No description provided.