Fire Hazard, Wrong bitmask is provided for 4208 #987
Merged
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.
In the Power Management, there is a function for setting the cut off voltage which takes an integer and converts it to the appropriate bit mask.
When sending in 4.208 volts (the upper bound on the LiPo battery provided with spark kits) it sets the voltage to 4.4 volts. This has caused units on our test bench to fail, and could cause fires if using any other standard LiPo battery that doesn't have a limit circuit installed in the battery.
I am not sure how to complete all of the required steps to get this through your processes, but see this bug as a danger, and would appreciate any help in getting it implemented. Or if someone else can do the unit testing required to get it passed I would not mind them taking over the issue.
Doneness:
When passing in 4208, 4400 is actually set to the register.
4.2 is the uppper bound on the operating parameters for the battery that
is provided with the electron.
It would be nice if this function exposed a wider range of voltages,
however this change to perform the function as advertised needs to be
implmented more quickly as it is a fire hazard.