Skip to content

isBattConnected() function name is misleading #32

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

Open
cedricormond00 opened this issue Jun 9, 2023 · 0 comments
Open

isBattConnected() function name is misleading #32

cedricormond00 opened this issue Jun 9, 2023 · 0 comments
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@cedricormond00
Copy link

cedricormond00 commented Jun 9, 2023

I may have noticed a slight inconsistency with the function isBattConnected(). I agree that if the DPM is active, this implies the battery is connected, but from my understanding, we may have a connected battery, but no DPM active. This mean this function would say there is no battery connected, whereas there is in reality…

DPM description (https://www.ti.com/lit/ds/symlink/bq24195l.pdf, 8.3.2.2):

To meet maximum current limit in USB spec and avoid over loading the adapter, the bq24195L, bq24195 features Dynamic Power Management (DPM), which continuously monitors the input current and input voltage.

When input source is over-loaded, either the current exceeds the input current limit (REG00[2:0]) or the voltage falls below the input voltage limit (REG00[6:3]). The device then reduces the charge current until the input current falls below the input current limit and the input voltage rises above the input voltage limit.

When the charge current is reduced to zero, but the input source is still overloaded, the system voltage starts to drop. Once the system voltage falls below the battery voltage, the device automatically enters the supplement mode where the BATFET turns on and battery starts discharging so that the system is supported from both the input source and battery.

SYSTEM_STATUS_REGISTER description (refer to https://www.ti.com/lit/ds/symlink/bq24195l.pdf, 8.5.1.9)


Also, if the function is misnamed, how can we know if the battery is connected, using the BQ24195?


Also, could you please clarify the difference between "01 – USB host, 10 – Adapter port, 11 – OTG”, in the register 08, bit 6 and 7?

@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Jun 12, 2023
@per1234 per1234 changed the title BQ24195 library potential misnamed function isBattConnected() function name is misleading Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants