-
Notifications
You must be signed in to change notification settings - Fork 257
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
Add sleep features for MSP430 and MSP432 boards #75
Conversation
…on MSP430 but needs more tests to be sure it's working)
…boards from energia
Thank you. Will definitely look into this. |
Please test the "testing" branch. I updated with your changes and overall support with custom sleep function. |
I tried your testing branch with one of my MSP430 boards using the two first examples to see if the sleep works and it works OK :) Here is the power trace of the Scheduler_example01 (without sleep) running: Here is the power trace of the Scheduler_example02 (with sleep) running: I can confirm the sleep is working as the mean current and total energy usage of the sketch running for 60 seconds is way below without the sleep and the I don't have the time right now to test the MSP432 board but there shouldn't be any problem, the |
Awesome! Could you please test with example 6 IDLE?
You can also play with various sleep methods ideas using example 23....
Thanks for your help!
On Jun 12, 2019 2:38 AM, Guillaume Pirou <[email protected]> wrote:
I tried your testing branch with one of my MSP430 boards using the two first examples to see if the sleep works and it works OK :)
Here is the power trace of the Scheduler_example01 (without sleep) running:
[example01_power_trace]<https://user-images.githubusercontent.com/10993286/59327218-2bb40f00-8ce9-11e9-945e-7ee0d1669f62.PNG>
Here is the power trace of the Scheduler_example02 (with sleep) running:
[example02_power_trace_1]<https://user-images.githubusercontent.com/10993286/59328499-d0841b80-8cec-11e9-98df-3f4853775ddb.PNG>
I can confirm the sleep is working as the mean current and total energy usage of the sketch running for 60 seconds is way below without the sleep and the Serial.println of Task2 does occur every around 500ms.
I don't have the time right now to test the MSP432 board but there shouldn't be any problem, the delay call does all the work.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#75?email_source=notifications&email_token=AACMMTL4NQWTQ27R22Y3WUTP2CKUTA5CNFSM4HWJLRR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXPM4AQ#issuecomment-501140994>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AACMMTL6IX2CLNU72ZVAHMLP2CKUTANCNFSM4HWJLRRQ>.
|
I tried the example 6 IDLE (with sleep disabled and enabled) and the example23 on my MSP430 board, then ran them again on my MSP432 board and they all seem to run ok. I took some screenshots of the results if you're interested: Example 6 (without uncommenting the The same example with the define uncommented (the mcu used less power and Running the example 23 the timings using the empty sleep are identical to the delayed one by 1 millisecond but used more power, so the mcu sleep also worked here: For the MSP432, the tests also ran OK: Example 1: Example 2: Example 6 with Example 6 with Example 23: So in conclusion: everythings works OK and I think your addition of the |
Thank you! This is the most thorough test I have received so far from anyone!!! |
You're welcome :) |
Hello,
I modified a little bit your library to enable MSP430 and MSP432 based boards to use the sleep feature. It doesn't require a lot of change, just calling the
sleep
function on MSP430 boards anddelay
on MSP432 (as it uses TI-RTOS,delay
yields the current thread and if there aren't any other TI-RTOS threads than the main Energia thread, it will put the board to sleep until the delay expires)