FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
5892 Discussions

DE1-SoC : change USB3300 PHY host mode to peripheral mode! How To??

Altera_Forum
Honored Contributor II
2,643 Views

Hi, 

 

I'm using DE1-SoC board with linux console provided by Terasic. what should i do to change the USB Host mode to USB peripheral mode ? I know that i have to short the ID pin of usb3300 PHY to V3.3. But i don't know if i have to do some software modifications. The idea is to make my board act as a device and establish a communication between the PC and the board. 

 

ps: sorry for my bad english
0 Kudos
11 Replies
Altera_Forum
Honored Contributor II
1,117 Views

Hello, 

 

I afraid you MAY not be able to do this. Please see schematic of DE1-SoC. D+/D- pins of on board USB3300 PHY have been connected to USB Hub. To make USB3300 work in device mode, you need to bring D+/D- pins of USB3300 to USB connector. Then you can connect it to your PC via USB cable. I hope this helps to some extent. Let me know if there is any confusion. 

 

Cheers, 

Bhaumik
0 Kudos
Altera_Forum
Honored Contributor II
1,117 Views

HI,  

 

First thank you very much for your answer. you are right. I have three question! 

 

First: Should i replace the USB connector by a USB micro AB connector and then connect the ID pin to the pin 5 of the mini B connector ?? ( I found this in the user manual of Terasic's new board DE0-nano SoC ). This work is for the OTG mode, The PHY can operate in Host or Device modes. As you can see here http://www.alteraforum.com/forum/attachment.php?attachmentid=10786&stc=1  

 

Second :If it is not necessary ( I just want my board acts as device mode )! Do you think if I do what you said without modifying the USB connector! Is it going to work? ( I read in the technical datasheet of the USB3300 that i have to short USB3300 PHY 's ID pin to V3.3 ... )As you can see here http://www.alteraforum.com/forum/attachment.php?attachmentid=10784&stc=1  

But then i was a confused about that pin. Because in the same technical datasheet i found that for peripheral mode ID pin is not shorted... http://www.alteraforum.com/forum/attachment.php?attachmentid=10785&stc=1  

 

Three : What about the software? do you think that i have to modify something in the linux console( provided by Terasic for DE1-SoC) kernel modules?? 

 

Thank you!
0 Kudos
Altera_Forum
Honored Contributor II
1,117 Views

Hello, 

 

I am sorry for delay in response. Here are comments from our side. 

 

(1) According to me, you should not make any change in development board. Because in this case, I do not think it would help. See attached image - De1_Soc_USB.png. 

 

(2) For Device mode, ID pin status should be 1 ( HIGH ). You can connect it to VDD or you can keep it left floated. ID pin has internal weak pull up resistor.Refer USB3300 datasheet. So if you will not connect it, it will automatically detected as high. 

 

(3) Sorry I do not have idea about that. 

 

Let us know if you have any doubt. 

 

Cheers, 

Bhaumik
0 Kudos
Altera_Forum
Honored Contributor II
1,117 Views

Hi Bhaumik, 

 

Sorry for delay. I couldn't test this in the week end. I will try and tell you about later. Thank you
0 Kudos
Altera_Forum
Honored Contributor II
1,117 Views

Hi, 

 

I tested it so it works. The host detects the board. Now the big challenge is to create a gadget for the board, so that it can communicate with the host. I've found a lot of thing about gadgets. It is a hard to understand but i'm still searching because i want to learn about usb protocol and how to make gadgets. i found u_serial gadget : https://www.kernel.org/doc/documentation/usb/gadget_serial.txt ."On the device-side Linux system, the gadget serial driver looks like a serial device". That is what i need to establish a communication between the computer and the board. I have downloaded kernel(v3.12.0) sources for de1 soc. and i will compile the u_serial module. But i'm affraid that i have to add another things... 

 

 

Can someone from altera or terasic just tell me if i have to add some configuration or something like that??? I'm lost
0 Kudos
Altera_Forum
Honored Contributor II
1,117 Views

Hello, 

 

According to me, due to present schematic of DE1-SOC ( cyclone V ) kit, you would not be able to run it in device mode. It is intended to work in host mode only.Although Cyclone V Soc has OTG IP core in it, on hardware it is connected to USB Hub. So it would not be possible unless you make any change in board. also making changes in board is not recommended. 

 

So I think you should look for other board (perhaps DE0- nano which you mentioned earlier ) which has micro AB connector to support both Host and device functionality. 

 

 

Hope it would help. 

 

Cheers, 

Bhaumik
0 Kudos
Altera_Forum
Honored Contributor II
1,117 Views

 

--- Quote Start ---  

Hi, 

 

I tested it so it works. The host detects the board. Now the big challenge is to create a gadget for the board, so that it can communicate with the host. I've found a lot of thing about gadgets. It is a hard to understand but i'm still searching because i want to learn about usb protocol and how to make gadgets. i found u_serial gadget : https://www.kernel.org/doc/documentation/usb/gadget_serial.txt ."On the device-side Linux system, the gadget serial driver looks like a serial device". That is what i need to establish a communication between the computer and the board. I have downloaded kernel(v3.12.0) sources for de1 soc. and i will compile the u_serial module. But i'm affraid that i have to add another things... 

 

 

Can someone from altera or terasic just tell me if i have to add some configuration or something like that??? I'm lost 

--- Quote End ---  

 

 

Hi JalaIT, 

 

Can you tell me exactly what you did to get the host to detect the board. Did you short the ID port AND connect the D+ and D- to a USB connector? If so, did you have to remove the connection to the USB HUB?
0 Kudos
Altera_Forum
Honored Contributor II
1,117 Views

Hi JalaT, 

 

Can you give the details of what you did when you tested it? Did you short the ID pin to 3.3v AND run D+ and D- to the USB connector? When you ran D+ and D-, did you have to disconnect the USB hub as well? I would appreciate any info you could give. 

 

Thanks, 

 

Rufus
0 Kudos
Altera_Forum
Honored Contributor II
1,117 Views

 

--- Quote Start ---  

Hi JalaT, 

 

Can you give the details of what you did when you tested it? Did you short the ID pin to 3.3v AND run D+ and D- to the USB connector? When you ran D+ and D-, did you have to disconnect the USB hub as well? I would appreciate any info you could give. 

 

Thanks, 

 

Rufus 

--- Quote End ---  

 

 

Hi, sorry for the delay. In fact you have to disconnect the usb hub, and short the ID pin to 3.3V. :)
0 Kudos
Altera_Forum
Honored Contributor II
1,117 Views

Thank you so much for your reply! How did you go about disconnecting the USB hub? It's very small!

0 Kudos
Altera_Forum
Honored Contributor II
1,117 Views

In my case i cut the (D+ D-) wires between the hub and the controller then i shorted those wires to the port. But In my case the board that i use is just for test. i m not going to use it for my project because i m waiting for a de0 nano soc. :) so that 's the thing

0 Kudos
Reply