JelmerT / cc2538-bsl

Python cross-platform script to upload firmware via the serial boot loader onto the CC13xx, CC2538 and CC26xx SoC.
BSD 3-Clause "New" or "Revised" License
527 stars 182 forks source link

Flashing z-stack examples fail with error "Timeout waiting for ACK/NACK after 'Get Status (0x23)'" #112

Open Caian opened 3 years ago

Caian commented 3 years ago

I'm having the following error when trying to flash z-stack examples that I compiled using IAR:

Writing 524256 bytes starting at address 0x00200000
Write 232 bytes at 0x0027FEF88
ERROR: Timeout waiting for ACK/NACK after 'Get Status (0x23)'

On the other hand, firmwares that I find online, like this one: https://github.com/jethome-ru/zigbee-firmware flash just fine. I've tried cc2538-bsl.py -p /dev/serial0 -w <firmware> and cc2538-bsl.py -p /dev/serial0 -e -v -w <firmware> with both raw binaries and intel hex. The result is always the same.

I'm using a cheap cc2538 + cc2592 board that I wired to a raspberry pi and I'm using openocd to reset it back to bootloader mode.

JelmerT commented 2 years ago

That's an odd place for it to error out. What I'm suspecting is that you're writing to a memory address that the chip is not very happy with and then stops responding. Does your firmware work if you flash it via jtag?

Caian commented 2 years ago

Yes, I've managed to find a custom build of OpenOCD that flashes and verifies it just fine. I've also tried to reduce the baud to 9600 with no success.

I tested basic stuff in the program, like simple IO and UART, but I can't fully confirm that the flash was a success because it was meant to be used with a developer board.

jeroenvdd commented 2 years ago

I now get exactly the same unfortunately (with the default baudrate) but it worked once i used the lower one