Steve Underwood wrote:
Hi Dipak,
Dipak Prasad wrote:
Hi
I was wondering if its possible to write data directly just to the
Information Memory flash location of the MSP. The basic idea is to
have a product, which has an ID stored at a given memory location (eg
0x1080), and to be able to change that ID (through a GUI) without
having to download the whole program in each and every time. I am
aware that I can serially send in the data to the MSP and then have
the software in the MSP write it to memory. I'm interested in
bypassing software and writing the data directly to the memory.
The JTAG port can pump data directly into flash without any support from
the CPU. Look at the app. note published by TI, or Chris's programming
code you will find in the serJTAGfirmware directory in CVS.
with separate hardware, if you use the PC it isnt that straight forward
as you cannot accuratly generate the flash clock. on the other side, you
can use existing tools:
(untested python code, using the new module in CVS/python/msp430, rather
hackish... i'll have to make a nicer API)
import msp430.jtag
msp430.jtag._parjtag.connect()
msp430.jtag._parjtag.memerase(msp430.jtag.ERASE_SEGMENT, 0x1080)
msp430.jtag._parjtag.memwrite(0x1080, "hello")
msp430.jtag._parjtag.release()
python's struct module helps making strings with binary numbers from
integers (wrinting a 32bit unsigned int little endian):
msp430.jtag._parjtag.memwrite(0x1080, struct.pack("<I", 0x12345678))
chris