Skip to content
Marcelo Arredondo edited this page Dec 20, 2023 · 1 revision

If you flash the incorrect firmware to the CC1352 chip on your board it may get stuck and it will not allow you to re-program by 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 programer. This method works with ALL versions of the CatSniffer and is the simplier one, but it does require extra hardware. And the second method using the boards RP 2040 as a cJTAG programmer, this method is ONLY AVAILABLE on version 3.x and newer of the board.

Restore the CC1352 firmware with J Link

Materials

  • CatSniffer
  • J-Link Edu or j-link PLUS Compact from SEGGER
  • ARM20-CTX
  • Tag-Connect TC20X0-CLIP

Procedure

1. Instal JLink

  • Go to the SEGGER webpage
  • Select the version and the operating system that you have.

Jlink1

  • Click on Download.

Jlink2

  • Accept the terms of use.

Jlink3

  • It will download an .exe file.
  • Execute as an administrator.
  • Click on Next.

Jlink4

  • Click on I Agree.

Jlink5

  • Click on Install.

Jlink6

  • It will be installed, it may take some seconds or minutes.

Jlink7

  • When the installation is done, click on Finish.

Jlink8

2. 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.

Jlink9

  • Connect the other end of the cable ARM20-CTX to the CatSniffer on port J3.

Jlink10

  • Attach the Tag-Connect TC20X0_CLIP on the other side of the board.

Jlink11

  • Connect the USB Micro B cable to the j-link PLUS Compact

Jlink12

  • Connect the USB Type C to the CatSniffer

Jlink13

  • Connect both cables to the computer.

Jlink14

3. Upload a file:

  • Open the J-Flash Lite
  • It will appear in the next window. Click on O.K.

Jlink15

  • 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.

Jlink16

  • 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.

Jlink17

  • 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.

Jlink18

  • If the program was successfully uploaded, LED 4 should be blinking blue.

Jlink19

Restore CatSniffer V3 with RP2040 with RaspberryPico

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 reenabled to load firmware using the python tool. You can check the ‘Loading Firmware’ section to do that afterwards.

Materials

  • CatSniffer V3.x or later

Procedure

1. 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 on the releases folder of the repository.

2. 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

3. Configure the adapter speed:

  • Find the configuration file for CC1352 in C:\msys64\home\YourUsername\openocd\tcl\target\ti_cc13x2.cfg and add adapter speed 4000 to set adapter speed to 4000 kHz.

4. 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

5. Set the chip address:

Find the configuration file for CC1352 in C:\msys64\home\YourUsername\openocd\tcl\target\ti_cc13x2.cfg and 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.

If you find yourself experiencing this issue you can change the command to start erasing at sector 1.

  • flash erase_sector 0 1 last

Clone this wiki locally