-
Notifications
You must be signed in to change notification settings - Fork 67
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
Doesn't go to low power mode #105
Comments
Answering without schematic of what is wired on your board will be difficult. For sure there is an issue because calling |
@kungfupizza please check how the TCXO pin is wired, by default it should be connected to PA12 which turns it off, should that be your issue. Here is an example project you could use to help you out: https://github.com/IRNAS/smartparks-rhino-tracker-hardware |
The TCXO should be about 1mA. Without some schematics it's impossible to tell. |
Looks like you did not connect PA8 to USB_VBUS. So I suspect that the USB code goes crazy and this is why it refuses to go into low power modes. |
Is there some way to not let the controller get into the USB code? |
From where do you measure your current? Between 5V and the DC/DC input? |
No, I measure it after 3.3V conversion. Also like I had mentioned, the LEDs have been removed while testing. |
Two suggestions from my recent experience:
|
Interesting. Serial1 / SPI / Wire should have all clocks shut down they use (HSI16), unless there is something else going on. N.b. that the system will stay in SLEEP mode if a background activity is still going on (or wakeup of Serial1 is selected with a baudrate higher than 19200). There might be a bug in 0.0.10, but in the current repository this is working correctly. For USB HSI48 is turned off on USBDevice.detach(). There is no HSI64. If you are in a debugger (which will draw more power, enabled via STM32L0.swdEnable()). you can print out stm32l0_system_device and see what should be enabled. |
I wanted to see if this still happened with the master version, but I could no longer reproduce this (with either the master version or 0.0.10). Not sure what happened there, but now I also get a low power usage (I've seen 18-30μA for my whole board) in stop mode, even after calling
Oh, I meant HSI48 there, w00ps.
Yeah, I see that HSI48 is now turned off, but I'm still seeing significant power usage (3mA or so) in stop after calling |
There was another component on my board that was not always properly put to sleep during some of my tests, so that explains the extra power usage I was sometimes seeing. This explains the earlier higher measurements and the 3mA USB current as well. With that extra component disabled, I see 20-ish μA in stop mode with USB disabled at compiletime, but still 300-ish μA with USB enabled but detached.
This seems to be the pullup indeed, explicitly unsetting the |
Hello ! I'm facing an issue to put my device in sleep mode. It's working properly if the USB_VBUS pin is down (consumption = ~1,5uA) but the device doesn't sleep if the USB_VBUS pin is high (consumption = ~3mA). Is there a way to "accept" the sleep even if the USB_VBUS is high (something like an uC register to set during the initialization) ? (This is the same diode problem as explained at the end of this topic -> #63 ) |
Yes, it's working with USBDevice.detach(), thanks a lot ! |
Hi,
I am using a custom board with nothing but LoRa murata IC and two relays. I made a small program to test the stop and sleep function.
I cannot see the controller going in the sleep/stop mode. When awake, the current consumption is at 4.6mA and when in sleep, it goes to 4.3mA. Not a drop at all. While my test codes look like below,
#include"STM32L0.h"
void setup() {
Serial1.begin(115200); //I need to use Serial1 not Serial
}
void loop() {
Serial1.println("I am awake");
delay(5000); //Awake time.. 4.6mA
Serial1.println("Going in stop mode");
STM32L0.stop(5000); //Stop time.. 4.3mA //Also used sleep, but it comes to same 4.3mA.
}
My board doesn't have any LEDs or other peripherals. Just two relays, which I don't use at all here.
What is it that I am doing wrong?
The text was updated successfully, but these errors were encountered: