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

Flash power-up in boot_stage2 #2111

Open
matsobdev opened this issue Nov 28, 2024 · 1 comment
Open

Flash power-up in boot_stage2 #2111

matsobdev opened this issue Nov 28, 2024 · 1 comment

Comments

@matsobdev
Copy link

matsobdev commented Nov 28, 2024

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.

@matsobdev
Copy link
Author

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 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