Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

The phyBOARD-Zeta kit includes an expansion board (PEB-D-RPI) designed to facilitate the easy evaluation of certain interfaces available on PHYTEC i.MX7 platforms. The

...

following sections will detail how to use these features in the environments in which they are supported. These instructions assume that you have properly connected the expansion board to the carrier board and have booted into a supported environment (U-Boot and/or Linux) using BSP version PD18.2.0 or newer. If you are looking for information regarding Raspberry Pi HAT support, please see i.MX7: Raspberry Pi HAT Support with PEB-D-RPI Expansion Board. The expansion board has the following features:

Table of Contents

  • USB to serial UART interface
  • 4KB EEPROM
  • Two user-controllable buttons
  • Two user-controllable LEDs
  • Raspberry Pi-compatible 40-pin header
  • ARM JTAG 20-pin debug interface header
  • Unpopulated expansion signal pin headers

The following sections will detail how to use the above features in the environments in which they are supported. These instructions assume that you have properly connected the expansion board to the carrier board and have booted into a supported environment (U-Boot and/or Linux) using BSP version PD18.2.0 or newer.


Anchor
PEBDRPI_Expansion_Board_interfaces
PEBDRPI_Expansion_Board_interfaces
PEB-D-RPI Expansion Board Interfaces

...

Use the following as a reference for the connector interfaces on the PEB-D-RPI expansion board that will be used in this document.

Image RemovedImage Added

USB to Serial UART Interface

...

You should see 'Testing UART1!' output on the UART1 USB serial console. If not, check the USB serial port settings on the host PC and ensure that it is configured for 115200 baud rate.

...

Enable UART1 as

...

Console

...

in Linux

To enable UART1 as an additional console in Linux, run the following commands. Note that this setting will persist between boots but will not affect the default console in U-Boot and Linux.If you would like to use UART1 as the default console in Linux, boot into U-Boot and test the configuration by running the following commands:

Code Block
titleTarget (U-BootLinux)
envsystemctl set console=ttymxc0
bootenable serial-getty@ttymxc0.service
systemctl start serial-getty@ttymxc0.service

Configuring UART1 as Default Console in U-Boot and Linux

You should see the normal Linux boot output on the USB serial console. You should also be able to login, send commands, and receive expected output. If you would like to use UART1 as the default console , modify the U-Boot file 'include/configs/mx7d_phyboard_zeta.h' to match the following lines and recompile and re-deploy U-Boot onto your boot media:

Code Block
languagecpp
firstline43
titleHost (include/configs/mx7d_phyboard_zeta.h)
linenumberstrue
#define CONFIG_MXC_UART_BASE           UART1_IPS_BASE_ADDR

...

in U-Boot and Linux, boot into U-Boot and test the Linux configuration by running the following commands:

Code Block
titleTarget (U-Boot)
env set console=ttymxc0
boot

You should see the normal Linux boot output on the USB serial console. You should also be able to login, send commands, and receive expected output. If you would like to use UART1 as the default console, modify the U-Boot file 'include/

...

configs/mx7d_phyboard_zeta.h' to match the following lines and recompile and re-deploy U-Boot onto your boot media:

Code Block
)
languagecpp
firstline43
titleHost (include/configs/mx7d_phyboard_zeta.h)
linenumberslinenumberstrue
#define CONFIG_CONSMXC_UART_INDEXBASE              1UART1_IPS_BASE_ADDR


Code Block
languagecpp
firstline15148
titleHost (include/configs/mx7d_phyboard_zeta.h)
linenumberstrue
#define CONFIG_CONS_INDEX              1


Code Block
languagecpp
firstline151
titleHost (include/configs/mx7d_phyboard_zeta.h)
linenumberstrue
/* under the define for /* under the define for CONFIG_EXTRA_ENV_SETTINGS */
"console=ttymxc0\0"

...

This header (X11) serves as Raspberry Pi HAT hardware support and as a convenient location to connect to GPIO or other interface signals that are routed to the expansion board.

Toggling GPIOs Connected to 40-pin Header

When a If you are looking for information regarding Raspberry Pi HAT isn't connected, you can use PHYTEC's RPi.GPIO Python library (included with BSP version PD18.2.0 or later) to control GPIOs connected to support, please see i.MX7: Raspberry Pi HAT Support with PEB-D-RPI Expansion Board.

GPIO and Interface Signals Map

The following tables show the GPIO bank and pin and Raspberry Pi-compatible interface signals mapping to the 40-pin header . By default, only the following pins are configured for GPIO use in the on the PEB-D-RPI device tree file: 7, 11, 12, 13, 15, 16, 18, 22, 29, 32, 35, 40. For information on how to enable more GPIOs, please reference i.MX7: Raspberry Pi HAT Support with PEB-D-RPI Expansion Board.

To set pin 7 on the 40-pin header to be a GPIO output and toggle its value, open your Python interpreter on the target and input the following code:

Code Block
languagepy
titleTarget (Python Interpreter)
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
GPIO.setup(7, GPIO.OUT)
GPIO.output(7, GPIO.HIGH)
GPIO.output(7, GPIO.LOW)
GPIO.cleanup()
exit()

