Cart Contact NSDSP Home

USB Problems with Raspberry Pi 3b+

We have found a USB bug in Raspberry Pi 3b+, and possibly earlier versions too.

Symptoms

NSDSP programming may fail, typically with "Verification Failed" error. The failure rate is low, but increases when there is other activity (such as Web browsing) or when multiple NSDSP programmers are used simultaneously.

Root Cause

USB packets sent from Raspberry Pi to NSDSP may be lost.

If there is no other activity on RPi, the rate of packed loss is small - less than 1 per million packets. This is enough to program PIC32MZ several times without errors, but the packet may be lost at any time, in which case programming fails and must be re-done.

Any activity - Web browsing, background tasks etc. - increases the rate of packet loss significantly. Programming becomes impossible.

When several NSDSP programmers are used for Gang programming the packet loss rate increases. Programming becomes impossible.

Details

In USB protocol, the packets transmitted by the host are marked as either DATA0 or DATA1. The DATA0 and DATA1 packets alternate. Any DATA0 packet is always followed by a DATA1 packet, and any DATA1 packet is followed by a DATA0 packet.

The reason for such arrangement is to prevent duplicate packets. For example, host may send a DATA0 packet which gets successfully received by the device, but the host may miss the acknowledgement sent back by the device for some reason. In this case, host will re-send the DATA0 packet. But the device has already received this packet once and is expecting next packet which must be marked as DATA1. Therefore, the device must reject the DATA0 packet and thereby prevent duplicate packets from being processed.

Because of a bug in the Raspberry Pi 3b+ USB controller, the packet marking may get disturbed, and Raspberry Pi sends two consecutive DATA0 packets or two consecutive DATA1 packets. Such packets are recognized by NSDSP as duplicates and one of the packets get dropped. This causes packet loss and programming failure.

Resolution

Use Raspberry Pi 4 or other ARM SBC

Northern Software Home NSDSP Contact Us Purchase/View Cart

© 2007-2025 Northern Software Inc. All Rights Reserved.