Page 1 of 2

SAM-BA hardware requirement

Posted: Sat Jan 26, 2008 2:56 pm
by fireball
Hi folks!
I have self developed kit for AT91sams64, crystal is 16MHZ.
The only difference from ATMEL's kit is this crystal. The remaining ckt. is same.
i am trying to detect board with SAM-BA via DBGU unit.
But all the time i am getting message: "No valid processor ID found"
I have done lot excercise by reading a lot documentation and forum posted here to solve it but yet not suceeded.

here i am writing whole procedure i am going through:
First set the jumper of TEST(high), and left unconnected the PA0, PA1, PA2(because they have internal pull-up)for more than 10 sec.
Then power off the board. Open up the TEST pin. After that power On the board and also reset by switch.
So the chip would go for boot loader execution in its on-chip flash.
Finally I open the SAM-BA application from its icon and selecting COM & AT91SAM7S64-EK.
But no answer is there.

Let me have help on it to have reasonable solution.

And aslo let me know some fact which i am confused with:
1) does MAX232 work instead of max3232 ? If not then why?
2) For USB connection, 18.432MHz is must ? or 16MHz will work properly?
3) Does it compulsary to erase flash ( with ERASE pin), before Every recovery of the SAM-BA after some application programm loaded into flash?
4) does maximum number of erase of LOCK bits eith ERASE pin is 100 times?

Hope to have quick reply!
Thanks & regards!

Posted: Mon Jan 28, 2008 11:39 am
by GSNT
Hi fireball,

without 18.432 MHz Crystal SAM-BA is not working.
9.8 SAM-BA Boot Assistant
....
• Communication through the USB Device Port is limited to an 18.432 MHz crystal. (The SAM-BA Boot provides an interface with SAM-BA Graphic User Interface (GUI).
HTH,
Gerd

Re: SAM-BA hardware requirement

Posted: Mon Jan 28, 2008 1:33 pm
by spk110
[quote="fireball"]Hi folks!
I have self developed kit for AT91sams64, [b]crystal is 16MHZ[/b].
The only difference from ATMEL's kit is this crystal. The remaining ckt. is same.
i am trying to detect board with SAM-BA via DBGU unit.
But all the time i am getting message: "No valid processor ID found"
I have done lot excercise by reading a lot documentation and forum posted here to solve it but yet not suceeded.

here i am writing whole procedure i am going through:
First set the jumper of TEST(high), and left unconnected the PA0, PA1, PA2(because they have internal pull-up)for more than 10 sec.
Then power off the board. Open up the TEST pin. After that power On the board and also reset by switch.
So the chip would go for boot loader execution in its on-chip flash.
Finally I open the SAM-BA application from its icon and selecting COM & AT91SAM7S64-EK.
But no answer is there.

Let me have help on it to have reasonable solution.

And aslo let me know some fact which i am confused with:
1) does MAX232 work instead of max3232 ? If not then why?
2) For USB connection, 18.432MHz is must ? or 16MHz will work properly?
3) Does it compulsary to erase flash ( with ERASE pin), before Every recovery of the SAM-BA after some application programm loaded into flash?
4) does maximum number of erase of LOCK bits eith ERASE pin is 100 times?

Hope to have quick reply!
Thanks & regards![/quote]

1. Max232 works on 5V supply and Max3232 works on 3.3V supply.
3. Its must to erase flash with erase pin before using SAM-BA
spk110

Posted: Mon Jan 28, 2008 1:37 pm
by GSNT
Hi again,

1. MAX3232 is a 3V Version of MAX3232 (5V). So changing them will not work.
2. SAM-BA needs 18.432 MHz. If you use a simple JTAG (with Wiggler) You can use other Crystals. (I use 16MHz, it's a good choice).
3. AFAIR SAM-BA recovery is working without ERASE if no security bit is set.
4. Datasheet:
40.10.4 Non Volatile Memory Bits (NVM Bits)
40.10.4.1 NVM Bits: Write/Erase Cycles Number
The maximum number of write/erase cycles for Non Volatile Memory bits is 100. This includes
Lock Bits (LOCKx), General Purpose NVM bits (GPNVMx) and the Security Bit.
AFAIR SAM-BA recovery uses lock-bits. So just use JTAG with OpenOCD or Kjell Eirik Anderson's Flash tool.

HTH,
Gerd

Posted: Mon Jan 28, 2008 2:19 pm
by fireball
Finally I got my development board detected over DBGU with max232.:) Thank you very much both of u to take such interest.
40.10.4 Non Volatile Memory Bits (NVM Bits)
40.10.4.1 NVM Bits: Write/Erase Cycles Number
The maximum number of write/erase cycles for Non Volatile Memory bits is 100. This includes
Lock Bits (LOCKx), General Purpose NVM bits (GPNVMx) and the Security Bit.
So, the use of SAM-BA is constrained to 100 times. I can't use it in development phase to load flash many times.
I need to start H-JTAG which still not working for me.
Thanks & best Regards.
Fireball.

