-
Notifications
You must be signed in to change notification settings - Fork 1
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
New persistent storage of time since launch count pauses when batteries are out, then resumes when back in. Omits RTC backup capacitor. #42
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Still need to update firmware to continuously track elapsed time as per #29.
I am skeptical this is needed, but it is cheap and low risk so we will add it just to be safe. Must make sure to turn off VBAT in the firmware as per #35.
Call out that C1 is actually a resistor even though it starts with C.
Saves a word of program memory and and cycle of run time.
Count power usage: Prev firmware with backup enabled and cap on PCB | 2.0uA New firmware with cap on PCB (should not happen) | 2.0uA New firmware with 10K resistor in place C2 | 2.0uA ...and the failure case where old firmware gets on new PCB | 120uA So we need to make sure that old firmware does not get on new PCBs. It should get caught during commissioning because the power will not be able to ride the time between programming and battery insertion.
… counters 1. Delete all the old code that read and parsed the RTC time. We now never look at the actual RTC time data - we only copy it on launch just to have a record. We also do not bother to check if the RTC when undervoltage because we don't care. 2. Cleaned up the sharing between C and ASM routines. 3. Made the TSL tick ISR be the default ISR so we can use the FRAM ISR tables while running in TSL mode. 4. Added the frame work fo the persistant counters and made the C code use them (although they are not yet updated by the ASM ISR). 5. Took out the centiday message, will need to add back into next_day() later. 6. Cleaned up the whole startup sequencing and made it so that a power loss during ready-to-launch mode is now an error (Batt Err 1) since we definitely want to know if this happens and not just seamlessly pick up where we left off. 7. Finally suppressed the "unused variable" warnings on the unused LCD chars. 8. Changed the name of the info memory segment of the FRAM from InfoA to Persistant.
… rather than RTC backup Closes #29 , #30 , & #35. Overall current draw is still less than 2uA. Currently we unlock/lock the info FRAM where we keep the counters each time we update them, which is once per minute. This uses slightly more power than just leaving them unlocked, unknow if there is any safety benefit. Lightly tested and seems to work, but big changes so needs way more testing.
... we lose power in the middle of an update that updates the day.
Now to switch to the RV3032 so we can test the CLKOUT trace for shorts also.
Looks like we get about 1/2 a second between 3.3V and 1.8V for a good unit with all the LCD segments on. Might need to tweak the "pass" values for current drawn during the power down test.
Still low enough to last a century. We'll have to see what the variance among units it.
…asure the current.
Implements the new "pausable" behavior whereby the unit simply stops counting when there is no power (typically because batteries were removed) and then starts counting again where it left off when power is restored. Previously, we had a backup capacitor that would let the RTC continue running (only) for a few minutes to allow time for a battery change. This closes #29 As part of this change...
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Lots of other clean up and improvements as well.