-
Notifications
You must be signed in to change notification settings - Fork 77
10. Restore CC1352
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.
- CatSniffer
- J-Link Edu or j-link PLUS Compact from SEGGER
- ARM20-CTX
- Tag-Connect TC20X0-CLIP
1. Instal JLink
- Go to the SEGGER webpage
- Select the version and the operating system that you have.
- Click on Download.
- Accept the terms of use.
- It will download an
.exe
file. - Execute as an administrator.
- Click on Next.
- Click on I Agree.
- Click on Install.
- It will be installed, it may take some seconds or minutes.
- When the installation is done, click on Finish.
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.
- Connect the other end of the cable ARM20-CTX to the CatSniffer on port J3.
- Attach the Tag-Connect TC20X0_CLIP on the other side of the board.
- Connect the USB Micro B cable to the j-link PLUS Compact
- Connect the USB Type C to the CatSniffer
- Connect both cables to the computer.
3. Upload a file:
- Open the J-Flash Lite
- It will appear in the next window. Click on O.K.
- 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.
- 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.
- 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.
- If the program was successfully uploaded, LED 4 should be blinking blue.
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.
- CatSniffer V3.x or later
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
-
-
- What is the CatSniffer?
- How can I use CatSniffer?
- What are the features of the CatSniffer?
- What can I do with the CatSniffer?
- What IoT protocols are supported by CatSniffer?
- How can I restore the CC1352 firmware on CatSniffer?
- How can I restore CC1352 firmware with RP2040 for CatSniffer V3?
- ERROR: Timeout waiting for ACK/NACK after Synch (0x55 0x55)
- What if SmartRF Packet Sniffer 2 doesn't detect my board?
- Why I got the error: unistd.h no such file or directory?
- Why CatSniffer can not connect with Zigbee2MQTT?
- What does this button do?