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')

lmk_reset.write(1)
lmk_reset.write(0)
lmk_clk_sel0.write(0)
lmk_clk_sel1.write(0)

base = BaseOverlay('base.bit')
base.init_rf_clks()

for _ in range(8):
    base.leds[0:4].on()
    sleep(0.2)
    base.leds[0:4].off()
    sleep(0.2)

# Find active interface name and IP address
try:
    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))
except:
    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))
    else:
        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?

Thanks
Shawn

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?

Thanks
Aman

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.

Thanks
Shawn

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.

Regards
Aman

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.

Thanks
Shawn

1 Like

Hi Shawn

We tried everything, flashed a new sd card with the recent PYNQ image, also flashed another sd card with an older version of image but still we have the same problem. The LED sequence stops at INT red LED.

Regards
Aman

1 Like

Hi Shawn

Looking forward to your reply.

Regards
Aman

1 Like

Is the OLED displaying anything? What is the output on the serial terminal?

1 Like

No, there is no display in the OLED. But, we are observing red LEDs glowing under the ‘USB FAULT’ named ‘TOP’ and ‘BOT’. Is this normal for these LEDs to glow up first?

1 Like

No the usb fault leds shouldn’t be on, my bet is there is something wrong with the sd card. It seems to me like you’re having a similar issue to this post RFSoC 4x2 Does not show any IP address in the Display - #10 by kulla002, the author of that post had a screenshot with the usb fault leds on as well, reflashing the sd card solved their issue.

The fact that you managed to get a “test failed” on the OLED the first time you booted the board with the shipped sd card image means the board is certainly functional enough to boot. What method are you using to flash your sd card?

Thanks
Shawn

2 Likes

For flashing a new SD card we used dd command in linux, macOS, BalenaEtcher, Rufus, Win32. But every time it is getting stuck at the same LED. Can the format of SD card create issues. Right now the format is FAT16. In my laptop MS-DOS(FAT) is not getting selected. Is there anyway to download the bitstream using UART port?

Thanks
Aman

1 Like

FAT should be fine, I’m not entirely sure if 16 or 32 matters here. Have you tried more than 1 SD card? Maybe the one you have is borked somehow.

Thanks
Shawn

1 Like

We used 3 new SD cards and tried flashing both v3.0.1 and v2.7 version of the image. Also in the terminal emulator (MacWise), there is no recognition of the serial port. We tried Teraterm also, but got the same issue.
We are connecting both the ethernet and USB 3.0 cable to the board and the laptop. But only the ethernet is recognised, no sign of USB cable being detected.

2 Likes


We were trying to upload a sample bitstream in the board through the UART port but got the error as shown in the image.

1 Like

Hi Shawn

We were testing our new RFSoC 4x2 board. The board is working fine with the windows system but showing some problems with Mac. When we are connecting the board to a Mac system, it is showing the IP address but the jupyter lab is not loading. Are there any other additional requirements that we should be aware of for using the board with mac?

Regards
Aman

1 Like

Hi @aman,

I’ve noticed some weirdness with my 4x2 boot procedure when I have multiple cables plugged into it during the boot. Have you tried turning on the board with only ethernet plugged in? Make sure the board is in “boot from SD Card mode”. You should be able to plug in the USB micro here after it’s fully booted and see a device recognized:

2 Likes