EmbDev.net

Forum: ARM programming with GCC/GNU tools Trouble in SAM-BA USB programming


von Sara S. (slsm)


Rate this post
useful
not useful
Hi,
I've built a custom board with the AT91SAM7S and tried to program it
using
SAM-BA v2.6 (with USB connection).

I've copied the boot stuff from the SAM7S-EK schematic:
- LED to PA0 from resistor and 3V3
- Pull-up on PA1/2
- USB pull-up controlled by PA16
- TST switchable to high for bootloader recovery
- 18.432 XTAL

and performed the bootload copy by closing JP5 (TST), applied power,
wait
10 seconds, power down.

but after that when I connect the board to PC it says "usb device not
recognized".
and when I run SAM-BA there is only COM ports in the list and I can't
find and select USB connection!

Any ideas on what to do?

Regards,
Sara

von Nils S. (nilswed)


Attached files:

Rate this post
useful
not useful
Sara slsm wrote:
> Hi,
> I've built a custom board with the AT91SAM7S and tried to program it
> using
> SAM-BA v2.6 (with USB connection).
>
> I've copied the boot stuff from the SAM7S-EK schematic:
> - LED to PA0 from resistor and 3V3
> - Pull-up on PA1/2
> - USB pull-up controlled by PA16
> - TST switchable to high for bootloader recovery
> - 18.432 XTAL
>
> and performed the bootload copy by closing JP5 (TST), applied power,
> wait
> 10 seconds, power down.
>
> but after that when I connect the board to PC it says "usb device not
> recognized".
> and when I run SAM-BA there is only COM ports in the list and I can't
> find and select USB connection!
>
> Any ideas on what to do?
>
> Regards,
> Sara
Hello Sara,
you must use the correct .inf-file and its correct driver. I have been
into this problem myself, spent an awful lot of time solving it.
Unistall the driver via the hardware controlling program
(system-hardware etc) and use ATM6124.inf and ATM6124.sys to reinstall.
They are attached in the zip file.
Good luck,
Nils in rainy Sweden

von Sara S. (slsm)


Rate this post
useful
not useful
> Hello Sara,
> you must use the correct .inf-file and its correct driver. I have been
> into this problem myself, spent an awful lot of time solving it.
> Unistall the driver via the hardware controlling program
> (system-hardware etc) and use ATM6124.inf and ATM6124.sys to reinstall.
> They are attached in the zip file.
> Good luck,
> Nils in rainy Sweden

Thanks Nils
but how should I reinstall them, I try by Update driver but it wasn't
useful !

Regards,
Sara

von Nils S. (nilswed)


Rate this post
useful
not useful
Sara slsm wrote:
>> Hello Sara,
>> you must use the correct .inf-file and its correct driver. I have been
>> into this problem myself, spent an awful lot of time solving it.
>> Unistall the driver via the hardware controlling program
>> (system-hardware etc) and use ATM6124.inf and ATM6124.sys to reinstall.
>> They are attached in the zip file.
>> Good luck,
>> Nils in rainy Sweden
>
> Thanks Nils
> but how should I reinstall them, I try by Update driver but it wasn't
> useful !
>
> Regards,
> Sara

Be my guest...!
You select UNINSTALL to remove the driver. Then you reattach the board.
The "New Hardware" ought to pop up. After that you actively install the
device by selecting the directory where you saved the files I sent you.
Keep only the files I sent you in that directory, no other files! Dont
let XP select the install files for you!
Encore: Good luck,
Nils from sunny Sweden

von Sara S. (slsm)


Rate this post
useful
not useful
> Be my guest...!
> You select UNINSTALL to remove the driver. Then you reattach the board.
> The "New Hardware" ought to pop up. After that you actively install the
> device by selecting the directory where you saved the files I sent you.
> Keep only the files I sent you in that directory, no other files! Dont
> let XP select the install files for you!
> Encore: Good luck,
> Nils from sunny Sweden

Hello
Windows don't let me to do that, I checked my board,I think there is a
problem with my board.
microcontrller doesn't answer to host requests!and therefore host
doesn't know device is of which class!
Any idea on this problem?!


Regards,
Sara

von Nils S. (nilswed)


Rate this post
useful
not useful
Sara slsm wrote:
>> Be my guest...!
>> You select UNINSTALL to remove the driver. Then you reattach the board.
>> The "New Hardware" ought to pop up. After that you actively install the
>> device by selecting the directory where you saved the files I sent you.
>> Keep only the files I sent you in that directory, no other files! Dont
>> let XP select the install files for you!
>> Encore: Good luck,
>> Nils from sunny Sweden
>
> Hello
> Windows don't let me to do that, I checked my board,I think there is a
> problem with my board.
> microcontrller doesn't answer to host requests!and therefore host
> doesn't know device is of which class!
> Any idea on this problem?!
>
>
> Regards,
> Sara

