Hello,
We're using this usb hub for a design and we're trying to get it work on i2c with an ATmega2560 microcontroller and it just won't work at all. Here's what we've done for the board:
1) We configured an external i2c EEPROM correctly as per our requirements for the hub to load its values into its own internal registers as instructed by the datasheet.
2) The usb hub is held in reset (greater than minimum reset duration of 3ms) during board startup until the EEPROM is configured correctly and the reset is released only after making sure the i2c bus is free of traffic so that the usb hub (acting as a master) can talk to its external EEPROM.
Okay now even with all these correctly setup our usb hub isn't working and it's not connecting to the upstream/downstream lines. I've already replaced the usb hub chip thinking it was a faulty chip but we're still facing the same issue.
I've attached some schematics of our design and the EEPROM configuration register map set for our requirements. It would be great if someone could help us figure out what we're missing.
Here's the mfg part number of the crystal for the hub : ECS-240-10-37-CWN-TR
P.S. We know the reset pin circuitry is wrong and we have a temporary fix in place using a jumper wire from GND to reset.
Here's a screenshot of the complete schematic of the hub with the downstream ports and a screenshot of the upstream port.
This is the register configuration map for the external EEPROM.
///////////////////////////USB HUB EEPROM REGISTER DEFINITIONS///////////////////////////////////////////////////// //#define register_name reg_value // eeprom adress(es), reg_value description #define ROM_SIGNATURE_REGISTER 0x55 // 00h, write last, change while writing, then reset usb hub #define VENDOR_ID_LSB 0x51 // 01h #define VENDOR_ID_MSB 0x04 // 02h #define PRODUCT_ID_LSB 0x40 // 03h #define PRODUCT_ID_MSB 0x81 // 04h #define DEVICE_CONFIGURATION_REGISTER 0x00 // 05h #define BATTERY_CHARGING_SUPPORT_REGISTER 0x00 // 06h #define DEVICE_REMOVABLE_CONFIGURATION_REGISTER 0x8F // 07h, all downstream ports marked as removable #define PORT_USED_CONFIGURATION_REGISTER 0x0F // 08h, enable all downstream ports #define RESERVED 0x00 // 09h, 0Ch-0Fh, 27h-2Eh, 2Fh, D0h-D4h, D5h-D7h, D8h-DCh, DDh-EFh, F1h-F7h, F9h-FFh #define DEVICE_CONFIGURATION_REGISTER_2 0x42 // 0Ah #define USB_2_PORT_POLARITY_CONTROL_REGISTER 0x81 // 0Bh, only upstream d+/- polarity switched uint8_t UUID_BYTE[32] = "f81d4fae7dec11d0a76500a0c91e6bf6";// 10h-1Fh, PLACEHOLDER PULLED FROM WEBSITE, MUST REGISTER #define LANGID_BYTE_LSB 0x09 // 20h, only one supported #define LANGID_BYTE_MSB 0x04 // 21h, only one supported #define SERIAL_NUMBER_LENGTH 0x00 // 22h, customSernum = 0 meaning this will not be overwritten #define MANUFACTURER_STRING_LENGTH 0x00 // 23h, indicates none provided #define PRODUCT_STRING_LENGTH 0x00 // 24h, indicates none provided #define DEVICE_CONFIGURATION_REGISTER_3 0x00 // 25h, USB 3.1 hub, no battery charging support #define USB_2_ONLY_PORT_REGISTER 0x00 // 26h, USB 3.1 & 2.0 hub support uint8_t SERIAL_NUMBER_STRING_BYTE[32] = { 0 }; // 30h-4Fh, customSernum = 0, these registers disregarded, update array below if added uint8_t MANUFACTURER_STRING_BYTE[64] = { 0 }; // 50h-8Fh, read when MANUFACTURER_STRING_LENGTH != 0, update array below if added uint8_t PRODUCT_STRING_BYTE[64] = { 0 }; // 90h-CFh, read when PRODUCT_STRING_LENGTH != 0, update array below if added #define ADDITIONAL_FEATURES_CONFIGURATION_REGISTER 0x18 // F0h, STS enabled, power delay disabled, usb3spread enabled #define SMBUS_DEVICE_STATUS_AND_COMMAND_REGISTER 0x00 // F8h, unaffected by eeprom ///////////////////////////END OF USB HUB EEPROM REGISTER DEFINITIONS/////////////////////////////////////////////////////