Skip to content
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

Fixes Boron charging current limitation when powered by VUSB #1846

Merged
merged 10 commits into from Jul 31, 2019

Conversation

@YutingYou
Copy link
Contributor

commented Jul 9, 2019

Problem

Customers are limited to 500mA charging current when Boron is powered by VUSB.

Affected Device: Gen3 devices

Analysis

When Boron is powered by VUSB pin, the power supply is blocked by the diode. For nRF52840,

The USB peripheral has a dedicated internal voltage regulator for converting the VBUS supply to 3.3 V used by the USB signalling interface (D+ and D- lines, and pull-up on D+). The rest of the USB peripheral (USBD) is supplied through the main supply like any other on-chip feature. As a consequence, both VBUS and either VDDH or VDD supplies are required for USB peripheral operation.

image

Since the USB peripheral is left to an uncontrolled state, PMIC would wrongly assume the board is connected to a USB host.

Solution

  1. Add a workaround in system power manager to manually increase charging current limit and decrease input voltage limit.
  2. Add an API to detect USB state

When the PMIC driver detects the USB host connection, it will also check whether USB is really connected. If not, it will increase charging current.

Steps to Test

  1. Charge Boron via VUSB pin, observe whether the charging current is more than 500mA, should be around 800mA.
  2. Connect Boron to a USB host, observe whether the charging current is no more than 500mA.

Test result

image

image

Example App

N/A

References

[CH34730]


Completeness

  • [enhancement] [Boron/BSoM] power: Increases charging current to 900mA when powered through VIN (VUSB) pin

@YutingYou YutingYou requested a review from avtolstoy Jul 9, 2019

Show resolved Hide resolved hal/inc/usb_hal.h Outdated
Show resolved Hide resolved hal/inc/hal_platform.h Outdated
Show resolved Hide resolved system/src/system_power_manager.cpp Outdated
Show resolved Hide resolved system/src/system_power_manager.cpp Outdated
Show resolved Hide resolved system/src/system_power_manager.cpp Outdated

@YutingYou YutingYou force-pushed the fix/gen3-charging-current-limitation branch from a86da01 to 7f50d48 Jul 30, 2019

Show resolved Hide resolved hal/inc/hal_platform.h Outdated
Show resolved Hide resolved hal/src/nRF52840/usb_hal_cdc.c Outdated
Show resolved Hide resolved hal/src/nRF52840/usb_hal_cdc.c Outdated
Show resolved Hide resolved hal/src/nRF52840/usb_hal_cdc.c Outdated
Show resolved Hide resolved system/src/system_power_manager.cpp

@YutingYou YutingYou force-pushed the fix/gen3-charging-current-limitation branch from 7ffd6b3 to b500469 Jul 31, 2019

Eugene

@YutingYou YutingYou force-pushed the fix/gen3-charging-current-limitation branch from b500469 to ab697d8 Jul 31, 2019

Show resolved Hide resolved system/src/system_power_manager.cpp Outdated
Show resolved Hide resolved system/src/system_power_manager.h Outdated
Show resolved Hide resolved system/src/system_power_manager.cpp

@avtolstoy avtolstoy merged commit b8ef566 into develop Jul 31, 2019

3 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@avtolstoy avtolstoy deleted the fix/gen3-charging-current-limitation branch Jul 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.