Using a digital multimeter or other suitable device, you can see the value on pin 7 of the 40-pin header go from 0 to 3.3 V and back to 0 V using the above code. You can also toggle GPIOs using the libgpiod utilities installed to the BSP file system. To toggle the same pin using libgpiod utilities, run the following commands on the target:

Code Block
titleTarget (Linux)
gpioset 3 21=1
gpioset 3 21=0

The above commands toggle GPIO chip 4, pin 21, which is routed to pin 7 of the 40-pin header on the PEB-D-RPI expansion board.

GPIO and Interface Signals Map

The following tables show the GPIO bank and pin and Raspberry Pi-compatible interface signals mapping to the 40-pin header on the PEB-D-RPI expansion board.

...

width50%

...

expansion board:

Column
width50%


GPIOs
Pin FunctionPin NumberPin Function
VCC_3V3MEM12VDD_5V0
I2C1_SDA34VDD_5V0
I2C1_SCL56GND
GPIO4_IO2178GPIO4_IO5
GND910GPIO4_IO4
GPIO4_IO201112GPIO5_IO15
GPIO4_IO221314GND
GPIO4_IO231516GPIO1_IO15
VCC_3V3MEM1718GPIO1_IO14
GPIO6_IO201920GND
GPIO6_IO192122GPIO5_IO11
GPIO6_IO212324GPIO6_IO22
GND2526GPIO5_IO9
I2C4_SDA2728I2C4_SCL
GPIO5_IO142930GND
GPIO1_IO023132GPIO5_IO13
GPIO4_IO183334GND
GPIO5_IO163536GPIO4_IO19
GPIO4_IO163738GPIO4_IO17
GND3940GPIO5_IO17



Column
width50%


Interface Signals
Pin FunctionPin NumberPin Function
VCC_3V3MEM12VDD_5V0
I2C1_SDA34VDD_5V0
I2C1_SCL56GND
SPI2_MOSI78UART3_TX
GND910UART3_RX
SPI2_SCLK1112SAI2_TX_BCLK
SPI2_MISO1314GND
SPI2_SS01516GPIO1_IO15
VCC_3V3MEM1718GPIO1_IO14
SPI3_MOSI1920GND
SPI3_MOSI2122GPIO5_IO11
SPI3_SCLK2324SPI3_SS0
GND2526SPI3_SS2
I2C4_SDA2728I2C4_SCL
GPIO5_IO142930GND
PWM2_OUT3132SAI2_RX_BCLK
SPI1_MISO3334GND
SAI2_TX_SYNC3536SPI1_SS0
SPI1_SCLK3738SPI1_MOSI
GND3940SAI2_TX_DATA0


The pin functions highlighted in blue are fixed and can not or should not be changed.

Jumpers

The 40-pin header also features a method to toggle the selection of specific Raspberry Pi-compatible interface signals to certain pins to support different Raspberry Pi HATs using soldered jumpers. The following table details the pins and signals that the jumpers control:

JumperPinDefault Signal (position 1+2)Alternative Signal (position 2+3)
J531PWM2_OUTSAI2_TX_BCLK
J633SPI1_MISOSAI2_TX_SYNC
J735SD2_DATA2SPI1_MISO
J837SPI1_SCLKSAI2_TX_DATA0
J940SD2_DATA3SPI1_SCLK
J1012SD2_DATA1PWM2_OUT
J1129GPIO5_IO14SPI1_MOSI
J1238SPI1_MOSIGPIO5_IO14

Toggling GPIOs Connected to 40-pin Header

When a Raspberry Pi HAT isn't connected, you can use PHYTEC's RPi.GPIO Python library (included with BSP version PD18.2.0 or later) to control GPIOs connected to the 40-pin header. By default, only the following pins are configured for GPIO use in the PEB-D-RPI device tree file: 7, 11, 12, 13, 15, 16, 18, 22, 29, 32, 35, 40. For information on how to enable more GPIOs, please reference i.MX7: Raspberry Pi HAT Support with PEB-D-RPI Expansion Board.

To set pin 7 on the 40-pin header to be a GPIO output and toggle its value, open your Python interpreter on the target and input the following code:

Code Block
languagepy
titleTarget (Python Interpreter)
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
GPIO.setup(7, GPIO.OUT)
GPIO.output(7, GPIO.HIGH)
GPIO.output(7, GPIO.LOW)
GPIO.cleanup()
exit()

Using a digital multimeter or other suitable device, you can see the value on pin 7 of the 40-pin header go from 0 to 3.3 V and back to 0 V using the above code. You can also toggle GPIOs using the libgpiod utilities installed to the BSP file system. To toggle the same pin using libgpiod utilities, run the following commands on the target:

Code Block
titleTarget (Linux)
gpioset 3 21=1
gpioset 3 21=0

The above commands toggle GPIO chip 4, pin 21, which is routed to pin 7 of the 40-pin header on the PEB-D-RPI expansion board.

...

width50%

...

The pin functions highlighted in blue are fixed and can not or should not be changed.

Jumpers

The 40-pin header also features a method to toggle the selection of specific Raspberry Pi-compatible interface signals to certain pins to support different Raspberry Pi HATs using soldered jumpers. The following table details the pins and signals that the jumpers control:

...

ARM JTAG 20-pin Debug Interface Header

...