Pardon the hairball of info here but, I've been banging my head for 2 weeks now so maybe I can't see the forest for the trees...my problem is that I can't see MOSI data on the 6-pin J7 connector (Arduino/chipKIT Shield connector).
I have a Rev E. board and added a Quad-SPI IP in Vivado 2023. The QSPI s_axi_aclk and ext_spi_clk lines are connected to clk_out1 of the Clocking Wizzard at 100Mhz (via auto-connect). The QSPI's Frequency Ratio is set to 4:1 so, I think that means the QSPI is running at 25Mhz? I read the IP has a limit of 50Mhz.
I obtained Arty-S7-50-Master.xdc from Digilent's GitHub repo and in Vivado added it to Constraints in the block design. The only mods I made to it was to uncomment and modify the following:
I generated a test_bench.vhd for the block design using Xilinx TCL Store Design Utilities https://support.xilinx.com/s/article/64983?language=en_US . I was able to modify the generated testbench and toggle the QSPI's spi_io0_o (MOSI ) via the test bench in simulation, viewing it in PulseView using Saleae Logic analyzer. So, I thought I was good. I created a Vivado-maintained HDL wrapper, generated a bitstream, and exported the wrapper.
In Vitis I imported the hardware wrapper and tried both xspi_low_level_example.c and xspi_intr_example.c from Xilinx/Vitis/2023.1/data/embeddedsw/XilinxProcessorIPLib/drivers/spi_v4_10/examples. Both used loopback so, I removed that flag before running them. Both perform a XSpi_SelfTest() which was successful. When I run the examples, I can watch the SPI control and status registers update so, I know I'm talking to the hardware.
The closest I came to seeing MOSI data was (in desperation) creating a loop to write hundreds of bytes to the TX data register and I was finally able to see MOSI data in the analyzer although it wasn't the same bytes written to TX so, a problem for sure.
This was the short version of my failures. I can attach pictures of settings and provide further details upon request. I'm hoping that a SPI guru out there can push me in the right direction as I believe I've missed something basic.
Question
baywil
Pardon the hairball of info here but, I've been banging my head for 2 weeks now so maybe I can't see the forest for the trees...my problem is that I can't see MOSI data on the 6-pin J7 connector (Arduino/chipKIT Shield connector).
I have a Rev E. board and added a Quad-SPI IP in Vivado 2023. The QSPI s_axi_aclk and ext_spi_clk lines are connected to clk_out1 of the Clocking Wizzard at 100Mhz (via auto-connect). The QSPI's Frequency Ratio is set to 4:1 so, I think that means the QSPI is running at 25Mhz? I read the IP has a limit of 50Mhz.
I obtained Arty-S7-50-Master.xdc from Digilent's GitHub repo and in Vivado added it to Constraints in the block design. The only mods I made to it was to uncomment and modify the following:
set_property -dict { PACKAGE_PIN H16 IOSTANDARD LVCMOS33 } [get_ports { spi_ss_io }]; #IO_L22P_T3_A17_15 Sch=ck_io10_ss
set_property -dict { PACKAGE_PIN H17 IOSTANDARD LVCMOS33 } [get_ports { spi_io0_io }]; #IO_L22N_T3_A16_15 Sch=ck_io11_mosi
set_property -dict { PACKAGE_PIN K14 IOSTANDARD LVCMOS33 } [get_ports { spi_io1_io }]; #IO_L23P_T3_FOE_B_15 Sch=ck_io12_miso
set_property -dict { PACKAGE_PIN G16 IOSTANDARD LVCMOS33 } [get_ports { spi_sck_io }]; #IO_L14P_T2_SRCC_15 Sch=ck_io13_sck
I generated a test_bench.vhd for the block design using Xilinx TCL Store Design Utilities https://support.xilinx.com/s/article/64983?language=en_US . I was able to modify the generated testbench and toggle the QSPI's spi_io0_o (MOSI ) via the test bench in simulation, viewing it in PulseView using Saleae Logic analyzer. So, I thought I was good. I created a Vivado-maintained HDL wrapper, generated a bitstream, and exported the wrapper.
In Vitis I imported the hardware wrapper and tried both xspi_low_level_example.c and xspi_intr_example.c from Xilinx/Vitis/2023.1/data/embeddedsw/XilinxProcessorIPLib/drivers/spi_v4_10/examples. Both used loopback so, I removed that flag before running them. Both perform a XSpi_SelfTest() which was successful. When I run the examples, I can watch the SPI control and status registers update so, I know I'm talking to the hardware.
The closest I came to seeing MOSI data was (in desperation) creating a loop to write hundreds of bytes to the TX data register and I was finally able to see MOSI data in the analyzer although it wasn't the same bytes written to TX so, a problem for sure.
This was the short version of my failures. I can attach pictures of settings and provide further details upon request. I'm hoping that a SPI guru out there can push me in the right direction as I believe I've missed something basic.
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now