There are three types of pins in the RPI Zero 40 pin header.

  • Ground. The ground pins should always be connected.
  • Signal. Generally going from RPi -> FPGA.
  • Power. This is the tricky one.

Signal

The default state for all Bank 0 pins will be inputs with either a pull up or pull down. The default pull state can be found in the BCM2835 peripherals specificaion section 6.2 table 6-31 (see the "Pull" column). It will require positive software configuration to change the state of these pins.

If they have pull up or pull down resistors, there is no metastability, there is no problem.

The one exception to this rule is ID_SC and ID_SD. GPIO0 (ID_SD) and GPIO1 (ID_SC) will be switched to ALT0 (I2C-0) mode and probed for an EEPROM at boot time. These pins will revert to inputs once the probe sequence has completed.

Here is the problem. They expect a signal, We need to set a weak pull up or pull down resiston on the FPGA. Which one? And then disable it once the system starts operating it.

Power

The simplet solution is to always cut the power pins, but leave the ground pins in place. Then power up the IcePi Zero first, then the Raspberry Pi. Power down the Raspberry Pi, then the IcePi Zero. The reason is that the ICEPi is receiving signals, and the RPI zero has pull up down resistors, so everything shoudl be stable.

The one problem is on pins that are used for eeprom configuration, but this command solves that.

force_eeprom_read=0

It would be nice to have just one usb cable plugged in.

Since I will have the FPGA USB plugged in for downloading bitstreams, at least that one has to be connected.

And realistically I will also be adjusting things on the RPI, so I need that usb cable plugged in also. So no need to worry about how to do a single power supply until much later in this project.

Be Careful

But GPIO1, pin 28 does not have a pull up nor down resistor, so best to set all of the pins as high impedance until there is a pll lock on the pixel clock.

Table of altenative functions

Thank you very much for the people on Discord who raised this topic.


Built with the Forest WIki.
User contributed content is licensed under a Creative Commons CC By 4.0 License.