Hi,

With the current (git master) version of OpenOCD, it seems that
flashing nRF52’s UICR is not always possible.

It looks like the nrf5.c (which is common for nRF51 & nRF52) is using
the same code and checks FICR PPFC register to test whether UICR flash
memory is protected whatever the Nordic implementation.

FICR.PPFC is officially deprecated in favor of UICR.APPROTECT register
on nRF52 (see 
http://infocenter.nordicsemi.com/pdf/nRF52_Series_Migration_v1.0.pdf,
page 9) and the test logic is somewhat inverted:
 * nRF51: FICR.PPFC should be 0x00 to obtain access to ERASEUICR
 * nRF52: APPROTECT should be equal to 0xFF to obtain access to ERASEUICR

Something like https://github.com/eblot/openocd/commit/1be1f7ff seems
to enable flashing, although there might be a better way to deal with
nRF51/nRF52 variants.

Best Regards,
Manu

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to