Spycoprobe is a USB programmer for TI MSP430FRxxxx devices. It receives commands from a host application via USB and interacts with an attached target device by bit-banging TI's Spy-Bi-Wire (SBW) protocol. The Spycoprobe firmware runs on Raspberry Pi's RP2040 microcontroller that is found on the Raspberry Pi Pico board.
Spycoprobe should work with all MSP430X devices. It has been tested with MSP430FR5994 and MSP430FR2433.
You should replace the dummy USB vendor ID and product ID in src/usb_descriptors.c
before using Spycoprobe.
You can change the pins that are used for SBW programming on top of src/main.c
. There are four relevant pins:
PIN_SBW_TCK
is the SBW clock signalPIN_SBW_TDIO
is the SBW data signalPIN_SBW_DIR
is an optional signal specifying the direction of theSBW_TDIO
signal. This can be used to switch directions of a level converter. Signal is high when data is sent from the probe to the target.PIN_TARGET_POWER
is an optional signal to enable/disable a power supply to the target. Signal is high when programmer is active.
Follow the official instructions to install and setup the Pico SDK.
Clone this repository:
git clone [email protected]:geissdoerfer/spycoprobe.git
Change to the build
directory and configure cmake and build:
cd spycoprobe/firmware/build
cmake ..
make -j4
You should now find spycoprobe.hex
and spycoprobe.uf2
files in the build
directory.
If you have a Raspberry Pico, disconnect it from your PC and keep pressing the BOOTSEL
button while re-connecting the USB cable to your PC. A drive should appear on your PC. Copy the spycoprobe.uf2
from the build
dir onto this drive. The drive should disappear, while the bootloader flashes the new firmware. A new USB CDC ACM device should appear.
Alternatively, you can use any suitable SWD debug probe to upload the hex file to the RP2040.
Attach the Spycoprobe USB connector to your PC. Connect the SBWTCK
and SBWTDIO
pins of Spycoprobe (GP2 and GP3 by default) and a ground wire to your target device. Make sure that the target is supplied with a similar supply voltage as the Spycoprobe (3.3V on Raspberry Pico).
Install the Python package provided under ./tools
using:
cd tool
python setup.py install
Flash an image:
spycoprobe flash -i image.hex
It is planned to add support for Spycoprobe in Mspdebug, but that is still work in progress.