[ABANDONED] Reading out Unique Identifier of MCU using JTAG

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [ABANDONED] Reading out Unique Identifier of MCU using JTAG

    The MCU I am using has a 128-bit unique identifier, which I would like to read out during production programming. Unfortunately the UID is not mapped into the normal memory space. My initial idea was to make a Flash Loader (ramcode/applet) to read out the UID, but I am not quite clear on how to do this because the write-function is mandatory, but writing to the UID area is of course not possible.

    Also, as explained in my other thread:
    forum.segger.com/index.php/Thr…for-SAM4E-user-signature/
    reading using JLink Commander does not seem to work unless an erase/write was performed first (seems the ramcode/applet is not loaded by read).

    I would like to use JLink Commander to read out the UID. Any suggestions on how to do this with a ramcode/applet (i.e. is it possible to load the ramcode/applet and use it for read)?

    An alternative approach could be to write a small piece of code that can be loaded into RAM using loadfile, then executed with setPC and go, and the code would copy the UID to a known (RAM) memory location, allowing it to be read out using mem or savebin commands. Any pointers for how to proceed with this approach are very welcome, as this is uncharted territory for me.

    If anyone can come up with a different approach to reading out the UID usind a command line tool on Windows, I am happy to hear your suggestion. I would prefer to read this out using JTAG only, not the UART or similar.

    As a side note, I spent a decent amount of time looking into customizing Atmels SAM-BA 2.18, as that supports reading out the UID. Unfortunately whan using SAM-BA with JLink, the JLink device selector pops up (actually 3 times), so using from a script/command line is not practical.

    Best regards,
    Mikkel Holm Olsen