EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

JTAG commands are secret?

Started by Unknown November 4, 2005
Few weeks ago I asked here (but not only here, in Philips Technical Support
too) about JTAG commands used for Flash memory programming in LPC2K devices.
In fact, nobody has given me complete answer. Similar problems I've had with
STMicroelectronics Technical Support.
Is there anybody who know why uCs producers are so secretive?
Piotr


An Engineer's Guide to the LPC2100 Series

Hi,

No it's no secret, all JTAG write some codes into the SRAM...
It write the code and "RUN"..

best Regards --- In lpc2000@lpc2..., <piotr.zbysinski@e...> wrote:
>
> Few weeks ago I asked here (but not only here, in Philips Technical
Support
> too) about JTAG commands used for Flash memory programming in LPC2K
devices.
> In fact, nobody has given me complete answer. Similar problems I've
had with
> STMicroelectronics Technical Support.
> Is there anybody who know why uCs producers are so secretive?
> Piotr
>


> Is there anybody who know why uCs producers are so secretive?
Yes this is very sad as well as strange behavior and typical for
European management. They are all in the thinking that they have to get
payed for everything that are developed in house. They don't have the
vision to see that they get a much bigger return by putting the
information out in the open and let others improve it. The LPC family is
the best I have seen for many years (I'm actually mainly a PIC user) but
knowing that this type of old thinking still exists in Philips makes me
hold back from using them on all major designs. I talked to a rather big
Swedish company last week and they liked the LPC more then the
competition but selected the AVR ARM instead because of the same
reasons. And in that case we talk about a lot of pieces.

I really hope that a company like Philips that so often show technical
excelens could mature and show marketing excelens to...

/Ake

--
---
Ake Hedman (YAP - Yet Another Programmer)
eurosource, Brattbergavägen 17, 820 50 LOS, Sweden
Phone: (46) 657 413430 Cellular: (46) 73 84 84 102
Company home: http://www.eurosource.se
Kryddor/Te/Kaffe: http://www.brattberg.com
Personal homepage: http://www.eurosource.se/akhe
Automated home: http://www.vscp.org





> Hi,
> No it's no secret, all JTAG write some codes into the SRAM...
> It write the code and "RUN"..

1. Sure, but JTAG is used (as standard) for testing only (with commands
BYPASS, IDCODE, EXTEST etc.).
2. I asked about Flash memory programming - not using SRAM as a program
memory.
3. If you want to load some code to SRAM memory you should use special
commands (codes) for switching TAP into "SRAM load mode" (name of this mode
is my own, it is not possible to find them in official docs ;-)).
Piotr



> 1. Sure, but JTAG is used (as standard) for testing only (with
commands
> BYPASS, IDCODE, EXTEST etc.).
> 2. I asked about Flash memory programming - not using SRAM as a
program
> memory.

they can't tell you JTAG commands for Flash memory programming for
the simple reason that they don't exist :)

> 3. If you want to load some code to SRAM memory you should use
special
> commands (codes) for switching TAP into "SRAM load mode" (name of
this mode
> is my own, it is not possible to find them in official docs ;-)).

