USB PLUG ON OFF FAILED

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
TonyXiao
Active Member
Posts: 44
Joined: Fri Mar 29, 2019 3:58 am

USB PLUG ON OFF FAILED

Post by TonyXiao »

Hi all

currently i migrate the xcore-200 mc audio board program to my board xu232. power on and i tested the usb function seems ok untill i plug off and on the usb connector, it failed to recognized by the PC,it can be recognized only once after power on. i tried do the plug off and on test on the xcore-200 mc audio board, it can always recognized.seems problem happens in the program migration.
i checked every thing, without any clue. i tested the usb with another windows PC, it works all right.
but still failed with my windows PC, i checked the definition self powered is set to 1, and the connection is used the recommand connection by the xu232 datasheet.there is a 0.7v drop over the R100, i have tried to reduce the R100 to 0, and it useless.
any suggest?

by the way, i found another issue, for the xcore-200 mc audio board use XE216, and the demo project app_usb_aud_xk_216_mc, there are the usb conncet definition on tile1, and i found an definition:<Port Location="XS1_PORT_1K" Name="PORT_USB_TX_READYOUT"/>, and there isn't an 1k for xe216 tile1, but it can still works, why ?

thanks in advance.
Attachments
USB DEVICE.png
(39.82 KiB) Not downloaded yet
USB DEVICE.png
(39.82 KiB) Not downloaded yet


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

Post by mon2 »

Hi.

1) Test your custom PCB with AN00129 - USB HID MOUSE (runs using USB High Speed interface)

https://www.xmos.com/resources/application-notes/

This IP creates a mouse that will spin in a square pattern till removed.

Does this demo work on your custom PCB? Removal and re-dock work ok with the USB interface?

2) The parts placed onto Vbus of the USB connector are for inrush transient protection which can lead to damage to the XMOS CPU if these parts (or similar) are not present. That is, due to USB cable inductance, Vbus can be a multiple voltage of the expected +5v0 range that can lead to permanent damage of the CPU.

3) The XMOS xcore-200 mc audio board contains specific audio ADC/DAC devices - are your using the same with the same port connections? If not, the IP must be modified to remove any attempts to communicate with components that may be missing from your custom design.

4) Is your custom PCB, powered by the USB host or powered by a local external power supply (self powered = 1)?

5) If possible, post your schematic relevant to the USB; power supply of your custom PCB for a review. Are you using the proper RTUNE resistor value?

6) Run TDD.EXE on the xcore-200 mc reference design and repeat on your custom PCB. This tool is a free program from Thesycon website and validates if the USB descriptors are proper or not.

https://www.thesycon.de/eng/usb_descriptordumper.shtml

also...which pin is connected to the VBUS filter that is shown in your schematic? This must be on the USB_VBUS pin of the XMOS CPU.
TonyXiao
Active Member
Posts: 44
Joined: Fri Mar 29, 2019 3:58 am

Post by TonyXiao »

Hi mon2

i have tested plug on/off with one Mac, it works all right. problem seems come to my PC, any way i post my schematic and the result with run TDD.EXE. actually i need to implement 2 usb device, and i donn't know how to modify the usb libary.

and i am still wondering why there isn't a one bit IO XS1_PORT_1K on tile1 of XE216-512-TQ128, but the definition:<Port Location="XS1_PORT_1K" Name="PORT_USB_TX_READYOUT"/> make sense, and the USB function works all right?
Attachments
USB connection.png
(42.6 KiB) Not downloaded yet
USB connection.png
(42.6 KiB) Not downloaded yet
USB Descriptor Dumper.png
(61.69 KiB) Not downloaded yet
USB Descriptor Dumper.png
(61.69 KiB) Not downloaded yet
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Hi.

1) A few minor corrections to your designs but do not believe these will stop your design from working

xmos_esd.png
(88.85 KiB) Not downloaded yet
xmos_esd.png
(88.85 KiB) Not downloaded yet

2) Test your custom PCB with the mouse IP AN00129 referenced in my last post. Does that work on each and every PC?
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Also review this thread for some ideas:

https://www.xcore.com/viewtopic.php?f=37&t=5808

