USB Host not seeing XMega USB device

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

I'm working on a project using an ATXMEGA64A4U, powered by the USB port.

I'm trying to have it recognized by the HOST but nothing on the bus.

 

I have checked the D+/D- signals, and according to the selected speed they have the correct values, so pull-ups ok.

 

I have checked the bus lines using a USB analyzer from Lecroy, and nothing detected, no activity at all.

 

I'm entering inside the USB_BUSEVENT_vect ISR once, with the status set to 0x60, and nothing else after.

 

Can someone explain me why?

 

Thanks,

 

I have added my main.c file, I think this is enough for the code.

 

Attachment(s): 

This topic has a solution.
Last Edited: Mon. Sep 25, 2017 - 10:47 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What is the "host" here and what OS is it running? IOW what diagnostic tools does it offer to monitor the USB enumeration?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

USB Host is a PC, Windows or Ubuntu, tried on both

Last Edited: Tue. Sep 12, 2017 - 03:54 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So what dmesg activity do you see in Linux when it enumerates? Also, assuming it does enumerate what does lsusb have to say about it?
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i have the same problem.

On my pc USB connection xMega works (sometimes PC dont know xmega, but after restarting xmega it is OK), but another pc's board doesnt work.

i have tryed some drivers from atmel.gallery, but it doesnt help.

 

jhdecker what kind of USB service are you using? (cdc, dfu, hid, ...)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Apparently you are not displaying a reset bus event status.  That wouldn't explain the problem but it might be good to know.

 

With Windows, I see 4 statuses at connect time.   suspend, resume, suspend, resume and reset.  Then I get a setup packet.

 

When you get a reset status, you must set the device address to zero and must enable receiving from the control out (from host) endpoint.  That is, the busnack0 must be false.  And no doubt other things too.  You should have things set up that way at startup though, so that isn't the problem. 

 

You also must set the pad registers from the production sig. row at startup.  (CALL and CALH).  You need the right USB clock.  For full speed it's 48 MHz and the CPU clock must be at least 12 MHz.   I'm not sure what it is for low speed.

 

Other things that must be set are the speed (low or full), the max. endpoint address,  enable, and attach.  

Last Edited: Sat. Sep 16, 2017 - 06:37 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Hi,

 

Sorry for the late reply, I finally found the issue with a colleague here in our lab.

The issue was due to a crack in the soldering of the micro USB connector, very hard to identify.angry

 

Now I have the enumeration fully done on both Linux and Windows host.