Open petterreinholdtsen opened 1 year ago
Correct. This should work and you should see led blinking in a circle - 3 leds are on while one gets turned off in a clockwise rotation.
I will check if it is a software issue by reproducing the steps after apt update tomorrow. Will get back on this.
I just retried the steps from scratch and it works. If not a hardware issue this might be some GPIO conflict. Are you sure there are no preinstalled applications attempting to access GPIOs etc.
Here are the package versions (just updated to the latest bullseye state) my test worked with:
yosys 0.9-1+b2
fpga-icestorm 0~20190913git0ec00d8-2
fpga-icestorm-chipdb 0~20190913git0ec00d8-2
arachne-pnr 0.1+20190728gitc40fb22-2
arachne-pnr-chipdb 0.1+20190728gitc40fb22-2
flashrom 1.2-5
[lightside-instruments]
I just retried the steps from scratch and it works. If not a hardware issue this might be some GPIO conflict. Are you sure there are no preinstalled applications attempting to access GPIOs etc.
Not sure at all. The machine also have a pyjuice board connected for power. Perhaps the two are in each others hair? Will try without the pyjuice board.
-- Happy hacking Petter Reinholdtsen
pijuice uses only i2c pins so probably not the issue but do try without it in case there is some wierd powersupply correlation.
obviously the SPI connection and programming works since the verification is OK
If you see the LEDs changing intensity then then obviously they are driven from the FPGA ... so the question is why it stops.
The LEDs should turn on only when programming is finished and the iCE_CREST (pin 18) is released low to high transition. You could see very low intensity glow before programming is finished when the iCE_CREST is held down due to weak pullups.
One suggestion:
diff --git a/example/ice4pi_prog b/example/ice4pi_prog
index c747db8..81f4aaa 100755
--- a/example/ice4pi_prog
+++ b/example/ice4pi_prog
@@ -1,5 +1,5 @@
#!/bin/bash
-echo 24 > /sys/class/gpio/export
+echo 24 > /sys/class/gpio/export || true
echo out > /sys/class/gpio/gpio24/direction
echo 1 >/sys/class/gpio/gpio24/value
sleep 1
@@ -10,6 +10,5 @@ dd if=${1} conv=notrunc of=image
flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=20000 -w image
#workaround first time fails after initial programming
flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=20000 -w image
-echo in > /sys/class/gpio/gpio24/direction
-echo 24 > /sys/class/gpio/unexport
+echo 1 >/sys/class/gpio/gpio24/value
[lightside-instruments]
One suggestion:
I tested removing the pijuice hat without any changes. The lights turn on during flashing, but go dark once the flashing is done.
Tried your patch for ice4pi_prog, but it did not have any effect on the light blinking
No clue what is wrong here.
One interesting thing is that the flashing claim the chip content is identical to the requested image, even after I modified the .v file slightly (changed the value used to compare to the divider by one). I expected this to create a different image for the flashing, but do not really know what I am doing.
-- Happy hacking Petter Reinholdtsen
One interesting thing is that the flashing claim the chip content is identical to the requested image, even after I modified the .v file slightly (changed the value used to compare to the divider by one). I expected this to create a different image for the flashing
this is a good clue ... the "make" command (default target with no parameter) should generate a new rot.bin file corresponding to your changes in rot.v
the "sudo make load" should pad with zeroes this file up to 4 MB and create a file called "image" then try to program it with "flashrom ... image"
The only way to get the message is to have identical image files in consecutive calls to flashrom. Can you doublecheck that "rot.bin" and "image" are sane.
It would be useful if the README in the example directory explain what the behaviour of the example should be. I guess it should blink the LEDs on the top of the board, but am unsure as I do not get anything like that when compiling and loading the example. This is the terminal output I get: