RFSoC 4x2 "Test Failed" displayed on first run bitstream, then no boot via SD card

SD card image: v3.0.1
In the newly purchased board, RFSoC 4x2, we saw the message “Test Failed” displayed after first run bitstream.

In subsequent power cycles, no boot / done LED was shown in SD card mode. We are not able to troubleshoot this issue? @aman

I have attached the boot.py code below.

#! /usr/bin/env python3

# example #1 - WiFi connection at boot
#from pynq.lib import Wifi
#port = Wifi()
#port.connect('your_ssid', 'your_password', auto=True)

# example #2 - Change hostname
#import subprocess
#subprocess.call('pynq_hostname.sh aNewHostName'.split())

# example #3 - blink LEDs (PYNQ-Z1, PYNQ-Z2, ZCU104)
#from pynq import Overlay
#from time import sleep
#ol = Overlay('base.bit')
#leds = ol.leds
#for _ in range(8):
#    leds[0:4].off()
#    sleep(0.2)
#    leds[0:4].on()
#    sleep(0.2)#!/usr/bin/env python3
# Copyright (c) 2022 Xilinx, Inc
# SPDX-License-Identifier: BSD-3-Clause

from time import sleep
from pynq.overlays.base import BaseOverlay
from pynq import GPIO
from rfsoc4x2 import oled
import pynq
import subprocess as sp
import netifaces as ni

oled = oled.oled_display()
oled.write("RFSoC-PYNQ\nVersion {}".format(pynq._version_))

# LMK clock config
lmk_reset = GPIO(341, 'out')
lmk_clk_sel0 = GPIO(342, 'out')
lmk_clk_sel1 = GPIO(346, 'out')


base = BaseOverlay('base.bit')

for _ in range(8):

# Find active interface name and IP address
    iface = ni.gateways()['default'][ni.AF_INET][1]
    ip_address = ni.ifaddresses(iface)[2][0]['addr']

    oled.write("IP Addr({}):\n{}".format(iface, ip_address))
    if ('usb0' in ni.interfaces()) and (len(ni.ifaddresses('usb0')) == 3):
        iface = 'usb0'
        ip_address = ni.ifaddresses('usb0')[2][0]['addr']
        oled.write("IP Addr({}):\n{}".format(iface, ip_address))
        oled.write("RFSoC-PYNQ\nNo IP detected")

We also tried using another SD card with same v3.0.1 image downloaded from pynq.io. It did not work. Is there a defect in reading the uboot from the sd card? Do we need to flash v2.7 into the board?

1 Like

Hi there,

If you see a “test failed” the solution is to reflash the sd card with an image from the pynq.io site, either 2.7 or 3.0.1 are fine.

Could you clarify what you meant by “it did not work”? No IP displayed? Errors in the serial terminal?


1 Like

Hi Shawn

So what we mean is even after flashing the SD card again with the 3.0.1 image, the sequence of LEDs lighting up got stuck at the ‘INT’ LED and is not proceeding to the ‘DONE’ LED and further. So, should we try downloading the image again in a new SD card and start the board again?


Hi Aman,

Does the OLED turn on/print anything? I would open up a serial terminal and watch the boot sequence where it is failing. If the sd card got corrupted somehow, worth trying to burn a new one.


Hi Shawn

Yes, the display showed ‘Test Failed’ when we switched the board ON for the first time. Maybe it showed that because we didn’t connect the ethernet cable. After that we connected the ethernet and other required cables but everytime it got stuck on the ‘INT’ LED. No further LED lit up.


1 Like

If you flash the latest v3.0.1 pynq image, there is not selftest being run on it so you shouldn’t see any “test fail” messages with that image. If you are seeing “test fail” it is the wrong image.

I would make sure v3.0.1 is definitely loaded on your sd card, on successful boot an IP address should appear on the OLED, if not then I would use a serial terminal to debug what is going on.


1 Like