Can you save variable data into flash? #3932
Replies: 1 comment
-
Posted at 2022-01-16 by user130485 OK, worked out the storage part =)
Posted at 2022-01-17 by @gfwilliams Glad you got that sorted! I think you just need to do Posted at 2022-01-17 by user130485 @gfwilliams - thank you, I got that part sorted =)
Its like its of memory or something. I just dont know what to check as after restart it starts working again... for some time Posted at 2022-01-17 by @gfwilliams Do you think you could post up your full code? Because it looks like it's just trying to execute the code Posted at 2022-01-17 by user130485 it was just an example. Before it was giving similar errors but from a different sections of the code Posted at 2022-01-19 by @gfwilliams Ahh, right - what firmware version are you using? What's happened is the code is executed direct from flash, and you've written enough data to flash that the flash then has to be 'compacted' and things move around, but the function still points to the old area of flash which doesn't contain the right code any more. I'm pretty sure that on the latest firmwares (2v11, if not before) this is fixed and the function pointers are automatically updated. Posted at 2022-01-19 by @gfwilliams Just to add - another fix is to make sure you run Posted at 2022-01-19 by user130485 At the moment I am just rebooting it every 15 mins by cutting the power. But that makes the time drift and no longer in sync Posted at 2022-01-21 by user130485 Current firmware is 2v09.87 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2022-01-14 by user130485
Hi everyone.
I have a strange issue that I am trying to solve.
My puck.js gets pulses from my power meter, increments a variable value for day and hour totals and sends it via BLE. Now, I have noticed that on the receiving end the graph falls to zero and starts incrementing again, which tells me that my puck got restarted.
Is there a way to save the current values into non volatile memory, so that if it restarts, it will continue from the value it had?
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions