Skip to content

MIMXRT105x family deep sleep code needs help #188

Open
@multiplemonomials

Description

@multiplemonomials

The current version of the deep sleep code is based on the "lpm.c" example from MCUXpresso SDK, modified to work with Mbed's clock setup. It mostly works, but it has some issues. Namely, the SwitchSystemClocks() function has to clear the I-cache whenever it executes, or we get hard faults when coming out of sleep. Additionally, the mbed-hal-lp-ticker and mbed-hal-rtc tests experience some sort of wonky stack corruption (I think...) when coming out of deep sleep. I don't seen an obvious smoking gun for this, and I'm unsure if it's related to FlexSPI being weird or if it's something else entirely.

Also not helping is the fact that the official AN12085 app note seems to say that you can't change the FlexSPI clock at all when doing XiP, so maybe it's just impossible?

Anyway, I think that someone needs to go through and do a more detailed look at how the deep sleep / low power code is set up and whether it's the right way to do it. Then, we need to look into debugging those tests and debugging why the I-cache clear is needed. See #187 for the last time I worked on deep sleep stuff...

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDis is broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions