Open mattvenn opened 4 years ago
see test-spi-clk-in branch for an example.
tying raspi pins together with a direct short doesn't seem to work. but soldering a header on, and using a jumper does. This was tested on 2 boards. so before fixing this on the board need to understand what is happening.
Hello, nice work with this repo. I think I didn't quite understand your comments. If the ECP5 is configured in Slave SPI mode (thus, the configuration SPI clock pin should be an input) it is not possible to reuse all the SPI pins after the ECP5 is configured, that is, in user mode? I'm designing a board where the ECP5 is connected to a microcontroller via SPI and the microcontroller is the master. The objective is to use the same SPI bus to:
From your experience, is it possible?
I'm sorry I can't remember. Reading my comment I think the limitation is the pin can't be used as an input. I would advise you to test before doing a board layout.
thanks for the reply
The ecp5 spi clock pin is used for configuration (reading SPI flash or being an SPI peripheral) and is detailed in TN1260 pdf. The SPI clock pin is on ball N9, but this can't be used in the constraints file.
After configuration it can work as an output using the USRMCLK primitive:
It seems it can't be used as an input. It might work with the FPGA setup as SPI peripheral: sysconfig = 001.
The board sets sysconfig to 010 as SPI controller. This is done with RN1.
workaround is to use the shared connection between raspberry pi gpio6 (pin 31) and fpga ball t6. Bridge pi gpio6 to spiclk (gpio11). Make sure that gpio6 is set to an input on the pi:
gpio -g mode 6 in