Configuring CYUSB3314 through I2C master

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
RaKu_4680026
Level 1
Level 1

Hello All,

We are using CYUSB3314 Hub controller IC interfaced with the processor which runs Linux Kernel 4.4 on it. We don't have any external EEPROM and we want to configure the USB hub through I2C Master i.e Processor running Linux kernel. I went through below discussions and got to know that we can configure the hub by using blaster plus tool.

EZ-USB® HX3 I2C Slave Mode Operation – KBA90943

CYUSB3314 individual Port Power control i2c Code

I got the .bin file as the output from blaster plus tool. But now to transfer this file to the hub through Linux master, I need to implement i2c_page_write() function as mentioned in KBA90943.

But I don't know how to implement i2c_page_write() function. It's mentioned in the above discussion that it is a standard I2C EEPROM protocol function.

Kindly let me know where can i find the source code for this function? and guide me on how to configure the CYUSB3314 through Linux I2C master.

Also I presume below are the steps to configure the Hub through I2C.

1. Configure the CYUSB3314 in I2C slave boot mode

2. Obtain .bin configuration file from blaster plus tool

3. Write a Linux sample application to send the blaster plus tools' .bin file to the hub and cross compile (Implementing i2c_page_write() is a part of this step)

4. Once I execute this application on the target, the hub should get enumerated with loaded configuration.

Please give your suggestions on this.

Thanks in advance.

Regards,

Rakshith kumar

0 Likes
1 Solution
Sananya_14
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello Rakshith,

Your understanding is correct, you need to send the file from your processor as an I2C master. However, the i2c_page_write() function is an example to show how the write should be done. The EEPROM based I2C write should be implemented on your I2C master with the HX3 slave address 0xC0 (when 7-bit address is set as 0x60), two-byte page address as 0x00, 0x00 and then data part should include the bytes from the *.bin file you have. So you should be seeing the following sequence on the bus-  

START bit 0xC0, 0x00, 0x00, 0x43, 0x59, 0x30, 0xD4, 192, bytes of buff[5-196], STOP BIT.

Your steps are correct. Please ensure that the application is ready to execute on the I2C master when you power on the hub since it will not enumerate till it receives the configuration.

Best Regards,

Sananya

View solution in original post

0 Likes
1 Reply
Sananya_14
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello Rakshith,

Your understanding is correct, you need to send the file from your processor as an I2C master. However, the i2c_page_write() function is an example to show how the write should be done. The EEPROM based I2C write should be implemented on your I2C master with the HX3 slave address 0xC0 (when 7-bit address is set as 0x60), two-byte page address as 0x00, 0x00 and then data part should include the bytes from the *.bin file you have. So you should be seeing the following sequence on the bus-  

START bit 0xC0, 0x00, 0x00, 0x43, 0x59, 0x30, 0xD4, 192, bytes of buff[5-196], STOP BIT.

Your steps are correct. Please ensure that the application is ready to execute on the I2C master when you power on the hub since it will not enumerate till it receives the configuration.

Best Regards,

Sananya

0 Likes