Hi XCore Community,
this is my first post: Hi everybody!
I trying to do what apparently other have already succeeded in and should not be a real problem. None the less I m really suck. :( I hope somebody can help me out.
Im developing a USB PHY add-on board for the XC-1A Development Board. It uses Port A/B of Core 3. I have made two versions, one using the SCMC USB3318, closely following the implementation in the XR-USB-AUDIO-2.0 reference design schematics and one using the USB3330 in a similar fashion. The only modification is the reset pin which I have mapped to PORT 1A.
I m using the latest versions of sc_usb, sc_xud and xcommon.
To get started I tried to use the HID example that comes with sc-usb.
The only changes I have made where:
- changing the .xn file to reflect the hardware
- in Makefile: change target to XC-1A
- in Makefile: uncomment: export XUD_G=1
- in Makefile: set USB core to 3
the application compiles fine and is loaded onto the Board.
but:
- the USB device does not enumerate
- when I debug, I can see that the XUD manager seems to get stuck>
this is the line at which the program stalls:
0x00011c98 <XUD_DeviceAttachHS+148>: in (2r) r0, res[r0] *
this is the stack I copied from the debugger:
stdcore[3] thread 0 (Suspended: Signal 'SIGINT' received. Description: Interrupt.)
5 XUD_DeviceAttachHS() 0x00011c98
4 XUD_Manager() 0x00011350
3 __main_xm_0() /Volumes/BIN/Moritz/MIT/trunk/Software/Firmware/XMOS/sc_usb/app_example_usb_hid/src/main.xc:145 0x000104b2
2 __mcmain000003() 0x00010aaa
1 hasEndStack() 0x00010b8c
other threads (endpoint0) seem to wait for the XUD manager.
As the xud lib comes without source I have no away of knowing what exactly is going on.
I get the same error for both versions of my add-on board. At this point I don't know if it is a hardware problem. I tend to believe that this is not the issue as I have the same error on both boards. But that again I don't even know what the errors is as I have no idea about the XUD internals.
For reference I have attached the schematics to the USB3318 USB PHY add-on board I made. Can somebody find obvious mistakes in this or my code setup?
It seems to me that the XC-1A is a good candidate for a Hi-Speed USB add-on . And I would really like to get this to work and share.
help is greatly appreciated!
best,
Moritz
Getting the USB3318 to work with XC-1A
-
- Member
- Posts: 12
- Joined: Mon Feb 13, 2012 10:54 pm
Getting the USB3318 to work with XC-1A
You do not have the required permissions to view the files attached to this post.
-
- XCore Expert
- Posts: 967
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
Moritz,
Did you wire up the port map *exactly* the same as the USB audio board?
What about Reset also?
Did you wire up the port map *exactly* the same as the USB audio board?
What about Reset also?
-
- Member
- Posts: 12
- Joined: Mon Feb 13, 2012 10:54 pm
Hi Ross,
yes I did.
I just got it to work though!!
Both versions the usb3330 (needs the reset port to be inverted though) and usb3318 board are working.
I don't know why it is working though. This is what I did:
Rename the xud libs files by appending a letter to the name (before the extension).
If I do that it works, if I remove the letter it stops working again!
I stumbled upon this because I was trying to force a build error just to see if the libs are being used - instead it just started to work!
well, maybe someone can explain to me why this solved my problem. Im using the latest xde, sc_usb, sc_xud and xcommon on MacOs10.7.
moritz
yes I did.
I just got it to work though!!
Both versions the usb3330 (needs the reset port to be inverted though) and usb3318 board are working.
I don't know why it is working though. This is what I did:
Rename the xud libs files by appending a letter to the name (before the extension).
If I do that it works, if I remove the letter it stops working again!
I stumbled upon this because I was trying to force a build error just to see if the libs are being used - instead it just started to work!
well, maybe someone can explain to me why this solved my problem. Im using the latest xde, sc_usb, sc_xud and xcommon on MacOs10.7.
moritz
-
- XCore Expert
- Posts: 967
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
in the makefile, do you set MODULE_LIBRARIES from xud_l to xud_g?
-
- Member
- Posts: 12
- Joined: Mon Feb 13, 2012 10:54 pm
Hi Ross,
if you mean uncommenting
export XUD_G=1
in the makefile than, yes I did.
moritz
if you mean uncommenting
export XUD_G=1
in the makefile than, yes I did.
moritz
-
- Member
- Posts: 12
- Joined: Mon Feb 13, 2012 10:54 pm
Hi all,
I m writing this only because when I was getting into this project I was always curious about the maximum bandwidth that could be achieved using XMOS + Hi-speed USB.
I just did some benchmarking and is seems that using a single endpoint and bulk transfers of 512byte packets I can get ≈40Mbyte/sec which is quite close to the raw 60Mbye/sec bandwidth. As far as I know 40 is close to the practical limit of Hi-Speed USB. And for now twice of what I need for my application :-)
I hope this info is useful for others...
moritz
I m writing this only because when I was getting into this project I was always curious about the maximum bandwidth that could be achieved using XMOS + Hi-speed USB.
I just did some benchmarking and is seems that using a single endpoint and bulk transfers of 512byte packets I can get ≈40Mbyte/sec which is quite close to the raw 60Mbye/sec bandwidth. As far as I know 40 is close to the practical limit of Hi-Speed USB. And for now twice of what I need for my application :-)
I hope this info is useful for others...
moritz