ultra Posted October 29, 2008 Report Share Posted October 29, 2008 hi,at ucapps, the description for j7 on the gm5 page says you can get 500mA via usb. is this 500mA request already built into the chip? if not, can it be put into the eeprom? also, does the chip know not to power anything else until 500mA is approved? i'm a little confused about this and perhaps i'm thinking about it too much and i can simply connect a 400mA circuit to j7 and be off with it.ultra Quote Link to comment Share on other sites More sharing options...
cimo Posted October 30, 2008 Report Share Posted October 30, 2008 hiany USB hub will offer max 500mA, 5 volts.It is usually not recommended to power boxes with the USB hub but i did it a few times without any big issue.So yes you can do that, nothing special top be done on th ebox, but 400mA can be quite a threat, some transient current load and your lappy goes blank.Cheers Quote Link to comment Share on other sites More sharing options...
stryd_one Posted October 30, 2008 Report Share Posted October 30, 2008 Well no...Re: errata GM5The hub should only supply 100mA, until the device requests high power mode, and then it should supply an extra 100mA per unit up to 500mA.Somehow, I have the feeling that most of them would be cheap, and just deliver whatever the device draws, up to and beyand 500mA, and promptly emit magic blue smoke.Edit: Oh in answer to the question, I don't know... ask ploytec? Quote Link to comment Share on other sites More sharing options...
lylehaze Posted October 30, 2008 Report Share Posted October 30, 2008 From "Universal Serial Bus Specification"9.2.5.1 Power Budgeting USB bus power is a limited resource. During device enumeration, a host evaluates a device's power requirements. If the power requirements of a particular configuration exceed the power available to the device, Host software shall not select that configuration. USB devices shall limit the power they consume from VBUS to one unit load or less until configured. Suspended devices, whether configured or not, shall limit their bus power consumption as defined in Chapter 7. Depending on the power capabilities of the port to which the device is attached, a USB device may be able to draw up to five unit loads from VBUS after configuration.So yes, but it is the responsibility of the client device to limit its current draw until it is properly enumerated.Do not draw more than 100ma until you have requested and been approved for more (up to 500 ma). The host might choose to deny any power requests if it doesn't think it can power it properly, the client is supposed to honor that.Anyway, that's what the spec says. I know of a few devices that ignore it anyway.I'd love to know how much power the GM5 chip "requests", and how it can power up/down the rest of the circuit based on the configuration response from the host.I have the USB spec here, also the MIDI "class compliant" documents, and will provide them to anyone who asks.LyleHaze Quote Link to comment Share on other sites More sharing options...
stryd_one Posted October 30, 2008 Report Share Posted October 30, 2008 Anyway, that's what the spec says. I know of a few devices that ignore it anyway.Ahh yes, I have a TV tuner card that always draws full power from the moment you turn it on. If you have other stuff plugged into the hub (mouse and keyboard) the bus promptly craps itself, and the tuner doesn't work. I have to pull the thing out before I power on the PC, let it boot, then plug it in.Then there's the WLAN 'dongle' that does the same, and is connected to an old p2 celeron with USB1... Actually draws enough power that the motherboard craps out and doesn't POST. Power cycling *quickly* kills off the buss and it boots the 2nd time...Which goes to prove our points, I think... the spec is nice and all, but in the real world we have dodgy devices made in developing countries and programmed by the lowest paid employees possible.... Quote Link to comment Share on other sites More sharing options...
ultra Posted October 31, 2008 Author Report Share Posted October 31, 2008 well, here's my response from ploytech:"Yes, you can do that via the EEPROM. I guess there'll be more info on midibox about how."not much help to me. Quote Link to comment Share on other sites More sharing options...
stryd_one Posted October 31, 2008 Report Share Posted October 31, 2008 Well, he was wrong at first, but that was the hint I needed to prove him right. Self-fulfilling prophecy, very clever! :DFirst off, you'll need an eeprom for your GM5, and a core module. I'd use a socket for the eeprom. You can program the eeprom by connecting it to your core. You wire it up like a bankstick with CS 0 (pin 1/2/3 grounded). A normal midibox app is then uploaded, which will burn the eeprom for you.In this app, you edit the content which will be burned to the eeprom, in the file eeprom_content.c. The specific line you're after is line 159: 0x10, // Power requirement (div 2 ma) I take this to mean that it's a measure in divisions of 2mA...so you halve the required current, and enter that in hex. for 500mA it's 0xf8. I don't think it would be wise to go above that, or to 0x00 !! 0xf8, // ultra power uber code bam Once that's done, you save the file and run 'make', as per the normal C app compiling procedure. Upload the hex file to the core in MIOS Studio. It will tell you when it's done. The LCD will show you:EEPROM programmedStatus: 0The status will also be sent over midi. Anything but 0 means something went wrong (post here)Power it all down, drop the eeprom back into the GM5, and enjoy. MMmmm, currants.In case you didn't already notice from the above links, you can find the app in the SVN repo, in /trunk/mbhp/mbhp_usb_gm5_eeprom/. As with all apps from SVN (as opposed to distribution packages) you'll need the SVN repo or the mios_base package, etc etc...now I'm getting OT ;) Quote Link to comment Share on other sites More sharing options...
ultra Posted October 31, 2008 Author Report Share Posted October 31, 2008 thank you stryd,when i have time, i will wiki this information. i can't be the only person interested in powering via usb.much appreciated! Quote Link to comment Share on other sites More sharing options...
stryd_one Posted November 1, 2008 Report Share Posted November 1, 2008 My pleasure; I actually learned some stuff about USB findng this ;) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.