Repository navigation
06. Restore CC1352
If you flash an incorrect firmware to the CC1352 chip on your board, it may get stuck, and it will not allow you to reprogram using the bootloader. This section will explain the possible ways to restore the CC1352 chip on the different versions of the CatSniffer. We will go over two main ways to restore your board. First, the process using a J Link or similar cJTAG programmer. This method works with ALL versions of the CatSniffer and is the simpler one, but it does require extra hardware. And the second method using the boards RP2040 as a cJTAG programmer, this method is ONLY AVAILABLE on version 3.x and newer of the board.
Note
This procedure is only for CatSniffer v3.x or later. Internal connections that previous boards do not have are required for this to work. This method will only delete the current firmware on the board; it will not load a new one, but using this method, the bootloader will be re-enabled to load firmware using the Python tool. You can check the ‘Loading Firmware’ section to do that afterwards.
-
Prepare the RP2040
- Load the free_dap_catsniffer.uf2 firmware onto it. You can refer to the ‘Loading Firmware’ section for the upload process. You can find this file in the releases folder of the repository.
-
Install OPENOCD on Windows:
-
Download and install MSYS2 from: https://www.msys2.org/
-
Open MSYS2 MINGW64 and update the package database and host packages with:
$ pacman -Syu$ pacman -Su
-
Now install the necessary dependencies
$ pacman -S mingw-w64-x86_64-toolchain git make libtool pkg-config autoconf automake texinfo mingw-w64-x86_64-libusb
-
Select all by pressing enter
-
Open a new window of MSYS2 MINGW64 and run the following commands:
$ git clone https://github.com/raspberrypi/openocd.git --branch rp2040 --depth=1$ cd openocd$ ./bootstrap$ ./configure --disable-werror --enable-picoprobe
-
Execute a make command
$ make
-
Run OpenOCD once again to ensure that it was properly installed.
$ src/openocd.exe
-
-
Configure the adapter speed:
- Find the configuration file for CC1352 in
C:\msys64\home\YourUsername\openocd\tcl\target\ti_cc13x2.cfgand add adapter speed 4000 to set adapter speed to 4000 kHz.
Configure Adapter Speed - Find the configuration file for CC1352 in
-
Erase the memory on the CC1352:
-
Open MSYS2 MINGW64.
-
Navigate to the OpenOCD folder using the command:
$ cd C:/open/openocd
-
Run the command:
$ src/openocd -f interface/cmsis-dap.cfg -c "transport select jtag" -f target/ti_cc13x2.cfg -s tcl
If you encounter the following warnings and errors, it means that the configuration file of our CC1352 needs to be modified again.
Info : JTAG tap: cc13x2.jrc tap/device found: 0x1bb7702f (mfg: 0x017 (Texas Instruments), part: 0xbb77, ver: 0x1) Warn : JTAG tap: cc13x2.jrc UNEXPECTED: 0x1bb7702f (mfg: 0x017 (Texas Instruments), part: 0xbb77, ver: 0x1) Error: JTAG tap: cc13x2.jrc expected 1 of 1: 0x0bb4102f (mfg: 0x017 (Texas Instruments), part: 0xbb41, ver: 0x0) Error: Trying to use configured scan chain anyway... Warn : Bypassing JTAG setup events due to errors
-
-
Set the chip address:
Find the configuration file for CC1352 in
C:\msys64\home\YourUsername\openocd\tcl\target\ti_cc13x2.cfgand in set JRC_TAPID 0x0BB4102F change the address to the address of your device. In this case, it would be like this: set JRC_TAPID 0x1bb7702f. Once you have changed it, you should be able to continue with the process.-
Open another terminal window, CMD for Windows users, and run:
$ telnet localhost 4444
-
Once the connection is made, run the following commands:
$ halt$ flash erase_sector 0 0 last$ exit
-
Now your chip’s memory has been erased.
Sometimes sector 0 of the memory might get stuck when erasing the memory.
Sector 0 ErrorIf you find yourself experiencing this issue, you can change the command to start erasing at sector 1.
flash erase_sector 0 1 last
-
- CatSniffer
- J-Link Edu or J-Link PLUS Compact from SEGGER
- ARM20-CTX
- Tag-Connect TC20X0-CLIP
-
Install JLink
- Go to the SEGGER webpage
- Select the version and the operating system that you have.
JLink Download Options- Click on Download.
JLink Download- Accept the terms of use.
Terms of Use Window- It will download an
.exefile. - Execute as an administrator.
- Click on Next.
JLink Installer- Click on I Agree.
JLink Installer- Click on Install.
Select Path and Optional Components- It will be installed, it may take some seconds or minutes.
JLink Installer- When the installation is done, click on Finish.
Installation Complete -
Connecting to the board
- Connect the cable ARM20-CTX to the JLink. Other versions of JLink might look different but the process is the same.
Connecting Cable to Jlink- Connect the other end of the cable ARM20-CTX to the CatSniffer on port J3.
Connecting Cable to CatSniffer- Attach the Tag-Connect TC20X0_CLIP on the other side of the board.
Securing Cable to CatSniffer- Connect the USB Micro B cable to the J-Link PLUS Compact
Connecting JLink to PC- Connect the USB Type-C to the CatSniffer
Connecting CatSniffer to PC- Connect both cables to the computer.
Connecting CatSniffer to PC -
Upload a file:
- Open the J-Flash Lite
- It will appear in the next window. Click on O.K.
JLink Warning Message- Check carefully which CatSniffer version you have and which CC1352 chip version your board has. It can be CC1352P7, CC1352P1F3 or CC1352R1F3. You can check our section on identifying your board.
- On ‘Device’, set the chip model that your CatSniffer has. For example, this one has the CC1352P1F3.
Select Device and Interface- On ‘Interface’ select cJTAG and 4000kHz. Click ‘OK’
- First of all, we need to erase the previous .hex file, so click on ‘Erase Chip’
- A message must appear below saying that the erasing was done.
Erase Chip- If the file was erased correctly, on the board the LED D4 must not be blinking.
- Click on the three dots and select your .hex file. Be sure that is the correct .hex file, or it won't work.
- Click on ‘Program Device’
- A message saying Downloading done should appear.
Program Device- If the program was successfully uploaded, LED 4 should be blinking blue.
Blinking LEDs
-
Catnip Installation/Uninstallation Instructions
- Installations Instructions
- Uninstallation instructions