setInterval not working after save()? #4784
Replies: 1 comment
-
Posted at 2019-06-21 by Robin Thr 2019.06.20 @jlawson this should provide the insight: and last entry at:
Posted at 2019-06-21 by @gfwilliams It sounds like you're doing everything fine. Do you get any error messages when you I guess you could try initialising the LCD and DS3231 after a delay in case that's a issue? Maybe the DS3231 takes a while to work after power is applied - if you got the wrong time out of it then maybe You could try running Finally, it's unlikely I ever checked what happens if you reset the time to something else and then immediately create intervals, so I guess you could try setting the time inside a timeout? Posted at 2019-06-23 by jlawson @gfwilliams I finally got time to implement your suggestions and the results were all consistent with a clock that is running way too fast so I tried it on a second Espruino board and the code worked fine. I think this particular board may just require a longer delay for the LSE clock to settle down as it works once powered and then the reset button pressed. This is probably due to borderline capacitance on the 32.768KHz crystal circuit (which I had added). So, it appears that resetting the time and then immediately creating intervals does work. Thanks, Posted at 2019-06-23 by jlawson @robin Thanks for the pointers. I did have a bit of trouble with that bit. Posted at 2019-06-24 by @gfwilliams Great - thanks for letting us know! You might find that cutting the trace for the C15 pin helps you out - having a long wire on one of the oscillator pins won't help at all. Also, sometimes (if it was working before) just giving the board a good clean with something like isopropyl alcohol can make a massive difference :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2019-06-20 by jlawson
Hi,
The following (much cut down) code works fine when uploaded from the IDE but after using save() and power cycling it appears as if setInterval has no effect. The LCD and clock then update as quickly as possible (the clock goes through a day in about 6 seconds).
On power-up or after using load() it exhibits this problem.
However, if I then press the physical reset button or use E.reboot() from the IDE it will run properly.
I may just be that I'm not setting things up properly for using save() with setInterval (I rarely use save).
This is on an original Espruino board with added 32.168kHz crystal.
Firmware is version 2v03.21 but with some fonts compiled in.
Any ideas?
Thanks,
Jamie
Beta Was this translation helpful? Give feedback.
All reactions