This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Unique serial number persistence storage

Hello there,

I would like to have my device serial number be set over uart and stored persistently via the nrf52840's SRAM in a ROM fashion. Is this possible? If so, where could I store this information?

I would also like for this persistence to occur when the device is off, and when the device is programmed (i.e. erase all is selected via segger studio and then device is reprogrammed). Is there a way to change the memory space in the "Set Section Placement Macros" so that segger studio doesn't touch the memory address where I store said information?

Thank you,

Nick

Parents
  • Hi,

    Using the UICR is the best option here, but it will not be persistent across a full chip erase. That should not be a problem for an end product though since a full flash erases is typically not done after the device leaves the production line. You cannot write your own data to the FICR, so that is not an option.

  • Thank you so much for your response Einar. I asked this question to Bill above but I will ask you as well. For production line purposes, my company wants to be able to reprogram these for possible future firmware upgrades so there is a possibility that the device may be reprogrammed but we need the UCIR information to stay (unless manufacturing goes back in to change the UCIR information via uart). If I reprogrammed a device via segger studio, would this UCIR information be wiped out? If so, how could I change segger studio and skip this memory address during reprogramming?

  • Hi,

    Nicholas_Nuti said:
    For production line purposes, my company wants to be able to reprogram these for possible future firmware upgrades so there is a possibility that the device may be reprogrammed but we need the UCIR information to stay (unless manufacturing goes back in to change the UCIR information via uart).

    I see. It is possible to delete everything except the UICR, or delete just the relevant sectors before you reprogram, so that should not be a problem. You just need to make sure to test the setup you use for production (re)programming so that you know it does not accidentally erase the UICR.

    Nicholas_Nuti said:
    If I reprogrammed a device via segger studio, would this UCIR information be wiped out?

    The default configuration of SES will not do a full chip erase when you program from it. However,r doing a full chip erase from SES is possible, so it really depends on what you are doing in SES and how you have configured it. In any case, I assume you will not use SES from programming in the production line, but rather a script of some sort, so you should just need to make sure that the script you use for re-programming does not delete the UICR.

Reply
  • Hi,

    Nicholas_Nuti said:
    For production line purposes, my company wants to be able to reprogram these for possible future firmware upgrades so there is a possibility that the device may be reprogrammed but we need the UCIR information to stay (unless manufacturing goes back in to change the UCIR information via uart).

    I see. It is possible to delete everything except the UICR, or delete just the relevant sectors before you reprogram, so that should not be a problem. You just need to make sure to test the setup you use for production (re)programming so that you know it does not accidentally erase the UICR.

    Nicholas_Nuti said:
    If I reprogrammed a device via segger studio, would this UCIR information be wiped out?

    The default configuration of SES will not do a full chip erase when you program from it. However,r doing a full chip erase from SES is possible, so it really depends on what you are doing in SES and how you have configured it. In any case, I assume you will not use SES from programming in the production line, but rather a script of some sort, so you should just need to make sure that the script you use for re-programming does not delete the UICR.

Children
  • The UCIR regions seemed intact after reprogramming and chip reset.

    The default configuration of SES will not do a full chip erase when you program from it. However,r doing a full chip erase from SES is possible, so it really depends on what you are doing in SES and how you have configured it.

    That's good to know, thank you for the information.

    I did some testing with nrf command line programming tools and was successful. I can write to and read from UCIR regions with no problem and nothing happens to the information unless I purposefully run --eraseucir. I don't even think I need uart anymore. I plan on just making a script that runs nrfjprog commands to write to and read from ucir regions for manufacturing.

    Thanks Einar for your help.

Related