Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: at91sam7s256 USB not recognized
PostPosted: Mon Mar 19, 2012 6:36 am 
Offline

Joined: Mon Mar 19, 2012 5:47 am
Posts: 6
I've been pulling my hair out of my head trying to solve this one. I've searched for nearly 10 hours for the answer (yet someone will pull up a thread in seconds) anyway...

I have a custom at91sam7s256 dev board. It is powered by the USB port. When I plug in the device, windows (7) says USB device not recognized.

I do the required bootloader steps by powering the board with the tst pin pulled high for 10 seconds, then powering the board down and up again with the tst pin pulled low.

The relevant bits of the schematic are attached-

They are based off of the reference schematic included in the book "ARM microcontroller interfacing" by Elektor.

I've also tried pulling the erase pin high for a few seconds then reconnecting the board. No luck.

When I run SAM-BA it has no options for usb (COM1 shows up by default).

I tried manually installing the device drivers that came with SAM-BA but windows tells me they're incompatible with the device.

According to the book, that schematic for USB is proven to work but I've had no luck.

Any ideas how to get the usb working on this guy?


Attachments:
File comment: relevant bits...
schemsnip.png
schemsnip.png [ 48.08 KiB | Viewed 1800 times ]
Top
 Profile  
 
 Post subject: Re: at91sam7s256 USB not recognized
PostPosted: Mon Mar 19, 2012 10:18 am 
Offline

Joined: Fri Mar 09, 2012 1:34 pm
Posts: 68
At first glance R5 seems to be of too little resistance, but the USB should bear it

_________________
Best regards
Przemyslaw Baranski


Top
 Profile  
 
 Post subject: Re: at91sam7s256 USB not recognized
PostPosted: Mon Mar 19, 2012 5:17 pm 
Offline

Joined: Mon Mar 19, 2012 5:47 am
Posts: 6
I changed R5 to 47k which is actually what the reference suggests (I made a mistake) but windows still can't recognize it.


Top
 Profile  
 
 Post subject: Re: at91sam7s256 USB not recognized
PostPosted: Mon Mar 19, 2012 5:28 pm 
Offline

Joined: Fri Mar 09, 2012 1:34 pm
Posts: 68
Hi!
1) Where is the problem - before or after USB enumeration procedure? Do you have USB analyzer?
2) Have you tried under Windows XP? I've experienced some problems under Vista and 7

_________________
Best regards
Przemyslaw Baranski


Top
 Profile  
 
 Post subject: Re: at91sam7s256 USB not recognized
PostPosted: Mon Mar 19, 2012 5:42 pm 
Offline

Joined: Mon Mar 19, 2012 5:47 am
Posts: 6
I haven't tried it yet on windows xp nor do I have a logic analyzer.

I attached an image of the bubble that pops up as soon as I plug the board in.

I only need to use the usb port to flash the chip. That's what I'm really trying to do here. I don't have much experience programming these, but I've used 8-bit micros for quite some time.

I also have a JTAG header on the board, but I can't seem to get that working either. I think I should eventually just make a different thread for that though.


Attachments:
usberror.png
usberror.png [ 59.05 KiB | Viewed 1779 times ]
Top
 Profile  
 
 Post subject: Re: at91sam7s256 USB not recognized
PostPosted: Mon Mar 19, 2012 8:01 pm 
Offline

Joined: Fri Mar 09, 2012 1:34 pm
Posts: 68
Hi!
Then I'd suggest to run JTAG first.
1) Check if VDDFLASH, VDDIO is 3.3V
2) Check if VDDOUT and VDDCORE i 1.8V
3) ERASE should be low
4) TST should be low
5) JTAGSEL should be low
6) Check if uC's JTAG pins are correctly soldered and are properly connected to the programmer

Are you using Keil?

_________________
Best regards
Przemyslaw Baranski


Top
 Profile  
 
 Post subject: Re: at91sam7s256 USB not recognized
PostPosted: Tue Mar 20, 2012 12:53 am 
Offline

Joined: Mon Mar 19, 2012 5:47 am
Posts: 6
Everything checks out above checks out. This is what I'm looking out with the GDB server. The device just can't connect. When I try to run J-flash, sometimes it says unexpected core ID found (all zeros 0x0000000...).

EDIT: I'm using yagarto. I have a segger j-link edu.


