I've written two little JTAG scripts to play with the NOR. Both
require fjmem.bin to be in the current directory.


1) dumplock

http://projects.qi-hardware.com/index.php/p/wernermisc/source/tree/master/m1rc3/norruption/2/dumplock

Dumps the state of the lock bit of the first 56 NOR blocks. A
value of 0x0000 means that the block is unlocked (i.e., can be
written without further ado), while a value of 0x0001 means that
the block is locked.

Using our current partitioning as shown here
http://www.milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One#Flash_Memory_Distribution
the first 55 blocks should be locked while the 56th block should
be unlocked. So running "dumplock" on a correctly locked M1rc3
will show 0x0001 for all but the last block.

An M1 that doesn't have these blocks locked can be fixed by
running Xiangfu's
https://raw.github.com/milkymist/scripts/master/scripts/reflash_m1.sh
with the --lock-flash option, i.e.,
./reflash_m1.sh --lock-flash


2) dumpotp

http://projects.qi-hardware.com/index.php/p/wernermisc/source/tree/master/m1rc3/norruption/2/dumpotp

This script dumps the content of the One-Time-Programmable (OTP)
memory in the NOR. This memory contains two regions of 64 bits
each. The first region is pre-programmed by the chip maker with
a unique and apparently randomized number.

The second region is initialized to 0xffff, can be changed in
the field, and then it can be locked against further changes.

We currently have no plans to use this information, but the
unique ID may be handy for identifying M1 boards after
production. E.g., to track a board's test and repair history.

Likewise, the user-settable OTP region could be used to store an
serial number or similar.

- Werner
_______________________________________________
http://lists.milkymist.org/listinfo.cgi/devel-milkymist.org
IRC: #milkymist@Freenode

Reply via email to