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

USB - Descriptors demand only 100ma #94

Open
henrygab opened this issue Sep 20, 2024 · 0 comments
Open

USB - Descriptors demand only 100ma #94

henrygab opened this issue Sep 20, 2024 · 0 comments

Comments

@henrygab
Copy link
Contributor

henrygab commented Sep 20, 2024

Configuration Descriptor shows 100ma demanded

Using USBTreeView.exe, it shows:

      ========================== Summary =========================
Vendor ID                : 0x1209 (Unknown Vendor)
Product ID               : 0x7332
USB Version              : 2.0 -> but Device is Full-Speed only
Port maximum Speed       : High-Speed (Companion Port 1-19-3 supports SuperSpeed)
Device maximum Speed     : Full-Speed
Device Connection Speed  : Full-Speed
Self powered             : no
Demanded Current         : 100 mA
Used Endpoints           : 9

and

    ------------------ Configuration Descriptor -------------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x02 (Configuration Descriptor)
wTotalLength             : 0x00A4 (164 bytes)
bNumInterfaces           : 0x05 (5 Interfaces)
bConfigurationValue      : 0x01 (Configuration 1)
iConfiguration           : 0x00 (No String Descriptor)
bmAttributes             : 0x80
 D7: Reserved, set 1     : 0x01
 D6: Self Powered        : 0x00 (no)
 D5: Remote Wakeup       : 0x00 (no)
 D4..0: Reserved, set 0  : 0x00
MaxPower                 : 0x32 (100 mA)

This appears to match the code. See the final argument to the macro:

// Config number, interface count, string index, total length, attribute, power in mA
TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, 0x00, 100),

And while high-speed isn't supported, it's also configured at:

// Config number, interface count, string index, total length, attribute, power in mA
TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, 0x00, 100),

Should this be changed to 500mA?

The BP5 is a USB2 chip (full-speed only, not high-speed capable), even though it has a USB-C connector. Since it has a USB-C connector, does the BP5 have hardware to detect if the upstream port is USB3? (e.g., 45 Ohms termination on Rx+ and Rx-pins, and detecting upstream port sending Rx_detect pulses) If so, that would make it safer to draw up to 900mA (as allowed by USB-C), even without USB3-PD support.

See https://electronics.stackexchange.com/a/659195 (including first comment to the answer).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant