You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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...
The text was updated successfully, but these errors were encountered:
Another thing to work out is what to do about the other PLLs. Some of them can probably be turned off permanently. Others probably can be turned off (in deep sleep and from boot) but have to be turned back on if certain features (e.g. Ethernet) are using them.
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
andmbed-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...
The text was updated successfully, but these errors were encountered: