This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TM4C123GH6PM: USB MSC Device - question about self powered

Part Number: TM4C123GH6PM

Tool/software: Code Composer Studio

Hi, 

I have a sd connected by spi to uC, I use the USB as Mass Storage Device so that when connected to a host (PC) can read the sd. I can not understand which role meets the variable usMAXPowermA (energy consumption) if for example in my case the power is taking from uC. What does the maximum consumption mean if the uC does not deliver more than a few mA? Usually set to (500mA).
Of course, the ucPwrAttributes variable is set to Self Powered.

Thanks and Regards! 

Alberto.- 

  • Hi Alberto,
    I think according to the USB spec, if your device is self-powered you may draw up to 100mA from the bus and derive the rest of its power from an external source. Also according to USB spec (I'm actually reading the USB Complete by Jan Axelson), the MaxPower field in the configuration descriptor is expressed as maximum miliamperes/2. So if your self-powered device can only draw maximum of 100mA from the bus then you should enter MaxPower (usMAXPowermA) to 50.