-
I am using the system PM on the stm32l4 board because I want to use the As I understood, when CONFIG_PM is enabled I can implement my own power management policy, and my policy would be when turned on go to PM_STATE_ACTIVE and stay there as long as I don't tell you to go to some other state. In prj.conf I have enabled following things: My policy handler is very simple:
The problem I have, is that after turning on, my stm32l4 after few seconds just stops working, I don't get anything on the serial output anymore and it seems like it is in some deep sleep mode because it is totally unresponsive. In my main.cpp i have forbidden any other state then PM_STATE_ACTIVE, so I don't understand how this can happen:
What I also don't understand is that after debugging I see that once I tell the smt32l4 to go to PM_STATE_ACTIVE it still continuously enters the Also, I have tried to use the other two power management policies: Residency and Dummy and it didn't work for me. Am I missing something or am I totally on the wrong track here? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
@ivonalo It's hard to answer in detail when we don't have the complete view on application implementation (as well as on potential patches in the code tree). Anyway, would you mind providing the SHA1 you're using ? There are some on going changes on pm subsystem and it can have impact on what you're seeing. Also, did you have a try to enable CONFIG_DEBUG? It should help in debugging your case. |
Beta Was this translation helpful? Give feedback.
-
@erwango, let me jump in into your discussion. I have taken over the task from @ivonalo, and would like to ask you some further question regarding the As @ivonalo mentioned, our goal is to be able to put stm32l4 MCU into low power modes (stop0, stop1, stop2), and to be able to call the function I would appreciate very much you assistance as to what to change and how to debug the problem. I tried the following so far:
In both cases, I tried with both I also looked at the power management policy, but I don't think this is an issues at the moment. This is the code in
Since I don't have As they are potentially many things to explore, as the very first step, I would like to have
Currently, I can't even get that to work, which means the code doesn't even reach int main, rather it is stuck somewehere in the kernel/initialization. Your help is greatly appreciated. I am on the latest official release (v2.7.0-rc1). |
Beta Was this translation helpful? Give feedback.
-
Yes, you should. Anyway, at least it seems to be enabled.
Also, from what I understand you're trying to implement your worn version of power management on unknown hardware (to me at least).
|
Beta Was this translation helpful? Give feedback.
Yes, you should. Anyway, at least it seems to be enabled.
And for sure, to use LSE, you need to have an external oscillator available.
If this is not the case, then, you should select LSI. This can be done by adding the following in your board's
Kconfig.defconfig
file:Also, from what I understand you're trying to implement your worn version of power management on unknown hardware (to me at least).
It will really be difficult to provide you support in these conditions.
So I'd suggest to get back to a known state, and …