-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
fix: USB C vbus Kconfig #62740
fix: USB C vbus Kconfig #62740
Conversation
The init priority and the logging module are used in both vbus and tcpc, hence I think it should be better located in the Kconfig file of the parent folder. Signed-off-by: Mark Kettner <mark@kettner.io>
this adds a sample application showing the usage of the usb_c vbus driver. Signed-off-by: Mark Kettner <mark@kettner.io>
regulator that provides a fixed voltage to IO38 of the esp32 behind a voltage divider. In this | ||
sample the voltage divider consists of 300k and 100k Ohms resistors. It will then print the measured | ||
battery voltage to the console. If you take care to not power the device thru the usb port, you can | ||
see how the battery voltage decreases over time, Thus indicating the current charging level. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what you mean by "indicates the current charging level". Your sample only prints the battery voltage. Without knowing the battery capacity and/or empty voltage, I'm not sure how one infers the charge level.
Requirements | ||
************ | ||
|
||
A charging regulator (e.g. MAX777) connected to a voltage divider to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence is incomplete.
:goals: build flash | ||
:compact: | ||
|
||
To build for another board, change "qemu_x86" above to that board's name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To build for another board, change "qemu_x86" above to that board's name. | |
To build for another board, change "esp32_devkitc_wrover" above to that board's name. |
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
This pull request fixes a minor problem I've noticed with the Kconfig of the USB C drivers.
You can use this driver https://github.com/zephyrproject-rtos/zephyr/tree/main/drivers/usb_c/vbus
standalone to measure the voltage from a charging regulator (e.g. https://www.analog.com/en/products/MAX77757.html ) which gives you a simple indication of the charging level of battery, as I've shown in the sample application in
sample/driver/vbatt
. This sample is also very similar to the one from nrf but the battery measurement logic is done by the usb c vbus driver instead.However, the code from
drivers/usb_c/vbus/
depends on symbols defined indrivers/usb_c/tcpc/Kconfig
. Thus you could not create this simple sample without pulling in the usb typec port controller.