On 2015, Apr 28, at 6:22 PM, Myron King <mir...@gmail.com> wrote:Hello All,I'm trying to read/write an SPI slave interface in the FPGA fabric with the SPI0 IO peripheral on the PS7 using EMIO. I have tested the SPI interface in Bluesim and am relatively confident that it works. I have been trying to connect it to the PS7 for a while now and have so far not been successful in getting getting a clock signal. I have a simple test (tests/test_spi0) which opens /dev/spidev2.0 (the device created by the Xilinx SPI kernel module) and writes a few words without reporting any errors.Page 555 of the TRM shows how to connect the EMIO signals in the FPGA fabric. When I initiate a transaction from the SW, I can see that the SCLKTN and MOTN signals are de-asserted. The problem is that I cannot see any activity on the corresponding SCLKO and MO signals. Because I am implementing only the slave functionality, these signals are being used directly without routing them through a tri-state buffer. Is this a mistake?
There is also the question of the clock configuration itself. Language on page 548 the TRM states that the SPI_Ref_Clk must be set to a higher frequency than the CPU_1x clock. Reading the SPI_CLK_CTRL register, I can see that the reference clock source is set to 'IO PLL', the clock divisor is '63', and that the SPI 0 reference clock is enabled. Reading the APER_CLK_CTRL register, I can see that the SPI0_CPU_1XCLKACT field is enabled, I suppose if this weren't enabled I couldn't read any of SPI0's control registers... Finally, the baud-rate divisor in the register at offset '0' in the SPI peripheral ((SPI) Config_reg0) is set to '000' (not supported, which I assume means that it is not used). How do I determine the frequencies of the IO PLL and CPU_1x?? If I knew these, I could figure out what the SPI0 clock should be (if I could detect it...).
any suggestions would be greatly appreciated
thanks--Myron--
You received this message because you are subscribed to the Google Groups "connectal" group.
To unsubscribe from this group and stop receiving emails from it, send an email to connectal+...@googlegroups.com.
To post to this group, send email to conn...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On 2015, Apr 28, at 6:22 PM, Myron King <mir...@gmail.com> wrote:Hello All,I'm trying to read/write an SPI slave interface in the FPGA fabric with the SPI0 IO peripheral on the PS7 using EMIO. I have tested the SPI interface in Bluesim and am relatively confident that it works. I have been trying to connect it to the PS7 for a while now and have so far not been successful in getting getting a clock signal. I have a simple test (tests/test_spi0) which opens /dev/spidev2.0 (the device created by the Xilinx SPI kernel module) and writes a few words without reporting any errors.Page 555 of the TRM shows how to connect the EMIO signals in the FPGA fabric. When I initiate a transaction from the SW, I can see that the SCLKTN and MOTN signals are de-asserted. The problem is that I cannot see any activity on the corresponding SCLKO and MO signals. Because I am implementing only the slave functionality, these signals are being used directly without routing them through a tri-state buffer. Is this a mistake?Maybe. The PS7 I2C, which is a different thing, I know, has SDAO and SCLO just tied low, and drives the actual data on SDATN and SCLTN - it is set up for external resistive pullup, with the wires driven low but left in high impedance for high. Are the TN signals toggling or just static low? The TRM says the SPI has a multi-master mode, but I would guess that the TN’s only switchwhen changing masters, not between bits. It seems more likely that the clock isn’t running.
While debugging the I2C stuff, I wound up using bluescopeeventpio to get traces, it is possiblethat might be useful for you as well, see examples/fmcomms1
Hi Larry,thankssomuch! comments/questions inlined below:On Tue, Apr 28, 2015 at 8:28 PM, Lawrence Stewart <lste...@gmail.com> wrote:On 2015, Apr 28, at 6:22 PM, Myron King <mir...@gmail.com> wrote:Hello All,I'm trying to read/write an SPI slave interface in the FPGA fabric with the SPI0 IO peripheral on the PS7 using EMIO. I have tested the SPI interface in Bluesim and am relatively confident that it works. I have been trying to connect it to the PS7 for a while now and have so far not been successful in getting getting a clock signal. I have a simple test (tests/test_spi0) which opens /dev/spidev2.0 (the device created by the Xilinx SPI kernel module) and writes a few words without reporting any errors.Page 555 of the TRM shows how to connect the EMIO signals in the FPGA fabric. When I initiate a transaction from the SW, I can see that the SCLKTN and MOTN signals are de-asserted. The problem is that I cannot see any activity on the corresponding SCLKO and MO signals. Because I am implementing only the slave functionality, these signals are being used directly without routing them through a tri-state buffer. Is this a mistake?Maybe. The PS7 I2C, which is a different thing, I know, has SDAO and SCLO just tied low, and drives the actual data on SDATN and SCLTN - it is set up for external resistive pullup, with the wires driven low but left in high impedance for high. Are the TN signals toggling or just static low? The TRM says the SPI has a multi-master mode, but I would guess that the TN’s only switchwhen changing masters, not between bits. It seems more likely that the clock isn’t running.I don't completely understand what you are saying about I2C. does this mean that to transmit '0', the SDA line is actively driven low, but that to transmit '1', it is not actively driven at all, relying instead on an external source to pull it high?