UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

取消
显示结果 
搜索替代 
您的意思是: 
Highlighted
Adventurer
Adventurer
89 次查看
注册日期: ‎12-21-2012

怎样读写CPU寄存器?

我需要远程重启zynq,希望通过写两个寄存器实现:SLCR_UNLOCK(0XF8000008) 写0xDF0D,PSS_RST_CTRL(0xF8000200)写1 。

我通过/dev/mem映射内存地址后写这两个寄存器地址,但是zynq没有重启。SLCR_UNLOCK是个只写寄存器,所以我不能读它来确定是不是写对了。但是相同的方法读写PL寄存器都没有问题。

请教各位,访问CPU寄存器的正确姿势是什么?

------

我在debian下,所以不能用Xil_Out32()。

0 项奖励
1 条回复1
Xilinx Employee
Xilinx Employee
69 次查看
注册日期: ‎03-27-2013

回复: 怎样读写CPU寄存器?

解lock操作可以通过查看SLCR_LOCKSTA( 0xF800000C)的状态,来确定操作是否成功的。

 

Best Regards,
Jason
-----------------------------------------------------------------------------------------------
Please mark the Answer as "Accept as solution" if the information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
-----------------------------------------------------------------------------------------------
0 项奖励