Background tasks in deepSleep() ? #4696
Replies: 1 comment
-
Posted at 2018-10-09 by @gfwilliams Yes, it is coming out of sleep a bit early sometimes. Basically the STM32F1 in the Espruino Original board can only wake up on the nearest second (not any more accurately), so what happens is:
The extra flashes are probably because of that... Posted at 2018-10-09 by Georg With other timeouts it doesn't do it, for example 10000 ms. The Pico RTC alarm is more accurate and doesn't do it? Posted at 2018-10-09 by Georg Gordon, my 1.3b original comes without the RTC xtal? Posted at 2018-10-09 by @gfwilliams Yes, I believe the original boards that were produced for the KickStarter didn't have a low-speed oscillator. It's something I added for later revisions. For 10000 ms it's unlikely to do it because it's a multiple of 1 second, which the RTC can handle. Posted at 2018-10-09 by Georg The current originals and Picos come with the RTC xtal? Posted at 2018-10-09 by @allObjects PICOs were planned to have it populated, but for some reason it did not go into production, but can be after market populated with the - now available - RTC xtal component. There is a(t least one) conversation out there about it: Real time clock on Pico (rev 1.4). How it works on Espruino-Wifi, I don't know. Posted at 2018-10-09 by Georg Thanks "allObjects". I can't solder such a tiny thing, much less the microscopic crapacitors :-) Gordon, how can I get some espruinos with the xtal in place and tested? Posted at 2018-10-09 by @allObjects ...you hair-dry them... but yes, it's not one of everyone's basic tasks... I now that @drazzy does such things with success and, of course @gfwilliams. A custom order / service may get you there. Posted at 2018-10-10 by @gfwilliams The WiFi boards and new Original boards both come with the low speed oscillator fitted (LSE) - unfortunately Pico wasn't because the chip in it requires a very specific type of crystal to work reliably, which I only found out just before production. So if you want a low speed oscillator:
Also worth noting that the non-Original boards can wake up from the RTC much more accurately (to 1/32k of a second) so the Posted at 2018-10-13 by Georg Ok, good to know, thanks! I have two originals and a Pico to play with, if I can pull it off "the espruino way" (in javascript), then I'll have to decide whether to use one or the other. Posted at 2018-10-13 by @allObjects Even though the original board has way more GPIOs, I'm a proponent of using PICO. First, it has more - double - RAM / variables - 50% more flash, and is slightly faster, smaller foot print, and does not have the specialized prototype area, that - most of the time does anyway not cater to the specific needs you have - AND, may be the most helpful thing - the ports are all 5V tolerant. Should you really run out of GPIOs, there are easy ways to mend that: adding serially driven shift registers or port expanders. The issue that 8 pins are on 0.05" pitch is not really an issue because you can choose my or @gfwilliamss approach to make all pins friendly to breadboard and 0.1" pitch: Breadboard friendly PICO (There are other options as well: shims from @gfwilliams and breakout boards fromn @drazzy). Attachments: Posted at 2018-10-15 by Georg The lower the power the better for me, both in deep sleep and while running. Is that the mdbt42q? Posted at 2018-10-15 by @gfwilliams Yes, the MDBT42Q definitely has the edge on power consumption - although it isn't as fast. Also on the MDBT42 you don't need Posted at 2018-10-15 by Georg Good to know, thanks. IIRC l've seen a benchmarks folder somewhere in the repository in github? Are there any benchmarks to see anywhere? Posted at 2018-10-16 by @gfwilliams
No, there were a set of benchmarks produced for each build on the Original Espruino board, but that hasn't been done for years. It's been my plan to resurrect the per-build benchmarks and tests on the hardware, but that hasn't happened yet :( Posted at 2018-10-18 by Georg Hey, thank you very much! I think I'll better ask the other power related things in another post, to keep things tidy. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-10-09 by Georg
Hello!
I have an espruino original v1.3b with the latest 1.99 firmware, when I run this:
reset()
save()
and plug it into a wall charger, the blue light blips sometimes out of sync with the 2.2 seconds red light. Does it mean it's briefly coming out of deep sleep every now and then for some reason?
https://youtu.be/4OzA4lZ5eC4
Beta Was this translation helpful? Give feedback.
All reactions