How to repeat USB enumeration with a maxpower of 100mA if a previous 500mA request was rejected by the hub
Hi,
I want to design a combined USB<->RS485 converter cable based on the CDC profile with integrated charger detection. The MCU of my choice is the STM32F401CB.
The release of battery charge is done by switching an overcurrent protection chip TCKE805NL. This chip only should be released if a charger or a charging downstream port is detected or if a standard downstream port was successfully set to a MaxPower of 500mA instead of 100mA.
To detect all kinds of charger devices I use an additional BQ24392 charger detection chip.
My problem now is, that the communication also should work on a standard downstream port with only 100mA granted current. In this case with deactivated battery charging.
The Maxpower parameter in the configuration data is set to 0xFA (500mA). Im now afraid that if I try to connect to a port only able to deliver 100mA the enumeration and so the connection will be rejected by the host and I don't know a possibility to repeat the enumeration with a Maxpower request of 0x32 (100mA). So it seems that it not will be possible to realize a simple communication without charging on a standard upstream port which is limited to 100mA.
Does anyone has an idea how to solve this issue?