you are wrong, there is no SRAM load mode, but the "secret" is that
you can execute ALL ARM7 instructions through the JTAG interface by
putting them into the pipeline, so you execute this way small code
which do writes to your SRAM the information you want to write to the
flash (learn ARM assembler first for the data store commands ;) then
small code which calls Flash write IAP and you are set
Best regards
Tsvetan
---
PCB prototypes for $26 at http://run.to/pcb
(http://www.olimex.com/pcb)
PCB any volume assembly (http://www.olimex.com/pcb/protoa.html)
Development boards for ARM, AVR, PIC, MAXQ2000 and MSP430
(http://www.olimex.com/dev)



> Swedish company last week and they liked the LPC more then the
> competition but selected the AVR ARM instead because of the same
> reasons. And in that case we talk about a lot of pieces.

I don't understand this, what are you telling us that Atmel opens
their software specs? try to get from them the debug-write specs then!
I don't belive if somebody picked chip X or Y the reason is for the
open software programming specs.
LPCs have their strong side - easy to learn, less features to confuse
the beginner, smooth learning curve for peoples who move from 8-bits
this in other hand is their weak side later on - too infantile
peripherials, no DMA channels etc, SAM7S256(same price range as
LPC2124) for instance have 11 DMA channels connected to every
peripherial which relief the CPU from overhead waiting to read this
or that peripheral, so I bet the Swedish company moved to Atmel due
to other reasons than the programming specs.
perhaphs the way Philips to go is to keep this high-runner entry
series, but to introduce one more sophisticated serie which to keep
to them the peoples who want some more power from the ARMs :) Best regards
Tsvetan
---
PCB prototypes for $26 at http://run.to/pcb
(http://www.olimex.com/pcb)
PCB any volume assembly (http://www.olimex.com/pcb/protoa.html)
Development boards for ARM, AVR, PIC, MAXQ2000 and MSP430
(http://www.olimex.com/dev)


> they can't tell you JTAG commands for Flash memory programming for
> the simple reason that they don't exist :)

:) Really? If so, how can you load SRAM via JTAG if TAP in JTAG (as IEEE1149
standard says) recognizes _only_ 5 commands (used _only_ for testing)? In
devices with JTAG used for other than testing purposes (like SRAM/Flash
loading, debugging etc.) are special commands with codes different than 5
standard commands (like ISP_xxx in PLDs). There is no way to use JTAG in
other way than standard 16 states without _special_ codes.

>
>> 3. If you want to load some code to SRAM memory you should use
> special
>> commands (codes) for switching TAP into "SRAM load mode" (name of
> this mode
>> is my own, it is not possible to find them in official docs ;-)).
>
> you are wrong, there is no SRAM load mode, but the "secret" is that
> you can execute ALL ARM7 instructions through the JTAG interface by
> putting them into the pipeline,

Executing instruction is possible after loading. You say "through" - I
agree, but my question is: how to say to JTAG "through"?

> so you execute this way small code
> which do writes to your SRAM the information you want to write to the
> flash (learn ARM assembler first for the data store commands ;) then
> small code which calls Flash write IAP and you are set

Sure, all of this is possible _after_ loading. My question is: "how to load
SRAM"?
Thank you for "learn" suggestion ;-)
Piotr



> I don't understand this, what are you telling us that Atmel opens
> their software specs? try to get from them the debug-write specs then!
> I don't belive if somebody picked chip X or Y the reason is for the
> open software programming specs.

It's easy: open software programming specs give chance for cheap and easy to
buy programmers (like STK200 and similar).
For beginners "start" price is real argument. In my opinion AVR are No. 1 in
Poland _only_ because are easy to program and cheap.
Piotr


Tsvetan,

of course a decision like this depends on more then just the openness of
a company (And Atmel may not be the best example either in that case).
Still I would say that if its easy to get samples, get information, have
many application notes available often will be one of the key factors
on uP selection. No one can probably state that the PIC is superior in
architecture. Most people choose it because of successfully company
politics by Microchip. Openness being one important part.

/Ake

tsvetanusunov wrote:

> > Swedish company last week and they liked the LPC more then the
> > competition but selected the AVR ARM instead because of the same
> > reasons. And in that case we talk about a lot of pieces.
>
> I don't understand this, what are you telling us that Atmel opens
> their software specs? try to get from them the debug-write specs then!
> I don't belive if somebody picked chip X or Y the reason is for the
> open software programming specs.
> LPCs have their strong side - easy to learn, less features to confuse
> the beginner, smooth learning curve for peoples who move from 8-bits
> this in other hand is their weak side later on - too infantile
> peripherials, no DMA channels etc, SAM7S256(same price range as
> LPC2124) for instance have 11 DMA channels connected to every
> peripherial which relief the CPU from overhead waiting to read this
> or that peripheral, so I bet the Swedish company moved to Atmel due
> to other reasons than the programming specs.
> perhaphs the way Philips to go is to keep this high-runner entry
> series, but to introduce one more sophisticated serie which to keep
> to them the peoples who want some more power from the ARMs :) > Best regards
> Tsvetan
> ---
> PCB prototypes for $26 at http://run.to/pcb
> (http://www.olimex.com/pcb) <http://www.olimex.com/pcb%29>
> PCB any volume assembly (http://www.olimex.com/pcb/protoa.html)
> <http://www.olimex.com/pcb/protoa.html%29>
> Development boards for ARM, AVR, PIC, MAXQ2000 and MSP430
> (http://www.olimex.com/dev) <http://www.olimex.com/dev%29 >
> SPONSORED LINKS
> Microprocessor
> <http://groups.yahoo.com/gads?t=ms&k=Microprocessor&w1=Microprocessor&w2=Microcontrollers&w3=Pic+microcontrollers&c=3&sh&.sig=YXTZih-RJw5W96ETRMZhDQ>
> Microcontrollers
> <http://groups.yahoo.com/gads?t=ms&k=Microcontrollers&w1=Microprocessor&w2=Microcontrollers&w3=Pic+microcontrollers&c=3&sh&.sig-R787UQ86O4xFnkFUcUw>
> Pic microcontrollers
> <http://groups.yahoo.com/gads?t=ms&k=Pic+microcontrollers&w1=Microprocessor&w2=Microcontrollers&w3=Pic+microcontrollers&c=3&sh&.sig=kb_XlXirZUmIq6ZO0okS1g >
>
> >. >
>


--
---
Ake Hedman (YAP - Yet Another Programmer)
eurosource, Brattbergavägen 17, 820 50 LOS, Sweden
Phone: (46) 657 413430 Cellular: (46) 73 84 84 102
Company home: http://www.eurosource.se
Kryddor/Te/Kaffe: http://www.brattberg.com
Personal homepage: http://www.eurosource.se/akhe
Automated home: http://www.vscp.org


> > Swedish company last week and they liked the LPC more then the
> > competition but selected the AVR ARM instead because of the same
> > reasons. And in that case we talk about a lot of pieces.
>
> I don't understand this, what are you telling us that Atmel opens
> their software specs? try to get from them the debug-write specs then!
> I don't belive if somebody picked chip X or Y the reason is for the
> open software programming specs.

In Poland AVRs are No. 1/PICs No. 2 because informations about all "secret"
things are easy to find and programmers are really cheap.
"Start" price is the first argument for most users in my country.
Piotr



The 2024 Embedded Online Conference