cc2538-bsl
cc2538-bsl copied to clipboard
ERROR: Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)'
Using CC1310 on a SMARTRF06, git rev a38cfc889ebb2197b8775c79763e04c592fd4b77, I get:
~/contiki/examples/hello-world$ make TARGET=srf06-cc26xx BOARD=srf06/cc13xx hello-world.upload PORT=/dev/ttyUSB1
CC ../../cpu/cc26xx-cc13xx/lib/cc13xxware/startup_files/ccfg.c
CC ../../cpu/cc26xx-cc13xx/./ieee-addr.c
AR contiki-srf06-cc26xx.a
CC ../../cpu/cc26xx-cc13xx/./fault-handlers.c
CC ../../cpu/cc26xx-cc13xx/lib/cc13xxware/startup_files/startup_gcc.c
CC hello-world.c
LD hello-world.elf
arm-none-eabi-objcopy -O binary --gap-fill 0xff hello-world.elf hello-world.bin
python ../../tools/cc2538-bsl/cc2538-bsl.py -e -w -v -p /dev/ttyUSB1 hello-world.bin
Opening port /dev/ttyUSB1, baud 115200
Reading data from hello-world.bin
Cannot auto-detect firmware filetype: Assuming .bin
Connecting to target...
ERROR: Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)'
make: *** [hello-world.upload] Error 1
rm obj_srf06-cc26xx/startup_gcc.o hello-world.co obj_srf06-cc26xx/fault-handlers.o
(I manually set the baud to 115200 which I believe is correct. 500000 failed the same way.)
The 500000 baud rate should work (this makes things a lot faster).
The timeout waiting for the ACK/NACK means there was no answer from the chip. You're sure about the connection to the chip itself? Can you test it with another program / device?
I'm sure about the connection. Uniflash was able to flash the chip just fine, and hello-world worked.
Just trying to debug here: You're confident you've got the correct serial port, and you're sure the bootloader is unlocked on the chip?
I'm getting a similar issue with a CC2538 module straight from the factory. These modules when programmed with a firmware communicate fine over serial. Just to be sure I connected JTAG and did an erase (in-case the factory set some bits for some reason) which should reset image valid I think.
I can confirm the SBL is running, I set up a FTDI on the same pins on windows:
cc2538-bsl.py also works on Windows via the FTDI module
C:\Python27>python cc2538-bsl.py -p COM8 Opening port COM8, baud 500000 Connecting to target... CC2538 PG2.0: 512KB Flash, 32KB SRAM, CCFG at 0x0027FFD4 Primary IEEE Address: 00:12:4B:00:10:05:FF:DB
The actual hardware is a Linux SBC with the module connected via a UART
I think this may be related to the ZNP client attempting to start up (which uses the same serial port) causing the SBL to pick a wrong baud rate.
Also the first time requested after boot fails.
halley@Tinyhub:~$ python ~/cc2538-bsl/cc2538-bsl.py -p /dev/ttyS1
Opening port /dev/ttyS1, baud 500000
Connecting to target...
ERROR: Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)'
halley@Tinyhub:~$ python ~/cc2538-bsl/cc2538-bsl.py -p /dev/ttyS1
Opening port /dev/ttyS1, baud 500000
Connecting to target...
CC2538 PG2.0: 512KB Flash, 32KB SRAM, CCFG at 0x0027FFD4
Primary IEEE Address: 00:12:4B:00:10:05:FF:DB
halley@Tinyhub:~$ python ~/cc2538-bsl/cc2538-bsl.py -p /dev/ttyS1
Opening port /dev/ttyS1, baud 500000
Connecting to target...
CC2538 PG2.0: 512KB Flash, 32KB SRAM, CCFG at 0x0027FFD4
Primary IEEE Address: 00:12:4B:00:10:05:FF:DB
How about the TI cc2650? I have followed the steps on http://pablocorbalan.com/getting-started-with-ti-cc2650-launchpad to flush a bootloader enabled firmware on cc2650, and then try to flush the firmware using cc2538-bsl.
I have tried /dev/ttyACM0
and /dev/ttyACM1
. And the change the baud into 115200. However, both of them can not work.
I am trying the example on https://github.com/spoerk/contiki/tree/master/examples/cc26xx/cc26xx-ble-client-demo
$ make TARGET=srf06-cc26xx BOARD=launchpad/cc2650 PORT=/dev/ttyACM1 client.upload
CC ../../../cpu/cc26xx-cc13xx/lib/cc26xxware/startup_files/ccfg.c
CC ../../../cpu/cc26xx-cc13xx/./ieee-addr.c
AR contiki-srf06-cc26xx.a
CC ../../../cpu/cc26xx-cc13xx/./fault-handlers.c
CC ../../../cpu/cc26xx-cc13xx/lib/cc26xxware/startup_files/startup_gcc.c
CC client.c
LD client.elf
arm-none-eabi-objcopy -O binary --gap-fill 0xff client.elf client.bin
python ../../../tools/cc2538-bsl/cc2538-bsl.py -e -w -v -p /dev/ttyACM1 client.bin
Opening port /dev/ttyACM1, baud 500000
Reading data from client.bin
Cannot auto-detect firmware filetype: Assuming .bin
Connecting to target...
ERROR: Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)'
make: *** [client.upload] Error 1
rm client.co obj_srf06-cc26xx/fault-handlers.o obj_srf06-cc26xx/startup_gcc.o
$ make TARGET=srf06-cc26xx BOARD=launchpad/cc2650 PORT=/dev/ttyACM0 client.upload
CC ../../../cpu/cc26xx-cc13xx/lib/cc26xxware/startup_files/ccfg.c
CC ../../../cpu/cc26xx-cc13xx/./ieee-addr.c
AR contiki-srf06-cc26xx.a
CC ../../../cpu/cc26xx-cc13xx/./fault-handlers.c
CC ../../../cpu/cc26xx-cc13xx/lib/cc26xxware/startup_files/startup_gcc.c
CC client.c
LD client.elf
arm-none-eabi-objcopy -O binary --gap-fill 0xff client.elf client.bin
python ../../../tools/cc2538-bsl/cc2538-bsl.py -e -w -v -p /dev/ttyACM0 client.bin
Opening port /dev/ttyACM0, baud 500000
Reading data from client.bin
Cannot auto-detect firmware filetype: Assuming .bin
Connecting to target...
ERROR: Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)'
make: *** [client.upload] Error 1
$ make TARGET=srf06-cc26xx BOARD=launchpad/cc2650 PORT=/dev/ttyACM0 client.upload
CC ../../../cpu/cc26xx-cc13xx/lib/cc26xxware/startup_files/ccfg.c
CC ../../../cpu/cc26xx-cc13xx/./ieee-addr.c
AR contiki-srf06-cc26xx.a
CC ../../../cpu/cc26xx-cc13xx/./fault-handlers.c
CC ../../../cpu/cc26xx-cc13xx/lib/cc26xxware/startup_files/startup_gcc.c
CC client.c
LD client.elf
arm-none-eabi-objcopy -O binary --gap-fill 0xff client.elf client.bin
python ../../../tools/cc2538-bsl/cc2538-bsl.py -e -w -v -p /dev/ttyACM0 -e -w -v -b 115200 client.bin
Opening port /dev/ttyACM0, baud 115200
Reading data from client.bin
Cannot auto-detect firmware filetype: Assuming .bin
Connecting to target...
ERROR: Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)'
make: *** [client.upload] Error 1
$ make TARGET=srf06-cc26xx BOARD=launchpad/cc2650 PORT=/dev/ttyACM1 client.upload
CC ../../../cpu/cc26xx-cc13xx/lib/cc26xxware/startup_files/ccfg.c
CC ../../../cpu/cc26xx-cc13xx/./ieee-addr.c
AR contiki-srf06-cc26xx.a
CC ../../../cpu/cc26xx-cc13xx/./fault-handlers.c
CC ../../../cpu/cc26xx-cc13xx/lib/cc26xxware/startup_files/startup_gcc.c
CC client.c
LD client.elf
arm-none-eabi-objcopy -O binary --gap-fill 0xff client.elf client.bin
python ../../../tools/cc2538-bsl/cc2538-bsl.py -e -w -v -p /dev/ttyACM1 -e -w -v -b 115200 client.bin
Opening port /dev/ttyACM1, baud 115200
Reading data from client.bin
Cannot auto-detect firmware filetype: Assuming .bin
Connecting to target...
ERROR: Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)'
make: *** [client.upload] Error 1
@desword your problem seems different from the other issues in this thread, so feel free to open a new issue.
The timeout errors you're getting means the script isn't getting any response from the chip. There's multiple possible causes, but the main one is usually hardware related. So make sure your serial connection to the chip and serial bootloader works. Then check that the SBL itself is properly configured. Also make sure the bootloader is actually running. Lastly make sure nothing else is accessing the serial line before the script.
I also have the similar Issue:
I will explain step by step:
- I have 10 openMote-B Rev-1.4
- I started working with RIOT. I'm confused where to and how to start so I mailed to RIOT Developer's
they said as you are a beginner you can try RIOT--TUTORIALS like that
https://github.com/RIOT-OS/Tutorials - So I started working with the TUTORIALS, I have installed the necessary packages
- I have connected only one OpenMote-B to my PC having ubuntu18.04
- I went to this Directory /home/Tutorial/Task-01
- I Provided This Comment ** BOARD=openmote-B make flash all term** For tranfer the program into my openmote-B
- The Code was transferred successfully and a terminal Opened there I gave PS, Reboot and Help Command that was also working well
- Now i went the Task-02 Directory /home/Tutorial/Task-02 Here I gave this command BOARD=openmote-B make flash all term For tranfer the TASK-02 program to my openmote-B But this Time I got the Following Error ERROR: Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)'
I got to know by my analysis there is problem with the Bootloder kind of things only openMote-B developer Mr.per tuset he said the following Hello, You have probably flahsed a RIOT image that has the wrong pin configuration for the bootloader in the Flash. To fix it:
- Use a JTAG probe to flash an empty imatge or am image with the proper bootloader Flash settings
- Change the RIOT image to make sure that the same bootloader Flasg setting are used For your reference, the pin that is used to trigger the bootloader on the OpenMote-B board is PORTA PIN7 using a low level. Kind regards, Pere I analysed and found the below line #define CCA_BACKDOOR_PORT_A_PIN (6) /**< BSL_BOOT Pin */ by Pere Tuset approval i changed the pin number 6 into 7
but then also not working and again he said like this Hello, This is really unfortunate. I am not very familiar with RIOT, but there must be something else going on. For example the CCA configuration is stored in Flash as described in this file -> https://github.com/RIOT-OS/RIOT/blob/master/cpu/cc2538/vectors.c The specific line is : 0xe0ffffff | (CCA_BACKDOOR_ENABLE << 28) | (CCA_BACKDOOR_ACTIVE_LEVEL << 27) | (CCA_BACKDOOR_PORT_A_PIN << 24) If done the math and it matches the configuration I am unsing on my projects, so that should work. One thing to try is using a slower baudrate (i.e. 400000) just in case.
but I'am confused where to change what to change i did so many thing i have total 10 in that 5 boards are locked remaining 5 boards are there i'm fearing to check more things please help me out of this
(I got the idea to recover the other 5 openmote-B board using JTAG programmer I'm going to make it work)
But i sould work with other boards by solving this error
Thanks
Just trying to debug here: You're confident you've got the correct serial port, and you're sure the bootloader is unlocked on the chip?
@JelmerT, so if booloader is locked, then will get ERROR: Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)' .... Is this normal ?
l# python3 cc2538-bsl.py -p /dev/ttyUSB0
cc2538-bsl.py:971: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if int(value) % int(device.page_size) is not 0:
cc2538-bsl.py:976: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if int(value, 16) % int(device.page_size) is not 0:
Opening port /dev/ttyUSB0, baud 500000
Connecting to target...
ERROR: Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)'
@dony71 A timeout can have multiple reasons, but a locked bootloader is one of them. The chip just doesn't answer because it's not listening. But if there is a problem your chip wouldn't answer either for example
@JelmerT I read somewhere need to do mass erase on the flash so that backdoor bootloader can be enable. I have raspberry pi and have installed openocd on it. Do you know how to do mass erase flash using openocd?
@dony71 You'd need to connect to the chip with a jtag programmer to enable the serial bootloader.
quick google search brought me to this https://gist.github.com/hwhw/fc43892785aa84913d03495c97b0f25a which seems like a good explanation.
Hello Everyone..!! I am getting this error ERROR: Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)' ../../platform/openmote-cc2538/Makefile.openmote-cc2538:51: recipe for target 'openmote-demo.upload' failed make: *** [openmote-demo.upload] Error 1 rm openmote-demo.co obj_openmote-cc2538/startup-gcc.o
I have read all the things which are mentioned above and applied it also but still it showing this error. Can anyone help me in this regard?
fyi: I also was getting the error but it turned out to be brltty udev rule messing with the device. after commenting the udev rule as stated in https://unix.stackexchange.com/questions/670636/unable-to-use-usb-dongle-based-on-usb-serial-converter-chip I was able to flash without further problems.
Hi Everyone, I also have this error but it was solved. Please check your openmote before inserting it. Sometime the mote is also not working. Other than that i donot face this problem more. Regards, Ali Shoaib
On Thu, 13 Jan 2022 at 16:12, Víctor @.***> wrote:
fyi: I also was getting the error but it turned out to be brltty udev rule messing with the device. after commenting the udev rule as stated in https://unix.stackexchange.com/questions/670636/unable-to-use-usb-dongle-based-on-usb-serial-converter-chip I was able to flash without further problems.
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>
I had this issue and solved. Hope this is helpful but all I done on Windows 10 was update from Driver Version 6.7.4.261 to 11.1.0.53. Unplugged and re-plugged the dongle and flashed.
https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers
I had previously used steps in this video https://youtu.be/4jqQCxjlRDU
But was trying to follow this one https://youtu.be/4eYnURcDrWw
I do have the same issue, just brought this sonoff ZBDongle-P 3.0 USB dongle and wanted to upgrade my firmware with your phyton script. Doing so i got the same error as mentioned above.
There are a lot of suggestions but i'm not clear with path i need to take, i'm a newby on using the zigbee dongle.
For future readers. I tried to flash my dongle which gave a Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)'
error.
I found that there was an other instance trying to use the dongle (zigbee2mqtt docker container). When I did quit the container it all worked as expected.
While running the docker container (error).
./cc2538-bsl.py -p /dev/ttyUSB0 -evw ~/CC2652RB_coordinator_20211114/CC2652RB_coordinator_20211114.hex
Opening port /dev/ttyUSB0, baud 500000
Reading data from ~/CC2652RB_coordinator_20211114/CC2652RB_coordinator_20211114.hex
Your firmware looks like an Intel Hex file
Connecting to target...
ERROR: Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)'
After stopping docker:
./cc2538-bsl.py -p /dev/ttyUSB0 -evw ~/CC2652RB_coordinator_20211114/CC2652RB_coordinator_20211114.hex
Opening port /dev/ttyUSB0 , baud 500000
Reading data from ~/CC2652RB_coordinator_20211114/CC2652RB_coordinator_20211114.hex
Your firmware looks like an Intel Hex file
Connecting to target...
CC1350 PG2.0 (7x7mm): 352KB Flash, 20KB SRAM, CCFG.BL_CONFIG at 0x00057FD8
Primary IEEE Address: 00:12:4B:00:23:90:D5:3B
Performing mass erase
Erasing all main bank flash sectors
Erase done
Writing 360448 bytes starting at address 0x00000000
Write 104 bytes at 0x00057F980
Write done
Verifying by comparing CRC32 calculations.
Verified (match: 0x12cd0a42)
Hi Bastiaan Nelissen, Have you put the connection right for putting it into boot mode? I was also having a same problem in the end i came up with a damage node. I suggest you to take a multimeter and check every IC on the node.
Regards, Ali Shoaib
had the same timeout issue. Simply resolved that by adding --bootloader-sonoff-usb flag.
I don't understand why I have this error and I don't think anyone in this post has fixed the problem?
lrwxrwxrwx 1 root root 13 Nov 17 21:45 usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220816140554-if00 -> ../../ttyACM0
sudo python3 cc2538-bsl.py -ewv -p /dev/ttyACM0 --bootloader-sonoff-usb . /CC1352P2_CC2652P_launchpad_coordinator_20220219.hex
sonoff Port d'ouverture /dev/ttyACM0, baud 500000 Lecture des données de . /CC1352P2_CC2652P_launchpad_coordinator_20220219.hex Votre micrologiciel ressemble à un fichier Intel Hex Connexion à la cible... ERREUR : Délai d'attente pour ACK/NACK après 'Synch (0x55 0x55)'
@bglnelissen , thanks for these elements. How did you stop the docker ? Thanks again !
@Bastibilly
@bglnelissen , thanks for these elements. How did you stop the docker ? Thanks again !
I might just have done a ps ax
and killed it using its PID.
Hi,
I followed those steps but get into an error and can t manage to update the firmware.
bisol@bisolpc001:~/cc2538-bsl$ ls -la /dev/serial/by-id/
total 0
drwxr-xr-x 2 root root 60 ian 6 08:44 .
drwxr-xr-x 4 root root 80 ian 6 08:44 ..
lrwxrwxrwx 1 root root 13 ian 6 08:44 usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220811190441-if00 -> ../../ttyACM0
bisol@bisolpc001:~/cc2538-bsl$ sudo python3 cc2538-bsl.py -ewv -p /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220811190441-if00 --bootloader-sonoff-usb ./CC1352P2_CC2652P_launchpad_coordinator_20220219.hex
sonoff
Opening port /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220811190441-if00, baud 500000
Reading data from ./CC1352P2_CC2652P_launchpad_coordinator_20220219.hex
Firmware file: Intel Hex
Connecting to target...
ERROR: Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)'
bisol@bisolpc001:~/cc2538-bsl$
Also tried using /dev/ttyACM0 but same result
Any idea what I can do ? Thanks a lot
P.S. Doing this on a fresh ubuntu installation and no docker present there...
Hi,
I followed those steps but get into an error and can t manage to update the firmware.
bisol@bisolpc001:~/cc2538-bsl$ ls -la /dev/serial/by-id/
total 0
drwxr-xr-x 2 root root 60 ian 6 08:44 .
drwxr-xr-x 4 root root 80 ian 6 08:44 ..
lrwxrwxrwx 1 root root 13 ian 6 08:44 usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220811190441-if00 -> ../../ttyACM0
bisol@bisolpc001:~/cc2538-bsl$ sudo python3 cc2538-bsl.py -ewv -p /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220811190441-if00 --bootloader-sonoff-usb ./CC1352P2_CC2652P_launchpad_coordinator_20220219.hex
sonoff
Opening port /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220811190441-if00, baud 500000
Reading data from ./CC1352P2_CC2652P_launchpad_coordinator_20220219.hex
Firmware file: Intel Hex
Connecting to target...
ERROR: Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)'
bisol@bisolpc001:~/cc2538-bsl$
Also tried using /dev/ttyACM0 but same result
Any idea what I can do ? Thanks a lot
P.S. Doing this on a fresh ubuntu installation and no docker present there...
I had similar issues when an other instance trying to use the dongle. Try to figure out who/what is using the dongle.
To those, who see ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2 (note V2 in the end), I guess you have ZBDongle-E model, which is based on a different chip (EFR32MG21). Obviously, you should not try to flash it with CC2652P image. Please refer to https://community.home-assistant.io/t/itead-s-sonoff-zigbee-3-0-usb-dongle-plus-v2-model-zbdongle-e-based-on-silicon-labs-efr32mg21-20dbm-radio-mcu-now-sold-for-19-99/442695
To those, who see ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2 (note V2 in the end), I guess you have ZBDongle-E model, which is based on a different chip (EFR32MG21). Obviously, you should not try to flash it with CC2652P image. Please refer to https://community.home-assistant.io/t/itead-s-sonoff-zigbee-3-0-usb-dongle-plus-v2-model-zbdongle-e-based-on-silicon-labs-efr32mg21-20dbm-radio-mcu-now-sold-for-19-99/442695
And may I add something : to those trying to flash this V2 version of the SONOFF dongle because of issues with zigbee2mqtt in home assistant, just add "adapter : ezsp" to your configuration file and it will work :
data_path: /config/zigbee2mqtt socat: enabled: false master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777 slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5 options: "-d -d" log: false mqtt: server: mqtt://core-mosquitto:1883 user: mqtt_user password: *********** serial: port: /dev/ttyACM0 adapter: ezsp home_assistant: true permit_join: false frontend: true