Reading NVM memory of unprogrammed HCS12

Showing results for 
Search instead for 
Did you mean: 

Reading NVM memory of unprogrammed HCS12

Contributor II

Hi all,


We want to read some NVM memory of an unprogrammed HCS12-based device (MM912J637).


We want to read the 64-bit unique ID (UID) that resides at global address 0x0_4000 (the bottom of PPAGE=1) before programming so barcode labels can be printed prior to programming and production testing.


We have found that we can see the UID if we run the following set of Hiwave debugger commands:

wb 0x15 1                 // set PPAGE=1

<single step or run code> // need to do this in order to refresh the paged memory view

db 0x8000..0x800F         // dump the UID


Having to single step or run code, our middle step, may be a problem when the device is not programmed.


Is there a another way of refreshing the paged memory view without having to run (the non-existent code).


Or will it be safe and controlled to single step (or run and stop) an erased device?  What instruction is an op-code of 0xFF? (Hopefully we would still get the required refresh of the the paged view and so allow us to capture the UID.)


We want to be able to do this all from within a command file and use the "log to file" capability to allow external software (Python script maybe) to trigger the process and capture and format the UID and send it to the production label printer.


(We may need to add a "stop" call in the seqeuence above if the single step process fails and the "code" keep running (as seemed to happen in our initial testing; but this was on a programmed device).)


Many thanks for any ideas.




Labels (1)
0 Kudos
1 Reply

NXP Employee
NXP Employee

Hello Ian,

You want to read a part of memory without loaded application on device.

To do that you're using the debugger:

      - launch debugger,

      - connect to the device,

      - in the command change the PPAGE and read memory between 0x8000 to 0x800F.

Am I right ?

I don't know if there is another way to do that but you can execute it in command line too.

With a .bat file for instance you can:

      - launch debugger,

      - change PPAGE,

      - read memory and put it in log file.

Is it the process you're looking for ?

Have a great day,
Pascal Irrle

Note: If this post answers your question, please click the Correct Answer button. Thank you!

0 Kudos