Attachments:
gdb.png
gdb.png [ 30.76 KiB | Viewed 1759 times ]
Top
 Profile  
 
 Post subject: Re: at91sam7s256 USB not recognized
PostPosted: Tue Mar 20, 2012 4:38 am 
Offline

Joined: Mon Mar 19, 2012 5:47 am
Posts: 6
Okay so I finally was able to connect to J-Flash with my J-Link. The GDB server window still says device not connected. When I connect to the device in J-Flash, I notice the frequency is auto detected to be 5200kHz and the core ID is correctly read. I can also read the flash memory into J-Flash.

It seems to be working off and on... Sometimes when I try to connect it says no flash device could be found. Other times it says "could not halt cpu".

Could this be because my main oscillator isn't working properly? 5.2 MHz seems kind of low to me.

I'm getting closer!


Top
 Profile  
 
 Post subject: Re: at91sam7s256 USB not recognized
PostPosted: Tue Mar 20, 2012 10:05 am 
Offline

Joined: Fri Mar 09, 2012 1:34 pm
Posts: 68
Hi!
So what was wrong you could not connect through JTAG before? I'd inspect electrical contacts to get it working properly all the time.
The quartz seems ok according to the technical specification.
There is however errata in the documentation: section 40.5.3.1

_________________
Best regards
Przemyslaw Baranski


Top
 Profile  
 
 Post subject: Re: at91sam7s256 USB not recognized
PostPosted: Tue Mar 20, 2012 7:36 pm 
Offline

Joined: Mon Mar 19, 2012 5:47 am
Posts: 6
I didn't change anything it just worked. Like I said it seems like I can get a few things to work but not enough. I decided to use SAM-BA to flash the chip since I don't have a full license for j-flash.

When I launch SAM-BA, I choose the j-link, choose at91sam7s256-ek as the board, and then choose a custom on-board crystal of 18432000 Hz.

Sometimes when I connect it says "TIME OUT: the applet did not return. check the connection to your device"

Sometimes I can get past that but when I try to run any script in sam-ba (like erase flash for example), I get the same applet error.

Is it a problem that I chose the at91sam7s256-ek as the board even though I'm using a custom one? The JTAG schematic for mine is taken directly from the reference schematic provided by atmel for that dev board.


Top
 Profile  
 
 Post subject: Re: at91sam7s256 USB not recognized
PostPosted: Tue Mar 20, 2012 8:20 pm 
Offline

Joined: Fri Mar 09, 2012 1:34 pm
Posts: 68
Hi!
I am currently at home without the possibility to check the AT91Sam7s boards that I have at work.
1) Could you change the quartz for 12MHz though?
2) Could you check the board under Windows XP? Of 4 computers with Windows 7, only 1 worked correctly with USB drivers that I tested. Under XP you can use software USB analyzer - SniffUSB.

It seems I am running out of ideas how to help you. I know it is frustrating.

_________________
Best regards
Przemyslaw Baranski


Top
 Profile  
 
 Post subject: Re: at91sam7s256 USB not recognized
PostPosted: Tue Mar 27, 2012 10:43 am 
Offline

Joined: Fri Dec 02, 2011 12:40 am
Posts: 10
We have USB and JTAG working with AT91SAM7XC256 and 512. For JTAG we use Segger SAM ICE and Yagarto toolchain. It is important to have latest software from Segger as earlier versions were a bit buggy. Sometimes the SAM7 is not detected - just reset and try again. Every now and then we also have to pull the USB plug from the blue SAM-ICE box to get the thing working again. Sorry Segger, but it the software is still is not very stable...

As to USB: I ported the Atmel CDC example driver to our OS and did some modifications for getting VBUS sense and pull-up resistor to work. Just as you did, we use GPIOs for these. I also fixed some bugs in the driver. (see my other posting on USB)
I few months ago I switched to SAM-BA v2.11 and adjusted USB product ID in the ported CDC driver for using the same ID as with SAM-BA -> so ID is now 0x6124. This way you can use the Windows device driver that comes with SAM-BA and that seems to work fine under Windows 7.
I no longer get the 'device not recognized' message. I do get the 'device not functioning properly' message, but only when the CDC driver is not able to respond to USB requests from Windows in a timely manner. (e.g. when SAM7 is halted in breakpoint)

In general: My advise is not to use earlier versions of SAM-BA as they have problems under Windows 7/XP.

Hope this helps - robbie


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron