I put SN on page0 of nRF52832's flash, page0 is protected(page 0 only has sn data);
But SN will be lost sometimes;
PLS help, thanks!
I put SN on page0 of nRF52832's flash, page0 is protected(page 0 only has sn data);
But SN will be lost sometimes;
PLS help, thanks!
Hello,
I'm afraid we will need more information to understand how the data could become lost. E.g., when and how is the SN stored, number of bytes, at what flash address, is BPROT used to protect the region, etc?
After loading software to nRF52832, writing SN into 52832, I am sure SN is writen correctly, because I can read out correctly; The starting address is 0x68000, and the size of SN is 12 bytes. but after power is off and on many times, sometimes SN is lost.
And I don't use BPROT to protect the region, because it is nothing to do with DFU;
thanks
Are you writing the SN with the programmer, or is it written at runtime by the app? The UICR section should be well suited for storage of serial numbers. Can you try to store it at address 0x100010A0 and see if you get the same result?
visionwang said:And I don't use BPROT to protect the region, because it is nothing to do with DFU;
BPROT allows you to protect flash pages.
it occurs during mass production, The proportion is 1%,so it is hard to reappear ; writing SN by using barcode gun to scan two-bar codes on the device.
Do you use a programmer to set the SN in production, or is it written to flash by your application code? Also, on the failing unit, try to read out the whole flash page starting at 0x68000 and check if all bits are '1' or if some are set to '0'. The page is likely overwritten by application code if some are zero.
Reading flash with nrfjprog
nrfjprog --memrd 0x68000 --n 4096
SN is written to flash by application code; When SN is correct, data in page is correct,too; some of nrf52832 cann't be read because JLink don't know nrf52832, why?
Could you try to update your Jlink driver? v.5.12f is quite old, they are currently on version 6.46k: https://www.segger.com/downloads/jlink/#J-LinkSoftwareAndDocumentationPack
Could you try to update your Jlink driver? v.5.12f is quite old, they are currently on version 6.46k: https://www.segger.com/downloads/jlink/#J-LinkSoftwareAndDocumentationPack