Lowering Current consumption and unused MDot pins!
Tagged: Current Consumption., Unused PINS Mdot
- This topic has 7 replies, 2 voices, and was last updated 7 years, 9 months ago by Leon Lindenfelser.
-
AuthorPosts
-
February 21, 2017 at 3:01 pm #17396Ajay KParticipant
We are in our final stages of building our custom board with MDot on it, and one of the questions that came up, was how best to deal with the unused PINS on the mdot?
1) Since it would be left floating (if that is the right terminology even). Would that effect current consumption firstly both during wake and deep sleep mode?
One of the suggestions provided was to configure all the Unused PINS on the mdot as an DigitalIn pin, with a pull down resistor using the DigitalIn object defined in the MBED API.
2) Are there any concerns or suggestions the Multitech team has in terms with this approach, if so what would those concerns be?
3) if there are any concerns so what would you suggest we configure the unused PINS on the mdot so that the power/current consumption can be at its lowest during wake/deep sleep modes?
Thanks,
AjayFebruary 22, 2017 at 9:02 am #17403Leon LindenfelserModeratorHi Ajay,
If you are using our libmDot-mbed5 or libmDot-dev-mbed5 library code version 2.0.15 or later, all the IO will be taken care of for you in deepsleep. In sleep mode the internal IO are taken care of but the external IO are left to your discretion. So in sleep mode, you can set external IO to remain in whatever state your attached equipment requires. If none of those pins are attached to anything, use deep sleep.
Are you familiar with our example code? This shows what we do with the IO in the libmDot libraries.
https://developer.mbed.org/teams/MultiTech/code/Dot-Examples/
The following functions in dot_util.cpp save, configure and restore IO. For lowest power consumption analog no-pull is recommended.
void sleep_save_io()
void sleep_configure_io()
void sleep_restore_io()Kind regards,
LeonFebruary 22, 2017 at 1:50 pm #17410Ajay KParticipantHi Leon,
Thanks for taking the time to respond to my queries. I am using a version of the development library which supports the deep sleep version you mentioned and I do use the deep sleep mode. So I am covered in the case when the application is in deep sleep mode.
However I guess my question should have been what should I do with the unused IO Pins when the application is up and running so the power consumption is at the lowest? I have seen those methods in the dot_utils.cpp, however I assumed those were applicable only under sleep mode, can I use any of the code when the application is up and running?
Any guidance in this matter is greatly appreciated.
Thanks,
AjayFebruary 22, 2017 at 2:06 pm #17411Leon LindenfelserModeratorHi Ajay,
Since analog no-pull is the least power usage, I would initialize any unused pins as such. Unless your application changes their configuration, I would expect them to remain as analog no-pull through sleep and wake. You shouldn’t have to re-initialize them on wake up.
Kind regards,
LeonFebruary 22, 2017 at 2:31 pm #17412Ajay KParticipantThanks Leon, So hopefully I am understanding what you have mentioned in your last post. So when the MDot goes into a deep sleep mode, are the pins configured as analog in no-pull? when they wake up the already pre-configured pins are restored to what they were configured for and all the rest of the unused pins stay analog in, no-pull?
So in summary I wouldn’t have to do initialize any of the un-used pins in my application. I have a couple of pins that I use as AnalogIn, Digital In, Digital Out, and I do use the MDot’s I2C pins, those will remain configured as is when mdot wakes up right?
Thanks,
AjayFebruary 22, 2017 at 3:04 pm #17416Leon LindenfelserModeratorHi Ajay,
Yes, pins are configured as analog no-pull in deep sleep.
Upon entering deep sleep…
1. external pin configurations are saved
2. all possible internal and external pins are set to analog no-pull
upon waking…
3. external pin configurations are restored
Yes, the pins will be restored to whatever you had them configured as before deep sleep.If you invoke sleep rather than deep sleep, the external pin configurations are left to your discretion. Only internal pins are set for analog no-pull. This is in case you have attached components that require a certain state to achieve maximum power savings. Configure the rest as analog no-pull. This is where the example code would be particularly helpful.
I think it would be good practice to initialize any unused pins as analog no-pull. I’m not sure what state they come in by default. This should just be part of you power up initialization. No need to do it upon waking as waking from deep sleep restores them and sleep never touches them.
Kind regards,
LeonFebruary 23, 2017 at 11:58 am #17430Ajay KParticipantThanks Leon for your inputs. I just used the sample code in the dot_utils.cpp to configure the few pins that were unused on power up/reset as analog no pull. Although If look at the URL PeripheralPins.c file some of the pins I wanted to configure seem to be already configured for analog no-pull.
Thanks,
AjayFebruary 23, 2017 at 12:14 pm #17431Leon LindenfelserModeratorHi Ajay,
Sounds good. Have you taken power measurements yet?
Kind regards,
Leon -
AuthorPosts
- You must be logged in to reply to this topic.