can't access gpio register values of nRF52832 via black magic debugger.

I am using nRF connect SDK and wanted to examine gpio 'out' register during the debugging session but every time I try to print the register value, I get the following error:

my initial assumption is there is a memory read protection enabled somewhere, does anyone know how?

I made a variable store the value of the 'APPROTECT' register and printed the value of that variable and it was '0xffffffff' which means according to the datasheet, access port protection is disabled. I don't know what else shall I do. 

EDIT: I tried to print the value of the register 'APPROTECT' directly from the terminal and it printed successfully, however, I tried to store the value of the 'out' register of the gpio peripheral and access it via the debugger but got the same error 'cannot access memory at address 0x50000510'

Related