can not enable usb on tile0 of xuf232-1024-fb374?

New to XMOS and XCore? Get started here.
TonyXiao
Member
Posts: 15
Joined: Fri Mar 29, 2019 3:58 am

can not enable usb on tile0 of xuf232-1024-fb374?

Postby TonyXiao » Wed Aug 21, 2019 10:01 am

Hi all

base on usb works on tile1,without any change just trying enable usb on tile0 of xuf232-1024-fb374, but fails. nothing discovered when connect to pc.
when compiles it reports below,
xmap: Warning: port "XS1_PORT_1J" on tile[0] is not connected to any pins in this package.
xmap: Warning: port "XS1_PORT_1K" on tile[0] is not connected to any pins in this package.
xmap: Warning: port "XS1_PORT_1I" on tile[0] is not connected to any pins in this package.
xmap: Warning: port "XS1_PORT_1L" on tile[0] is not connected to any pins in this package.
seems there are no such 1j & 1k & 1i port on tile0, which is needed for usb function, so cause the fail?

double check xcore-200 mc audio board, the usb function are enable on tile1, and datasheet on tile1(xe216-512-tq128) also have not such 1e & 1f & 1g &1h &1i & 1j &1k ports which is needed by usb function, but no such reports when compiles, and usb works well.

It seems there are 2 circumstance for such io ports not mentioned in the specification,
1.they are actually in the chip, just without external connection.
2.they are indeed not include in the chip.
if so how our user get the information for these port not mentioned in specification?

Thanks
rgilio
Active Member
Posts: 33
Joined: Wed Jul 03, 2019 1:01 am

Postby rgilio » Wed Aug 21, 2019 4:16 pm

I'm thinking this could be an issue with the XN file that you're using. It most likely is configured for having USB on Tile[1]. If this is the case, you'll need to adjust the XN file you're using to map the pins on Tile[1] to be on Tile[0] and make sure that they line up in functionality i.e. here's the Multi Channel Audio Board tiles from the XN file from the USB Audio software:

Code: Select all

  <Port Location="XS1_PORT_1B" Name="PORT_SQI_CS"/>
            <Port Location="XS1_PORT_1C" Name="PORT_SQI_SCLK"/>
            <Port Location="XS1_PORT_4B" Name="PORT_SQI_SIO"/>
        
            <!-- Audio Ports -->         
            <Port Location="XS1_PORT_1A"  Name="PORT_PLL_REF"/>
            <Port Location="XS1_PORT_1F"  Name="PORT_MCLK_IN"/>
            <Port Location="XS1_PORT_1G"  Name="PORT_I2S_LRCLK"/>
            <Port Location="XS1_PORT_1H"  Name="PORT_I2S_BCLK"/>
            <Port Location="XS1_PORT_1M"  Name="PORT_I2S_DAC0"/>
            <port Location="XS1_PORT_1N"  Name="PORT_I2S_DAC1"/>
            <port Location="XS1_PORT_1O"  Name="PORT_I2S_DAC2"/>
            <port Location="XS1_PORT_1P"  Name="PORT_I2S_DAC3"/>
            <Port Location="XS1_PORT_1I"  Name="PORT_I2S_ADC0"/>
            <Port Location="XS1_PORT_1J"  Name="PORT_I2S_ADC1"/>
            <Port Location="XS1_PORT_1K"  Name="PORT_I2S_ADC2"/>
            <Port Location="XS1_PORT_1L"  Name="PORT_I2S_ADC3"/>
            <Port Location="XS1_PORT_4A"  Name="PORT_I2C"/>
            <Port Location="XS1_PORT_1M"  Name="PORT_DSD_DAC0"/>
            <port Location="XS1_PORT_1N"  Name="PORT_DSD_DAC1"/>
            <Port Location="XS1_PORT_1G"  Name="PORT_DSD_CLK"/>
            <Port Location="XS1_PORT_1E"  Name="PORT_ADAT_OUT"/>-->  <!-- D: COAX E: OPT --> 
            <Port Location="XS1_PORT_1D"  Name="PORT_SPDIF_OUT"/>--> <!-- D: COAX E: OPT --> 
          </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_16B" Name="PORT_MCLK_COUNT"/>              
            <Port Location="XS1_PORT_1L"  Name="PORT_MCLK_IN2"/>
            <Port Location="XS1_PORT_1M"  Name="PORT_MIDI_IN"/>
            <Port Location="XS1_PORT_1N"  Name="PORT_MIDI_OUT"/>
            <Port Location="XS1_PORT_1O"  Name="PORT_ADAT_IN"/>-->  <!-- P: COAX O: OPT --> 
            <Port Location="XS1_PORT_1P"  Name="PORT_SPDIF_IN"/>--> <!-- P: COAX O: OPT --> 
          </Tile>
User avatar
mon2
XCore Legend
Posts: 1518
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Wed Aug 21, 2019 11:49 pm

Suggest to review the following port map spreadsheet

https://www.xmos.com/file/xcore-200-devices-portmap/

for:

