The power system has a battery charger chip that can communicate over I2C. There are several things we need to do with it, such as reading battery charge level and setting it to charge mode.
using the information in the power system document linked above, create a function to send a command to the chip and receive data. This will be based off what's in stlm75.h, with more details here: https://github.com/SFUSatClub/obc-firmware/wiki/I2C. The power chip data sheet will have details about the command sequence to send (address, command name, expected result). It might be slightly different from the one for the stlm75.
once you have the structure in place to send a command and receive data from the chip, start developing functions to get charger and battery status. Based on the document above, these require several reads and writes to the chip (the functions you wrote above will come in handy here)
The power system has a battery charger chip that can communicate over I2C. There are several things we need to do with it, such as reading battery charge level and setting it to charge mode.
Power system info: https://docs.google.com/document/d/1e0Lc-tiGXJk7y76KnY_e55wmS_StJPHWGjifg3AzOwA/edit
Steps:
create a new branch off richard_temp&filesys
using the information in the power system document linked above, create a function to send a command to the chip and receive data. This will be based off what's in
stlm75.h
, with more details here: https://github.com/SFUSatClub/obc-firmware/wiki/I2C. The power chip data sheet will have details about the command sequence to send (address, command name, expected result). It might be slightly different from the one for the stlm75.once you have the structure in place to send a command and receive data from the chip, start developing functions to get charger and battery status. Based on the document above, these require several reads and writes to the chip (the functions you wrote above will come in handy here)