[solved] Need help with RV901T as MESA 7i90: SPI isn't working

More
2 years 7 months ago #296653 by ago_tm
Hello,

I prepared the bitstream under Xilinx ISE 14.7 according to the changes described in github.com/q3k/chubby75/issues/85#issuecomment-1105762488 . Here are the changes compared to basic hostmot2 for 7i90 from MESA site:  github.com/golyakoff/hostmot2-rv901t-7i9...abf87a09ed5a3145c7d2 .
I could flash the RV901 directly via JTAG from ISE iMPACT with the generic 72 GPIO bitstream.

But I could not connect to the device from Raspberry using SPI0:

Raspberry PI with Debian 12 from linuxcnc:
Linux pi-cnc 6.1.77-rt24-v8-ago #1 SMP PREEMPT_RT Sat Mar 16 18:05:52 MSK 2024 aarch64 GNU/Linux

In boot/broadcom/config.txt I enabled SPI0 with custom CE/CS pin:
dtparam=spi=on
dtoverlay=spi0-1cs,cs0_pin=22

When running the command
ago@pi-cnc:~$ sudo mesaflash --device 7i90 --spi --addr /dev/spidev0.0 --readhmid

Is see:
unable to set bpw32, fallback to bpw8
Unexpected cookie at 0100..0110:
00000000 00000000 00000000

On the logic analyzer I see the following error:
The initial (idle) state of the CLK line does not match the settings (see attachments)

I used the short enough SPI cable (~50-70mm)

Could you please advise?

Please Log in or Create an account to join the conversation.

More
2 years 7 months ago #296655 by cakeslob
you seem to know what your doing, but any reason you are using an alternate pin for the SPI cs?

Please Log in or Create an account to join the conversation.

More
2 years 7 months ago #296656 by ago_tm

you seem to know what your doing, but any reason you are using an alternate pin for the
SPI cs?
​

Hello, I just selected the closest in a row to avoid double-row pins. this GPIO is general purpose as I understand.

Please Log in or Create an account to join the conversation.

More
2 years 7 months ago #296662 by cakeslob
yeah, i mean, it should work

but since its not working, possibly eliminate that as a variable first just to be sure?
The following user(s) said Thank You: Cant do this anymore bye all, ago_tm

Please Log in or Create an account to join the conversation.

More
2 years 7 months ago #296670 by Cant do this anymore bye all
Old mate is right, it'll work fine using the standard SPI pinout on the RPi4 (don't try a Rpi5). I've played around with this board a bit using SPI, EPP and with modded SSerial code and used it as a smart serial device.

I found the best way to achieve 3.3v to 5v translation is to replace all the buffers on the non commoned lines with SN74CBT3245 and power the board with 4.2v. Tho on the "outside world side" the signal will need pulling up to 5v via a resistor.

Please Log in or Create an account to join the conversation.

More
2 years 7 months ago #296681 by ago_tm
You are right, thanks!

I'll give a try to standard pinout of SPI0 today and as a second attempt SPI1 (I am not sure, but just see that SPI0 isn't a popular solution for some reasons).

Thanks, I will keep you in touch!

Please Log in or Create an account to join the conversation.

Moderators: PCW, jmelson
Time to create page: 0.096 seconds
Powered by Kunena Forum