Cannot access the PS registers to disable PCAP_pr

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.

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 :slight_smile:

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

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

1 Like

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

2 Likes