Example: Program the I/O for SPI 0 on to MIO Pins 16 to 21 - Example: Program the I/O for SPI 0 on to MIO Pins 16 to 21 - 1.15 English - UG585

Zynq 7000 SoC Technical Reference Manual (UG585)

Document_ID
UG585
Release_Date
2026-02-06
Version
1.15 English
This example enables Master SPI 0 onto pins 16 to 21 using up to three slave selects.
  1. Configure MIO pin 16 for clock output. Write 0x0000_22A0 to the slcr.MIO_PIN_16 register.
    1. Route SPI 0 clock to pin 16.
    2. Enable output, [TRI_ENABLE] = 0.
    3. LVCMOS18: [IO_TYPE] = 001
    4. Slow CMOS drive edge.
    5. Disable internal pull-up resistor.
    6. Disable HSTL receiver.
  2. Configure MIO pins 17 for MISO input. Write 0x0000_02A0 to each of the slcr.MIO_PIN_17 register.
    1. Route SPI 0 MISO to pin 17.
    2. Disable output. [TRI_ENABLE] = 1.
    3. LVCMOS18: [IO_TYPE] = 001.
    4. Slow CMOS drive edge.
    5. Disable internal pull-up resistor.
    6. Disable HSTL receiver.
  3. Configure MIO pin 18, 19 and/or 20 for Slave Select outputs. Write 0x0000_32A0 to the slcr.MIO_PIN_18, 19 and/or 20 registers. The internal pull-up is enabled.
    1. Route SPI 0 slave selects signal(s) to pins 18, 19 and/or 20. Any and all of the slave selects can be activated for master mode. In slave mode, SS 0 must be used.
    2. 3-state controlled by SPI: [TRI_ENABLE] = 0.
    3. LVCMOS18: [IO_TYPE] = 001.
    4. Slow CMOS drive edge.
    5. Enable internal pull-up resistor.
    6. Disable HSTL receiver.
  4. Configure MIO pins 21 for MOSI. Write 0x0000_22A0 to each of the slcr.MIO_PIN_21 register:
    1. Route SPI 0 MOSI to pin 21.
    2. 3-state controlled by SPI [TRI_ENABLE] = 0.
    3. LVCMOS18: [IO_TYPE] = 001.
    4. Slow CMOS drive edge.
    5. Disable internal pull-up resistor.
    6. Disable HSTL receiver.