This is a bit of a follow-up from one of my previous logs (Auto-Negotiation Issues). At the end of that log, I came to the conclusion that I could resolve the issue by disabling auto-negotiation in windows device manager. This was just a temporary solution. For the long term, I wanted to investigate using the EEPROM to store the default configuration of the PHY.
So long as you are using a supported EEPROM, then the process of programming it is very pain free. You can use either the “LAN95xxUtility-v3_2_0_0 GUI” or “9500eeepApp_V2.5” both of which can be found here on Microchips website. As you might expect the GUI application provides… a GUI… whereas the second file provides an executable that can be called from the command line. In my mind the GUI application (LAN95xxUtility-v3_2_0_0 GUI) is useful for quick test work, whereas the executable (9500eeepApp_V2.5) would be invaluable for manufacturing in volume.
Let’s first look at the GUI… When you first launch the app you’ll be greeted with a device connection window. In my case it recognized the device as LAN9513/14 and the EEPROM size as 512KB.

The LAN95xx Utility then launches, with the below window. Checkout the readme on microchips website if you want to read into the details… but it’s a pretty nifty tool! For my project I’m modifying the manufacturer, product and configuration strings, but most other settings are left at their defaults.

Without thinking I bumped all the power requirements for my device to 500mA. I also changed the power type from self-power to bus power. I thought this would give my USB device the max power that the host USB port could provide… Instead I locked myself out and effectively bricked my device. -_-

My device is bricked (more locked really) because I wrote an invalid configuration to the EEPROM. I wrote a power requirement so large that no port dare enable it. As a result, every port I tried in my lab, whether bus powered or self-powered refused to connect to the device. I can’t just write a new binary to the EEPROM because I rely on the LAN95xx controller to do the programming. Since windows won’t connect to the device, I can’t reprogram the EEPROM, and because I can’t reprogram the EEPROM, windows won’t connect to my device (it’s a chicken and the egg conundrum of my own creation). I reordered a new EEPROM and went back to the drawing board. (Maybe I could have used the command line tool to wipe the EEPROM? Future thing to try...)
Where I went wrong? Let’s do some reading…
Bus-powered hubs: “Draw all of their power for any internal functions and downstream facing ports from VBUS on the hub’s upstream facing port. Bus-powered hubs may only draw up to one unit load upon power-up and five unit loads after configuration. The configuration power is split between allocations to the hub, any non-removable functions and the external ports. External ports in a bus-powered hub can supply only one unit load per port regardless of the current draw on the other ports of that hub. The hub must be able to supply this port current when the hub is in the Active or Suspend state.” [USB Specification 2.0]
Self-powered hubs: “Power for the internal functions and downstream facing ports does not come from VBUS. However, the USB interface of the hub may draw up to one unit load from VBUS on its upstream facing port to allow the interface to function when the remainder of the hub is powered down. Hubs that obtain operating power externally (from the USB) must supply five unit loads to each port. Battery powered hubs may supply either one or five unit loads per port.” [USB Specification 2.0]
Now that I understand the standard a bit better I first flashed the NEW EEPROM and confirmed it was working. Next, I increased the current requirements to something more reasonable and tried flashing the EEPROM again… And CRAP! Not again!

At 250mA I’m locked out of thing. Once again on every USB port I have semi-bricked device, that needs its EEPROM swapped.
I have some questions… Why the heck won’t any of my USB ports support a 250mA device? Both bus-powered and self-powered hubs are supposed to be allowed to draw five-unit loads? (at least once configured). I know my device draws 250mA, and has been running on multiple USB ports happily. It seems like this conundrum is pointing toward a misinterpretation, or at the very least some bad assumptions on my part.
*TO BE CONTINUED*
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.