SAM3X8E USB Interface not working

Discussion around product based on ARM Cortex M3 core.

Moderators: nferre, ncollot

asim
Posts: 7
Joined: Fri Jun 26, 2015 7:02 am

SAM3X8E USB Interface not working

Thu Jul 02, 2015 3:52 pm

Hi Friends,
I have designed a board around ATSAM3X8E chip which is also used in Arduino DUE Board. Original Arduino DUE board schematic can be seen here: 
http://www.arduino.cc/en/uploads/Main/a ... ematic.pdf

I made my design keeping it compatible with Arduino DUE board. I have copied almost everything from from Arduino DUE Board schematic except USB Host Capability which I stripped from the design as it was not required in my system where i only needed this board to appear as USB Slave device.

I am currently able to program the ATSAM3X8E chip on my custom designed board over UART0 interface (RXD0/Pin27, TXD0/Pin2). I am using Arduino IDE to program the board. When i program the board using UART0 i select Arduino DUE Programming Port from Arduino IDE> Tools > Port menu. To test the board I had programmed Arduino AnalogReadSerial example and I was able to see Serial Prints on Serial Terimnal.

The trouble starts when I plug in my Boards USB interface with my PC running Windows 7 or Windows 8( i haven't tried any other OS yet). When I plug in my boards USB in to PC, the PC is able to generate USB Plugin sound. When I remove my board USB from PC USB then it also generate USB un-plug sound.

I also was able to see the USB device appearing in Device Manager window as shown below in this picture:
https://www.dropbox.com/s/zapf5gibmc0ur ... e.JPG?dl=0

I also downloaded and installed Atmel SAM-BA tool. And tried updating thr USB device driver through following SAM-BA installation folder:
C:\Program Files (x86)\Atmel\sam-ba_2.15\drv

But windows does not recognizes this device and generates following error message:

"Windows was Unable to install your Unknown device"

Please see the ATMSA3X8E scheme that I am using for my board:
https://www.dropbox.com/s/5dgahob8nwx8l ... c.png?dl=0

i have already cycled through chip ERASE by pressing ERASE button. And I also tried to connect using SAM-BA but the board does not appear as Com port and remains appearing as Unknowd Device. Due to this reason the SAM-BA is unable to connect.

I also checked VDDOUT which are around 1.79V and made sure that 3.3V are also fine. Also the clock oscillator is working and producing 12MHz clock.

Can someone suggest what am i missing that my ATSAM3X8E based design is un able to appear as com port over its Native USB interface?

Kind Regards
asim
Posts: 7
Joined: Fri Jun 26, 2015 7:02 am

Re: SAM3X8E USB Interface not working

Thu Jul 02, 2015 3:55 pm

I had probed DP/DM signals using oscilloscope. I was able to see some continuous activity on the USB signals. I will try to upload a screen capture of the signals. But somehow windows 7 or windows 8 does not lets me install driver.

As i stated earlier i get following error:

"Windows was Unable to install your Unknown device"

An important thing to note here is that if I attach a ready made Arduino DUE board on Native USB port, windows is always able to recognize it as Arduino DUE (COM15). 

However when I press erase button for more than 250msec while resetting the Arduino DUE board the board appears as : Bossa Program port (COM20). 

I then reprogram the board through Arduino IDE with AnalogReadSerial example. Now when i un-plug and plug the Arduino DUE board the board again starts to appear as Arduino DUE (COM15).

From this excercise, i can understand that ATSAM3X8E driver for the USB interface is already correctly installed on my system. And Its only my custom designed ATSAM3X8E board that is failing to configure its USB somehow.

I need to figure out what is that difference between my hardware and the original Arduino DUE board's hardware that is preventing my custom designed board to run its USB interface?
asim
Posts: 7
Joined: Fri Jun 26, 2015 7:02 am

Re: SAM3X8E USB Interface not working

Thu Jul 02, 2015 3:57 pm

Here is screen capture of USB signals of my custom designed ATSAM3X8E board:

https://www.dropbox.com/s/qj1be2oikfoao ... 7.jpg?dl=0

The upper trace is for USB_D_P and lower trace is for USB_D_N. The activity on USB signals is brief and happens just after when i press and release RESET button.
asim
Posts: 7
Joined: Fri Jun 26, 2015 7:02 am

Re: SAM3X8E USB Interface not working

Thu Jul 02, 2015 4:00 pm

I also noticed that the ATSAM3X8E chip on my board has a different ATMEL Logo than on Arduino DUE board.
However the part number is exactly same, i.e. :

Atmel
ATSAM3X8E
AU
The logo on Arduino DUE board has ATMEL logo in Capital letters.

Here are the top and bottom views of my 4-layer ATSAM3X8E board

Top side view:
https://www.dropbox.com/s/7t0omho1k9d4o ... n.JPG?dl=0

Bottom side view:
https://www.dropbox.com/s/vq3wgp3b6xkf9 ... n.JPG?dl=0

Top view with highlighted short lenght USB signals
asim
Posts: 7
Joined: Fri Jun 26, 2015 7:02 am

Re: SAM3X8E USB Interface not working

Wed Jul 08, 2015 4:14 pm

no help? no interest??
MGen
Posts: 12
Joined: Thu Jul 02, 2015 3:33 pm

Re: SAM3X8E USB Interface not working

Sat Jul 11, 2015 3:03 am

Hi,
I was trying to get the USB CDC example (USB device) working, given for SAM V71 Xplained Ultra. It did not.

I've been struggled many days around this. I made it work, but don't know the reason why I should do that way. Only experiments made me try that "hack". I had to place a big delay loop into the USB IRQ handler if the cause of IRQ are Suspend or Wakeup.

I'm rather confused. :/ Don't really think the examples/libraries are good. For example Sleep() in timetick.c was buggy and I had to fix it as anyone should.
I don't really think that SAM V71 is good but it seems to be. The DAC example showed a very weird DAC output on the oscilloscope...
The fact that Atmel Studio 6.2 is unable to watch my variables while debugging gets to be a low priority problem.

Back to the USB thing... I've measured the D+ and D- lines for the USB CDC example and they are well pulled-down when detached but well not released (the pull-downs) when attached to the pins. D+ shows 2.75V, which means 1.5k pull-up and 15k pull-down is active at the same time. They should not as I know. D- shows 2.05V, which is absolutely "nonsense"... (7k pull-up ???)
Desptite, the example works with the additional delay.  I am about to learn USB in deep but I am afraid I can't with all these weird issues.

Maybe You have similar probs. When the USB CDC was not working, an "Unknown device" appeared in device manager (Win 7) and the OS said it couldn't recognise the device. (Of course since it was not doing anything.) Some HW resets made it work ONLY when the USB cable was left plugged in meanwhile.
Does Atmel enough experience on USB...? :/
asim
Posts: 7
Joined: Fri Jun 26, 2015 7:02 am

Re: SAM3X8E USB Interface not working

Sat Jul 11, 2015 8:16 am

Thanks MGen for your interest in this thread. Yes I am also having the same issue. When I plug in the USB cable, i see Unknown Device in Device manager. 

Thing that I dont understand is that ATSAM3X8E chip is also used in Arduino DUE board and when I Erase it (by pressing ERASE button) it does appear as Bossa Program Port. I just cant understand when i have my hardware copy of the Arduino DUE board, why it cant behave like Arduino Due when it comes to USB interface?

I dont know if Arduino Guys have some other bootloader than the default Atmel bootloader in the ATSAM3X8E devices that they solder on their Arduino DUE boards. If someone knows that "secret: ingredient, please let me know.

Thanks
dougcl
Posts: 10
Joined: Tue Nov 04, 2014 5:09 pm

Re: SAM3X8E USB Interface not working

Tue Jul 14, 2015 12:21 am

If you have the BOSSAC driver installed on your computer, your board should show up as BOSSA under COM ports in your device list. The SAM3 ships with CDC in ROM, so this much should happen if your hardware is working. You can check to see if BOSSAC is installed correctly by plugging in a Due and hitting the erase button. If it shows up as BOSSA, and your board doesn't, I am afraid there is a hardware problem on your board. 

Doug
asim
Posts: 7
Joined: Fri Jun 26, 2015 7:02 am

Re: SAM3X8E USB Interface not working

Tue Jul 14, 2015 2:07 pm

Hi Doug,

Yes my Arduino Due does comes as Bossa Com port when i hit erase button. But my custom designed board always shows up as unknown device. I have two sample custom designed boards and they both show up as unknown device when i plug USB cable.

The interesting thing is that I can always program my custom designed board over UART interface. Which indicates that the internal boot loader is working at least on UART.

I have checked USB schematic i dont find any issue with USB Scheme i copied from Arduino DUE schematics. Do you know what else could go wrong? 

Return to “SAM3 Cortex-M3 MCU”

Who is online

Users browsing this forum: No registered users and 1 guest