I am able to flash/program nrf51822 with openOCD on Raspberry-pi and STLink-v2
but when I invoke Open On-Chip Debugger on telnet to write on UICR register, it don't give error but when I read it back, i don't see any change in register value.
Open On-Chip Debugger
nrf51822.cpu mww 0x10001088 0x00000101
nrf51822.cpu mdw 0x10001088 0x10001088 ffffffff ....
After that I used nrfjprog on PC, with same board I was able to update UICR register
C:\Users\hh>nrfjprog --memwr 0x10001088 --val 0xFFFFFF11 Parsing parameters. Writing.
C:\Users\hh>nrfjprog --memrd 0x10001088 0x10001088: FFFFFF11 |....|
Does I have missed anything.