Hello Sara,
I think Windows are using the wrong driver when you get the error msg
"usb device not recognized". It probably talk with your board but get
information it doesn't like from it because the driver it finds for the
board don't match the installed inf-file. In my case it was an installed
driver for VID 6124, installed when I first time attached the
AT91SAM7S-EK-board, which interfered with the driver the bootloader
need. The problem is that Atmel bootloader uses the same VID and PID as
the -EK-board! So I had to uninstall even the register information for
that board and begin from scratch with the installation. Jan Axelson's
book USB Complete which I bought taught me that. Keep the normal driver
and inf-file for the AT91SAM7S-EK-board FAR away from Windows when you
reinstall your board!
Once more: good luck!
Nils

von Sara S. (slsm)


Rate this post
useful
not useful
Hello Nils,
thanks very much for your help.

> I think Windows are using the wrong driver when you get the error msg
> "usb device not recognized".

This error isn't only for not matching driver,an other way to get this
error without using any device,only use a 1.5 k resistor:
place the Resistor between D+ and VCC cable of the USB cable which is
connected to your PC. :)

I read Jan Axelson's book USB Complete before, it was a good source to
help in doing my project with USB.

> Keep the normal driver
> and inf-file for the AT91SAM7S-EK-board FAR away from Windows when you
> reinstall your board!

As I say in my first post, I use a custom board therefor I don't have
normal driver and inf-file for the AT91SAM7S-EK-board.


Regards,
Sara

von Nils S. (nilswed)


Rate this post
useful
not useful
Sara slsm wrote:
> Hello Nils,
> thanks very much for your help.
>
>> I think Windows are using the wrong driver when you get the error msg
>> "usb device not recognized".
>
> This error isn't only for not matching driver,an other way to get this
> error without using any device,only use a 1.5 k resistor:
> place the Resistor between D+ and VCC cable of the USB cable which is
> connected to your PC. :)
>
> I read Jan Axelson's book USB Complete before, it was a good source to
> help in doing my project with USB.
>
>> Keep the normal driver
>> and inf-file for the AT91SAM7S-EK-board FAR away from Windows when you
>> reinstall your board!
>
> As I say in my first post, I use a custom board therefor I don't have
> normal driver and inf-file for the AT91SAM7S-EK-board.
>
>
> Regards,
> Sara

Sorry Sara,
I stand corrected, did not try the 1k5 resistor myself! It is good to
know! I made several customs boards in parallel with using the -EK board
as sw-tryout. That is why I had problems with wrong drivers, forgetting
what you wrote before. (I JUST found a bug which has been eluding me for
several weeks, have had difficulties concentrating on other stuff!)
Reading your earlier posting I cannot imagine what can be wrong, you
seem to have all things correct, still I think the problem lies with the
driver. Jan A has an entry describing old driver removal, have you read
that?
I was sure I also had problem with my hardware, even as I designed  the
USB hardware part exactly as in the Atmel CPU manual. BUT my last 3
boards is today running, with the correct driver. A lot of work in vain,
could have kept the first board design!!!
Best wishes,
Nils

von Nils S. (nilswed)


Rate this post
useful
not useful
Nils Soderman wrote:
> Sara slsm wrote:
>> Hello Nils,
>> thanks very much for your help.
>>
>>> I think Windows are using the wrong driver when you get the error msg
>>> "usb device not recognized".
>>
>> This error isn't only for not matching driver,an other way to get this
>> error without using any device,only use a 1.5 k resistor:
>> place the Resistor between D+ and VCC cable of the USB cable which is
>> connected to your PC. :)
>>
>> I read Jan Axelson's book USB Complete before, it was a good source to
>> help in doing my project with USB.
>>
>>> Keep the normal driver
>>> and inf-file for the AT91SAM7S-EK-board FAR away from Windows when you
>>> reinstall your board!
>>
>> As I say in my first post, I use a custom board therefor I don't have
>> normal driver and inf-file for the AT91SAM7S-EK-board.
>>
>>
>> Regards,
>> Sara
>
> Sorry Sara,
> I stand corrected, did not try the 1k5 resistor myself! It is good to
> know! I made several customs boards in parallel with using the -EK board
> as sw-tryout. That is why I had problems with wrong drivers, forgetting
> what you wrote before. (I JUST found a bug which has been eluding me for
> several weeks, have had difficulties concentrating on other stuff!)
> Reading your earlier posting I cannot imagine what can be wrong, you
> seem to have all things correct, still I think the problem lies with the
> driver. Jan A has an entry describing old driver removal, have you read
> that?
> I was sure I also had problem with my hardware, even as I designed  the
> USB hardware part exactly as in the Atmel CPU manual. BUT my last 3
> boards is today running, with the correct driver. A lot of work in vain,
> could have kept the first board design!!!
> Best wishes,
> Nils

Sara, another thing I found out is that the schematics for
AT91SAM7S256-EK did not work in my case, the 100 kOhm resistor into the
USB-detect never indicated unattached USB cable. Instead I used the
voltage divider descibed in the manual of the CPU: change the 100 k
resistor to a 27 k resistor. On the "inside" (between CPU and resistor)
put a 47 k resistor  with other side to ground. This will give a stable
logic level both with attached and unattached cable!
Nils

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.