I bought a couple of nrf51822 but their flash seem to be locked. See the log below:
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Info : only one transport option; autoselect 'swd'
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : BCM2835 SPI SWD driver
Info : SWD only mode enabled
Info : clock speed 31200 kHz
Info : SWD DPIDR 0x0bb11477
Error: Could not find MEM-AP to control the core <--- locked flash
Info : Listening on port 3333 for gdb connections
Notes:
- I am using OpenOCD-spi on a Raspberry-pi
- The chip seems to get identified correctly
- I tried setting the unlocking registers for a nrf52 but it didn't work.
How can I unlock it?
Download the cmdline tools from https://www.segger.com/downloads/jlink/#J-LinkSoftwareAndDocumentationPack
if using windows
this wont unlock it but it will give you insight