Intel® FPGA University Program
University Program Material, Education Boards, and Laboratory Exercises
1175 Discussions

Almost Working: USB ISP1362 DE2-115 without NIOS II

Altera_Forum
Honored Contributor II
1,268 Views

I think I'm almost done with this damn thing. I think I can see the light at the end of the tunnel. I'm sure it's just another freight train, though. 

 

 

So, I've interfaced with the ISP1362. I have set the configuration registers, EP setup, etc. Here's a transaction of events: 

Setup (CFG Registers, hardware, mode, all 16 EPs, interrupts) 

Interrupt: Bus Reset Detected 

Configure all 16 EPs 

Interrupt: EP0 OUT 

Status: Full, contains Setup Token 

Read Buffer, contains: "get descriptor" 

Load IN Buffer with "descriptor", Validate 

Interrupt: EP0 IN 

EP IN Status: Empty 

Interrupt: EP0 OUT 

Status: Full - No Setup 

Read Buffer: contains zero lenth packet. 

Interrupt: Bus Reset detected 

 

Where am I going wrong? I've read the USB 2.0 specification and can't find any information on this behavior. I should receive other setup packets/requests and I don't.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
401 Views

A few questions for you; 

 

1. How are you configuring the ISP1362 without NIOS II; direct HDL, or JTAG-to-Avalon-MM bridge? 

 

Did you check out this project: http://mzakharo.github.io/usb-de2-fpga/ 

 

2. What is your test setup? 

 

If you're "cheap", then I'd recommend using Linux and Wireshark. Wireshark can trace USB packets. 

 

If you're "not-as-cheap", then do you have a USB "logic analyzer"? I just purchased a Total Phase Beagle 480 USB analyzer ... for another project ... but since I'm the only one using it, I figured I'd play with USB via the ISP1362. 

 

I don't have any answers for you yet, but it you want to "share" what you've done, then (if I have time) I'll provide a USB analyzer dump for you :) 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
401 Views

Hello Dave, 

 

1. Direct HDL 

2. I have looked at that. However, that project doesn't solve my problem. I've pulled the USB sigals to the GPIO, I can see everything his HDL does and compare it to mine. I don't understand his code that well. :( 

Wireshark: I have Wireshark for windows, but I didn't see an option to look at USB packets. Is Linux required to use Wireshark in that manor? 

 

I'd be happy to share my terribly written code. My goal is to release this on open source. How would you like me to send everything to you? Just the HDL, or the entire Quartus II project?  

 

-Joe
0 Kudos
Altera_Forum
Honored Contributor II
401 Views

Hi Joe, 

 

--- Quote Start ---  

 

1. Direct HDL 

 

--- Quote End ---  

 

Ok. 

 

 

--- Quote Start ---  

 

2. I have looked at that. However, that project doesn't solve my problem. 

 

--- Quote End ---  

 

What is the problem you are trying to solve? 

 

 

--- Quote Start ---  

 

I've pulled the USB sigals to the GPIO, I can see everything his HDL does and compare it to mine. I don't understand his code that well. :( 

 

--- Quote End ---  

 

Rather than use the GPIO headers, you can use SignalTap II to capture more signals ... 

 

 

--- Quote Start ---  

 

Wireshark: I have Wireshark for windows, but I didn't see an option to look at USB packets. Is Linux required to use Wireshark in that manor? 

 

--- Quote End ---  

 

Windows does not support USB packet capture. If you're running Window XP, then you can install VirtualBox, run Linux from within VirtualBox, attach the USB device to the VM, and run Wireshark there. Windows 7 doesn't work as a host (it has trouble releasing USB devices to the VM). Linux does ... but then you'd just run Wireshark natively there. 

 

 

--- Quote Start ---  

 

I'd be happy to share my terribly written code. My goal is to release this on open source. How would you like me to send everything to you? Just the HDL, or the entire Quartus II project?  

 

--- Quote End ---  

 

You can email me the whole project, that way I can click compile when I receive it to confirm I have all your source. I'll clean it up, create a Tcl build script, and send that back if you like. 

 

(My forum name is the email address you can use) 

 

Cheers, 

Dave
0 Kudos
Reply