a) which port pins are available for your specific CPU and the package of your CPU
b) which ports will not be available IF you enable the USB PHY on that tile - this is important and such pins are shown with the yellow / brick color background. These same pins are internally multiplexed to allow for the enabling of the USB PHY so do note this if you had plans to use the same port pins for other uses - summary, if the USB PHY is enabled, you will will then lose the yellow / brick color port pins as they will be internally mapped for the USB function.

Hope this helps.
TonyXiao
Member
Posts: 15
Joined: Fri Mar 29, 2019 3:58 am

Postby TonyXiao » Thu Aug 22, 2019 3:34 am

hi rgilio

i have configured the usb on tile0, here is my xn file. if any bug please tell me.thanks.
You do not have the required permissions to view the files attached to this post.
TonyXiao
Member
Posts: 15
Joined: Fri Mar 29, 2019 3:58 am

Postby TonyXiao » Thu Aug 22, 2019 4:00 am

Hi mon2

so you think the cause is the duplicate using the usb ports?
and such port 1j & 1k & 1i are really exist in chip even they are report: on tile[0] is not connected to any pins in this package?

indeed both of tile0 and tile1 are using some of the port used by usb in hardware, but none of them are handled in the code.
for on tile1, i havn't tested much deeper, but it can recongnized by pc well.
but on tile0, not even an unrecongnized device show on pc.

Thanks
User avatar
mon2
XCore Legend
Posts: 1518
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Thu Aug 22, 2019 5:06 am

Yes, it should be possible to enable USB on tile[0]. The compiler is reporting warnings only that the pins are not bonded to the IC package pins but they are available internally for the USB PHY use. They are warnings to note if you are planning to use any of the missing port pins which are not available on this CPU package.

Consider to review AN00129 , see the details of the makefile and change to tile[0] for the USB tile -> then test on your box with the USB connection.

from page 6 of the above document:

change:

Code: Select all

-DUSB_TILE=tile[1]
to:

Code: Select all

-DUSB_TILE=tile[0]
Does this square mouse demo work for you if USB is on tile[0]?

xmos_usb_phy.png
You do not have the required permissions to view the files attached to this post.
TonyXiao
Member
Posts: 15
Joined: Fri Mar 29, 2019 3:58 am

Postby TonyXiao » Thu Aug 22, 2019 7:49 am

Hi mon2

yes,this square mouse demo works on tile[0].
we are using usb audio device, not hid device. that is may cause the different result.
so the ports need for usb, must keep unconnected stay floating or pull high?
User avatar
mon2
XCore Legend
Posts: 1518
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Thu Aug 22, 2019 1:06 pm

Ok, this is good news.

1) So now you have confirmed that the use of USB on Tile[0] of your XUF232 CPU does work fine on your custom project using the XMOS Square Mouse IP.

2) Next, on your custom project, are you using 100% the same ADC / DAC or whatever external components are present on the original XMOS audio board? Often these external components are I2C controlled where the XMOS CPU is the I2C master. The reason for this is that if you are NOT using the same devices, the XMOS audio ip on your custom PCB will make repeat calls to communicate with devices (I2C slaves) that are missing. These retries may take 2,000 attempts before timing out. Respectively, these blocking retries over I2C can break the USB IP timing. We have confirmed this with another client's custom project. This client's OEM design was having flaky USB results that would stop working after a brief period of time and only a hard reset could correct the USB enumeration again. By simply masking out the calls to the missing I2C external hardware, the USB communication was then restored to being solid and ran for days with zero issues.

3) As a suggestion, consider to run the TASK VIEWER tool so you can graphically review which threads are running on your CPU and on which tile. This is nice to do for a quick review.

Compare the TASK VIEW of the XMOS original audio PCB IP against your custom XUF232 based PCB.

See here on some details & post your results:

viewtopic.php?t=4642

and

https://www.xmos.com/developer/publishe ... dio-readme

AN00200_-Getting-Started-with-the-Task-Viewer-in-xTIMEcomposer-Studio-[readme]_1.0.1rc1.pdf

How many threads are active on Tile[0] with the USB enabled on Tile[0] - on your custom XUF232 PCB?

How many threads are active on Tile[1] with the USB enabled on Tile[1] - on the original XMOS audio reference design?
You do not have the required permissions to view the files attached to this post.
TonyXiao
Member
Posts: 15
Joined: Fri Mar 29, 2019 3:58 am

Postby TonyXiao » Fri Aug 23, 2019 8:48 am

Hi mon2

unfurturnatly,the custom board are completely different with the MC BOARD.we didn't use any ADC. for we used to think only USB_D+ & USB_D- are must needed. so our custom board can not work through?
USB audio device(use only midi, no audio) and DFU function, are what we needed.
usb audio device seems ok on tile1, but DFU failed.
i am trying to cut off external connection which are duplicated with usb function.
am i on the right way? any suggest?

Thanks,
User avatar
mon2
XCore Legend
Posts: 1518
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Fri Aug 23, 2019 3:23 pm

What is the reason for migrating the USB support to tile[0]?

Is it due to the DFU support not working on tile[1]?

Who is online

Users browsing this forum: No registered users and 1 guest