简体   繁体   English

petalinux问题在zynq上重置为逻辑

[英]petalinux issue reset to logic on zynq

I've been developing a system on a Zynq chip using Petalinux. 我一直在使用Petalinux在Zynq芯片上开发系统。 One thing that has remained a mystery to me is a means to issue a reset to the logic side of the chip from petalinux. 对我来说仍然是一个谜,这是一种从petalinux向芯片的逻辑端发出复位信号的方法。 In Vivado, when a memory mapped peripheral is added, a processor reset module is automatically inserted, and the reset is connected to the FCLK_ARESETx_N pin. 在Vivado中,添加了存储器映射的外围设备后,会自动插入处理器复位模块,并将复位连接到FCLK_ARESETx_N引脚。 Is there a way to drive this reset from user-space? 有没有办法从用户空间驱动此重置? I can happily control a logic reset from a memory mapped module but I've been curious about this. 我可以从内存映射模块中愉快地控制逻辑复位,但是对此我感到很好奇。

There used to be a sysfs interface in slcr.c for exactly this purpose but it was removed in this commit . 正是出于这个目的, slcr.c中曾经有一个sysfs接口,但在此commit中已将其删除。 The reason for removal was because "reset controls for peripherals should never be used, since device drivers control the peripherals"... 删除的原因是因为“永远不要使用对外围设备的重置控件,因为设备驱动程序会控制外围设备”。

At the time you could assert the FCLK_ARESETx_N signal by writing 1 to /sys/class/xslcr_reset/fpgax_out/reset . 那时,您可以通过向/sys/class/xslcr_reset/fpgax_out/reset写入1来断言FCLK_ARESETx_N信号。

If you still want to use the reset signals from userspace, you can talk to the SLCR registers manually using the devmem command (or mmap , etc.). 如果仍要使用来自用户空间的复位信号,则可以使用devmem命令(或mmap等)手动与SLCR寄存器devmem For me, the appropriate register is at 0xf8000240. 对我而言,适当的寄存器位于0xf8000240。 This comes from... 来自...

  • SLCR base address from the .dts is 0xf8000000 .dts中的SLCR基址为0xf8000000
  • offset for FPGA resets from slcr.c is 0x240 从slcr.c进行FPGA复位的偏移量为0x240

the nth bit will control the nth reset signal. 第n位将控制第n个复位信号。 To reset on all lines from userspace, use: 要重置用户空间中的所有行,请使用:

devmem 0xf8000240 32 0xf #Raise reset
devmem 0xf8000240 32 0x0 #Lower reset

Hope this helps! 希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM