Where to store serial numbers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Where to store serial numbers.

2,307 Views
kbu
Contributor I
I need to store static serial numbers, channel and frequency preferences in flash, for a production run of a GT60(MC13213) device.

What is the best location in memory to store this? Considering this is going to be a max of 10 or 15 bytes I don't quite know if I need to write/dedicate a whole page.

Right now I think I'll use manually edited S19 files to increment the serial numbers (yes I've seen PEmicros serialize, i'll need to further edit the info in there for some of the other data elements so ends up beign twice the work)

Any Suggestions?
Labels (1)
0 Kudos
4 Replies

560 Views
bigmac
Specialist III
Hello,
 
Perhaps you could store the static data in the top flash page, below $FFB0, sharing with the interrupt vectors, etc.  It would also mean that this data would be protected when flash block protection was implemented.
 
Regards,
Mac
 
0 Kudos

560 Views
kbu
Contributor I
okay I'm a little confused about reading and writing serial numbers in to a GT60 device:

I have a srecord line which contains my serial number and some data:
S113FDF0000000013C0200000000000000000000C0


I manually created this line and put it into a S19 file from my application. The first time it writes this data just fine but if I recompile the application and reporgram the device, the data previously in FDF0 dissapears, I guess true-time mass erases everything before programming the device.

How can I store this custom data in my devices, along with my application? I need to do this for 100 or so devices. I've seen the serialize application from PE micro but it doesn't seem to create a S19 record, just something of its own format. and I don't think I'll be buying any addition hardware (cyclone pro) anytime soon.
0 Kudos

560 Views
Alban
Senior Contributor II
Kbu,
 
Mass erase is compulsory as soon as the device is secured or any page protected.
Debugger will normally erase the device fully. As it states when it does it.
 
What I advise, not buying anything, is to write a PERL script (or any other text manipulation) which will change the S19 between each Flash programming.
 
Either you call the PERL script from a PostSomething.cmd in the debugger.
Or you call the debugger to program from you PERL script for even more automation.
 
Cheers,
Alban.
0 Kudos

560 Views
peg
Senior Contributor IV
Hi kbu,
 
I'm not sure there is a "correct" place, but I put my serial numbers at $FDF0
This is the top 16 bytes of the second last page.
This way I'm very high and out of the way, but not so high as to be in the vector/non-volatile register page.
Seems as good a place as any to me.
BTW, you only need to dedicate a whole page if you are likely to want to change them with out re-loading all the code (or the rest of the page).
 
Regards
Peg
 
0 Kudos