update:

review this document and follow the s/w details (Section 3 - Work around):

https://www.xmos.com/developer/download ... 1.0%29.pdf

Do post your updates.
TonyXiao
Active Member
Posts: 44
Joined: Fri Mar 29, 2019 3:58 am

Post by TonyXiao »

Hi mon2

any idea for the below question?
why there isn't a one bit IO XS1_PORT_1K on tile1 of XE216-512-TQ128, but the definition:<Port Location="XS1_PORT_1K" Name="PORT_USB_TX_READYOUT"/> make sense, and the USB function works all right?

it is amazing when i flashed hid mouse IP AN00129, it works on all PC.
i have updated the sc_xud version to 2.6.1 according to the USB Design Advisory, but still can recognized by my pc once after retry plug off/in.
it is now seems to be the firmware problem, how can i solve it? i have not do any change to the initial XCORE-200 MC Audio firmware except change to xu232 from xe216.

thanks.
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Found the following inside the port defines in "module_xud/include/xud.h"

Code: Select all

#if (XUD_SERIES_SUPPORT == XUD_U_SERIES)
    #define PORT_USB_CLK         on USB_TILE: XS1_PORT_1J
    #define PORT_USB_TXD         on USB_TILE: XS1_PORT_8A
    #define PORT_USB_RXD         on USB_TILE: XS1_PORT_8C
    #define PORT_USB_TX_READYOUT on USB_TILE: XS1_PORT_1K
    #define PORT_USB_TX_READYIN  on USB_TILE: XS1_PORT_1H
    #define PORT_USB_RX_READY    on USB_TILE: XS1_PORT_1M
  #else
    #define PORT_USB_CLK         on USB_TILE: XS1_PORT_1H
    #define PORT_USB_REG_WRITE   on USB_TILE: XS1_PORT_8C
    #define PORT_USB_REG_READ    on USB_TILE: XS1_PORT_8D
    #define PORT_USB_TXD         on USB_TILE: XS1_PORT_8A
    #define PORT_USB_RXD         on USB_TILE: XS1_PORT_8B
    #define PORT_USB_STP_SUS     on USB_TILE: XS1_PORT_1E
  #endif
so with your XE series ( XE216-512-TQ128), the bottom half of the code define should be active.

Can you confirm this detail which most likely will show a different highlighted colour in the IDE editor for the active defines?
TonyXiao
Active Member
Posts: 44
Joined: Fri Mar 29, 2019 3:58 am

Post by TonyXiao »

Hi mon2

such bottom half of the code define are within shadow background on my side, i thought they are inactive.
i am confused again about the usb connection within xmos. read the xmos datesheet, usb phy are seems connected with fixed io, such as PORT 8A\8B\1E\1F\1G\1H\1I\1J\1K, and now the port usb concerned IO enlarge to PORT 8A\8B\8C\8D......, I am really lost. how can i reserved the PORT IOs for usb phy?
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Hi. Please review this spreadsheet with respect to USB port pins and port pins that are available for your use if USB is enabled:

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

In this spreadsheet, goto the XE2xx heading -> TQ128 and that is the pinout for your device.

For the Tile 1 = USB PHY enabled, review the GREEN background pins. These GREEN marked pins are NOT available for your use if USB is enabled on Tile 1.

However, note that Port P4A, P4B, P4C & Port P4D have a WHITE background which means they ARE available for your use. What is happening here is that internal multiplexers are making use of the GREEN marked pins but the 4 bit port pins with the WHITE background are still available for your use. We have confirmed this with past lab testing.

Summary, if the port pin has a WHITE background, the pin is available for your use.
TonyXiao
Active Member
Posts: 44
Joined: Fri Mar 29, 2019 3:58 am

Post by TonyXiao »

Hi mon2

Thanks for your clarification.i am quite more sure now.
for the usb plug on/off issue, now i used one usb hub connected with my pc,through the usb hub and it can always recognzied my board.

as 2 usb device are needed for my project, can the XU232's 2 usb phy work at the same time? how to realize the 2 usb device using the same xud library, should i wirting usb signal array?
Post Reply