Posted: Mon Jan 28, 2008 2:59 pm
by GSNT
Hi again,

my favorite is the JTAG-programmer of Kjell Anderson. It's easy to use, command line- or GUI-Version and it's working with parallel Wiggler or self-built USB-Interface. If you can built your own development board it should be no problem to use it as USB-JTAG Programmer.

http://kjell.e.andersen.googlepages.com

HTH,
Gerd

Posted: Mon Jan 28, 2008 3:25 pm
by gerhardf
fireball wrote:
40.10.4 Non Volatile Memory Bits (NVM Bits)
40.10.4.1 NVM Bits: Write/Erase Cycles Number
The maximum number of write/erase cycles for Non Volatile Memory bits is 100. This includes
Lock Bits (LOCKx), General Purpose NVM bits (GPNVMx) and the Security Bit.
So, the use of SAM-BA is constrained to 100 times. I can't use it in development phase to load flash many times.
the 100 times is only valid under worst case environment condition, so on your desktop this should be 10 timer better.
fireball wrote: I need to start H-JTAG which still not working for me.
have you ever tried to use openocd (included in www.yagarto.de)?
it works well (but slow) with parallel wiggler too.
my favorite is arm-usb-ocd ( from www.olimex.com/dev).

regards
gergard

Posted: Tue Jan 29, 2008 12:40 pm
by fireball
Hi GSNT!
Now I have jtag-programmer of Kjell Anderson.
Can u pls tell me how to deal with S-record file (*.s19)?
I don't have any idea.
Thanx.

Posted: Tue Jan 29, 2008 1:16 pm
by GSNT
Hi again,

S19 is a Motorola format (ASCII, with a 'S' at the beginning of a line). Don't know if your Compiler can output that (YAGARTO can be switched in it's makefile). If not, try to convert it.

Converter:

http://www.ezl.com/~rsch/S_Records/

HTH,
Gerd

Posted: Wed Jan 30, 2008 8:44 am
by spk110
hi all,

I would like to know where this is indicated in datasheet that - Using SAMBA target can be programmed is limited for 100 times. I didnt find it.

And is any open source schematic for jTAG hardware is available.

thanks & regards
spk110

Posted: Wed Jan 30, 2008 1:10 pm
by GSNT
Hi spk110,

it's in the Errata section of the datasheet, page 651:
40.10 AT91SAM7S64 Errata - Manufacturing Number 58814G
Refer to Section 40.1 “Marking” on page 579
....
40.10.4 Non Volatile Memory Bits (NVM Bits)
40.10.4.1 NVM Bits: Write/Erase Cycles Number
The maximum number of write/erase cycles for Non Volatile Memory bits is 100. This includes
Lock Bits (LOCKx), General Purpose NVM bits (GPNVMx) and the Security Bit.
This maximum number of write/erase cycles is not applicable to 64 KB Flash memory, it remains
at10K for the Flash memory.
Problem Fix/Workaround
None.
You can use a simple parallel Wiggler (schematic in H-JTAG Manual (www.htag.com)) or a simple At91SAM7S64 board as USB-JTAG (http://kjell.e.andersen.googlepages.com/)

HTH,
Gerd

Posted: Thu Jan 31, 2008 7:18 am
by spk110
Hi GSNT,

Thanks, I ignored errata section.
Few days back i faced the same problem with sam7x256.
Now i am using sam7x512, any idea whether the same
limitation apply to 512 also.

regards
spk110

Posted: Fri Feb 01, 2008 3:13 pm
by fireball
Hello GSNT!
Sorry for the delay to respond here. It was due to some technical problem with internet connection.
Thank you very much for S19 link!
Now I have enough satisfactorily working development tools of ARM chain to get in Development phase of my project.
Here I will share my upcoming experience and problems with all the experts and newbies like me.

Also let me know whether it is necessary to assert JTAGSEL pin to enter debug mode while using wiggler's PP hardware.

Thanks and Regards from bottom of the heart!

Posted: Sat Feb 02, 2008 2:01 am
by GSNT
Hi fireball,

AFAIK JTAGSEL is used to switch to a 'JTAG boundary scan' mode (high). With it's integrated pull-down 'EmbeddedICE' (In-circuit Emulation, Debug Communication Channel Support) mode is enabled, which is controlled via JTAG and used for Wiggler flash/debug operation.
So you can leave it unconnected.

HTH,
Gerd

Posted: Sat Feb 02, 2008 7:20 am
by fireball
Hi GSNT!
Oh...
I think i had mis-conceptualize the debugger controller in ARM architecture.
Now it is clear: the Embedded ICE and JTAG boundary scan are different entities and embedded ICE is used by the wiggler.
Thanks
Bye...........