# Cannot access the PS registers to disable PCAP\_pr

**URL:** <https://discuss.pynq.io/t/cannot-access-the-ps-registers-to-disable-pcap-pr/4368>\
**Category:** Support\
**Created:** [June 20, 2022, 9:55am UTC](https://discuss.pynq.io/t/cannot-access-the-ps-registers-to-disable-pcap-pr/4368 "2022-06-20T09:55:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![imharish63](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/imharish63/32/3323_2.png) [@imharish63](https://discuss.pynq.io/u/imharish63)\
**Post date:** [June 20, 2022, 9:55am UTC](https://discuss.pynq.io/t/cannot-access-the-ps-registers-to-disable-pcap-pr/4368/1 "2022-06-20T09:55:53Z")

</div>

I am using ZCU104 board with pynq img 2.6.0.

I am using the design in the link here [KeyError : "gpio" while loading overlay](https://discuss.pynq.io/t/keyerror-gpio-while-loading-overlay/4336).

hwh and bit files are present there.

i am trying to access the registers of PS with following code but kernel doesn’t output anything. in case, i try to change the bit 0 of pcap reg , kernel trows error.  
code 🙂

from pynq import Overlay  
from pynq import registers  
ol = Overlay(“design\_1\_wrapper.bit”)  
BASE\_ADDRESS = 0xFFCA3008  
dev\_cfg\_ctrl = registers.Register(BASE\_ADDRESS)  
print(“the value of PCAP\_PR is :”,dev\_cfg\_ctrl[0])

kind Regards,  
Harish

---

<div class="post-metadata">

**Author:** ![stf](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/stf/32/2724_2.png) [@stf](https://discuss.pynq.io/u/stf)\
**Post date:** [June 20, 2022, 12:58pm UTC](https://discuss.pynq.io/t/cannot-access-the-ps-registers-to-disable-pcap-pr/4368/2 "2022-06-20T12:58:26Z")

</div>

Hi Harish,

For those registers, I believe you need to enable access to the System Level Control Registers (SLCR) in the bitstream in the PS configuration. For Zynq 7000 devices there used to be a little box that you could tick in the PS configuration of the block diagram. Unfortunately, I’m not sure how to do this for an MPSoC system, but I suspect you might have to set something in the Isolation Configuration menu to enable non-secure access to the address space.

This question is more about Zynq in general rather than something specific to PYNQ, so you might have more luck asking on the Xilinx forums.

I hope this helps a little; sorry I couldn’t be of more help.

All the best,  
Shane

---

<div class="post-metadata">

**Author:** ![imharish63](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/imharish63/32/3323_2.png) [@imharish63](https://discuss.pynq.io/u/imharish63)\
**Post date:** [June 23, 2022, 3:31pm UTC](https://discuss.pynq.io/t/cannot-access-the-ps-registers-to-disable-pcap-pr/4368/3 "2022-06-23T15:31:05Z")

</div>

Dear @stf,

I found a way to access the ps register using following code:

from pynq import registers  
BASE\_ADDRESS = 0xFFCA3008  
dev\_ctrl = allocate(shape=(1,), dtype=‘u4’)  
dev\_cfg\_cntrl = registers.Register(BASE\_ADDRESS, buffer=dev\_ctrl)

kind regards,  
Harish
