xCORE-200 Series and USB Audio 2.0 Reference Software Topic is solved

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
Post Reply
netv
New User
Posts: 2
Joined: Wed Oct 18, 2017 3:13 pm

xCORE-200 Series and USB Audio 2.0 Reference Software

Post by netv »

Hello everyone,

This is my first post here (even though I've read/browsed the forums for the last few months).

So, here goes: I've "inherited" an audio project at the company I work for. It's a 6in - 4out USB sound card based on the XU216-512-TQ128 and the USB Audio 2.0 Reference Software. The guy that worked on the project before me (and almost finished it) has assigned different functions (eg. I2C, S/PDIF, etc) to different ports (pins) on the xmos chip above (2 tiles). The problem is that some of the ports he used overlap the ones that are used by the USB itself. This is according to the documentation [1] and [2] below. For example he put I2S functionality on ports 1E, 1F, etc - even though these seem to be in use by the USB/transceiver. Normally I would just simply change those to other ports (so it wouldn't overlap USB ports), however, the prototype as-is works perfectly. So, it's clearly either something I don't understand or there is some other mistake on our design. Also, we have another design (based on the same XMOS chip) done by the same guy that also overlaps some things with the USB ports and these work as well.

Can the USB transceiver / USB libraries actually share these ports and the documentation is not up-to-date? If anyone can enlighten me on these I would really appreciate it. Thanks


[1] - In the file lib_usb-[userguide]_3.1.2rc2.pdf, on page #3 (xCORE-200 Series) here's what it says:
"The xCORE 200 series of devices have an integrated USB transceiver. Some ports are used to communicate with the USB transceiver inside the xCORE-200 series packages. These ports/pins should not be used when USB functionality is enabled." These are the ports 1A, 1C, 1E, 1F, 1G, 1H, 1I, 1K, 4A, 4B, 4C, 4D, 8A, 8B, 16A - on tile 0.

[2] - In the datasheet file XU216-512-TQ128-Datasheet_1.12.pdf, on pages #20-21 there is a picture that represents the USB/transceiver that also shows the above ports being used (connected internally) for USB operation.


View Solution
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

Hi and welcome to the forum.

This actually fine. There is a thing call port precedence in xmos meaning, where there are multiple functions on a pin, the narrowest active port wins the pin.

For example, if Port 1M and Port 8D are both enabled as outputs, then XD36 is connected to output register of port 1M. You can still use the other 7 bits of 8D by the way. However if you read from 8D, bit 0 will contain the output value of 1M.

So because the USB PHY uses 8A and 8B internally, you can still used 4A,B,C,D to read/write from the pis. Unfortunately you do loose 1E,F,G,H,I,J because the pin these appear on has no other ports connected to it, and besides, 1b is the narrowest port so would win anyway.

Hope that makes sense!
netv
New User
Posts: 2
Joined: Wed Oct 18, 2017 3:13 pm

Post by netv »

Thanks infiniteimprobability, this makes sense now. I knew about the port precedence already but I didn't think I could still use the 4A, 4B etc pins. It also makes sense now why the 1-bit ports are unusable in this scenario. Thanks for clearing this up
niruyadla@gmail.com
Member
Posts: 12
Joined: Thu Oct 12, 2017 8:04 pm

Post by niruyadla@gmail.com »

I am using app_usb_aud_mic_array app on XP-USB-MIC-UF216 board
And generated .\bin\2i8o2\app_usb_aud_mic_array_2i8o2.xe and ran below cmds.
#xgdb .\bin\2i8o2\app_usb_aud_mic_array_2i8o2.xe
#connect
#run
And could not see USB Audio device listing on my windows 7 64 bit PC.

Could you please confirm below pin settings on tile1 are correct or not?

</Tile>

<Tile Number="1" Reference="tile[1]">
<Port Location="XS1_PORT_1H" Name="PORT_USB_TX_READYIN"/>
<Port Location="XS1_PORT_1J" Name="PORT_USB_CLK"/>
<Port Location="XS1_PORT_1K" Name="PORT_USB_TX_READYOUT"/>
<Port Location="XS1_PORT_1I" Name="PORT_USB_RX_READY"/>
<Port Location="XS1_PORT_1E" Name="PORT_USB_FLAG0"/>
<Port Location="XS1_PORT_1F" Name="PORT_USB_FLAG1"/>
<Port Location="XS1_PORT_1G" Name="PORT_USB_FLAG2"/>
<Port Location="XS1_PORT_8A" Name="PORT_USB_TXD"/>
<Port Location="XS1_PORT_8B" Name="PORT_USB_RXD"/>

<!-- Audio Ports -->
<Port Location="XS1_PORT_4D" Name="PORT_PLL_REF"/>
<Port Location="XS1_PORT_1O" Name="PORT_MCLK_IN"/>
<Port Location="XS1_PORT_1N" Name="PORT_I2S_LRCLK"/>
<Port Location="XS1_PORT_1M" Name="PORT_I2S_BCLK"/>
<Port Location="XS1_PORT_1P" Name="PORT_I2S_DAC0"/>
<Port Location="XS1_PORT_4E" Name="PORT_I2C"/>
<Port Location="XS1_PORT_16B" Name="PORT_MCLK_COUNT"/>
</Tile>
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

This thread is now marked as solved by the OP - please can you post to a new thread if you have a different issue.
Thanks
Post Reply