Hello everyone,
My goal was to have a MCU system as a bus-powered USB device for data transfer.
After I incorporated the SDK example, usb_device_msc_sdcard_lite, into my project, the USB device is working in general. But for some of our K50 systems, the operation current is high (over 300mA); and my experience was that the USB port from a host (a laptop, for instance) wasn't able to supply such an amount of current and the K50 system could not be powered up by a computer USB.
After I learned that the default current limit can be provided by a USB VBus is 100mA, I tried to increase the limit by changing USB_DEVICE_MAX_POWER setting in usb_device_descriptor.h and USB_DEVICE_CONFIG_SELF_POWER macro in usb_device_config.h.
Here comes my questions:
Q1. If I were to use the system as a bus-powered USB device, I assume that I have to change the value of USB_DEVICE_CONFIG_SELF_POWER from 1U to 0U; however, the comment says value of 0U is not supported. If so, how could I switch to bus-powered mode?
Q2. Is the default maximum USB current really 100mA? I measured the USB Vbus current with USB_DEVICE_MAX_POWER = 0x32U (100mA) and found that our normal systems draw about 240 mA, and the unusual systems draw about 300 mA (in this case the USB voltage regulator output dropped to 1.5V as opposed to the expected 3.3V). Why the Vbus current is beyond the limit?
I also experimented with USB_DEVICE_MAX_POWER increased to 0xE1 (450 mA), the measured Vbus currents are the same as with USB_DEVICE_MAX_POWER = 0x32U for both the normal system and the unusual system that draws more current.
The schematic diagram of the USB connection is attached.
Many thanks in advance!