• Content Count

  • Joined

  • Last visited

About amurices

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I found the issue! It was that the interrupt port from the second device wasn't connected. I had to add a Concat IPCore to enable interrupts from both devices, and now everything is dandy. Seems like the spi-xilinx.c driver counts on that pin to probe the device correctly.
  2. I'm trying to set up two AXI Quad SPI IPCores as Masters to use with Linux on my MicroZed. I've been using a single interface, which works fine, by taking the M_AXI_GP0 interface, connecting it to an AXI Interconnect, and using that to connect to the IPCore. However, with two or more IPCores, I don't know how to get this to work. The block design of my attempt is below. But it just doesn't work. The device tree nodes for both devices look identical (apart from their addresses and the fact that the second one has a disconnected interrupt pin (which doesn't do anything in my case)), but when I try to open the second device in Linux, it gives me the error spidev: Connection timed out. How should I do this? This question was also asked here:
  3. @morsucci I'm using Petalinux, yeah. The problem went away by (seemingly) magic, however, and brought another problem in its stead. I now can't set the SPI frequency via the ioctl() call. Currently working on that by digging into the spi-xilinx.c driver, putting up printk() calls everywhere. The only way I can calibrate frequency is via regenerating the design and exporting it to Petalinux via Vivado. And anything above 20MHz incurs in data loss. But I'll update the forum on anything I find!
  4. Hi guys @Enrico and @sbobrowicz, I ran into an extremely similar issue, only I'm using a PL SPI interface instead of the PS. I posted the question here. I wonder if either of you guys have any insight on what might be causing this. It seems the solution to my issue is different, as there's nothing unusual about my SS. SS_IN doesn't seem to be floating; its pin is always plugged to the correct pin in the SAMA. I've been stuck on this all week. Hope you guys have any ideas.
  5. Hi all, I'm having an issue with the FPGA SPI interface I programmed onto my microzed. The issue is that the interface cannot read the data sent back from my slave device! I'm using a SAMA5d3-xplained devboard, and an oscilloscope to measure signals. I made the SAMA return the same buffer it received, only with every byte shifted. So it's a semi-loopback routine. The oscilloscope captures both the correct signal back from the SAMA (every byte divided by 2), AND the signal going into it (out of the MicroZed). However, the spidev_test.c (that seemingly famous SPI testing utility on the torvalds repository ( program that I'm using shows one of two things: 1. Either the result is always an error of "SPI transfer timed out" 2. or the value in rx is the same as in tx. That is, even though the SAMA slave is demonstrably (via oscilloscope) returning something else, all the RX buffer gets is the same as was sent via the TX buffer. In fact, I can even disconnect the header that plugs the master to the slave, and this behavior becomes no different. The difference between these two results is simply a matter of removing the 1050th line in drivers/spi/spi.c when building the kernel. It's the call to wait_for_completion_timeout() in the function static int spi_transfer_one_message(struct spi_controller *ctlr, struct spi_message *msg). What I get from this is basically that the spi-xilinx.c driver does not know where to look for the output from the slave (MISO), and it either waits eternally for that output (if the call to wait_for_completion is left intact) OR it doesn't care to look for the data and just fills the rx buffer with the tx buffer. Now I have a very limited understanding of hardware and driver programming, so I'm basically like a blind man in the dark here. I'm adding printk() statements to spi-xilinx.c and spi.c everywhere, and checking their results with dmesg and there's just nothing enlightening (I'm using PetaLinux, and the devices all show up correctly in /dev and /sys). I'm hoping someone more experienced can shine a light on what I'm doing wrong here, or at least point me in the right direction. Attached is my device tree file, plus a screenshot of the hardware design. (the relevant node in the DT is highlighted below) amba_pl { #address-cells = <0x1>; #size-cells = <0x1>; compatible = "simple-bus"; ranges; [email protected] { bits-per-word = <0x8>; compatible = "xlnx,xps-spi-2.00.a"; clock-names = "axi_clk", "spi_clk"; clocks = <0x1 0xf>, <0x1 0xf>; fifo-size = <0x10>; interrupt-parent = <0x4>; interrupts = <0x0 0x1d 0x1>; num-cs = <0x1>; reg = <0x41e00000 0x10000>; xlnx,num-ss-bits = <0x1>; xlnx,spi-mode = <0x0>; [email protected] { compatible = "spidev"; reg = <0x0>; spi-max-frequency = <0x17d7840>; }; }; }; goodVersion1.dts