Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeouts are set too short for flashing over LAN. #137

Open
Steltek opened this issue Jun 8, 2023 · 0 comments
Open

Timeouts are set too short for flashing over LAN. #137

Steltek opened this issue Jun 8, 2023 · 0 comments

Comments

@Steltek
Copy link

Steltek commented Jun 8, 2023

Trying to update the firmware on a Zigstar PoE (Zigbee 2 LAN coordinator) and it kept failing with a timeout at various addresses:

server:/swdownloads/cc2538-bsl/cc2538-bsl-master# python3 cc2538-bsl.py -p socket://zigstargw.local:6638 -b56000 -evw /Downloads/CC1352P2_CC2652P_launchpad_coordinator_20230507.hex
Opening port socket://zigstargw.local:6638, baud 56000
Reading data from /Downloads/CC1352P2_CC2652P_launchpad_coordinator_20230507.hex
Firmware file: Intel Hex
Connecting to target...
CC1350 PG2.0 (7x7mm): 352KB Flash, 20KB SRAM, CCFG.BL_CONFIG at 0x00057FD8
Primary IEEE Address: 00:XX:XX:XX:XX:XX:XX:XX
Performing mass erase
Erasing all main bank flash sectors
ERROR: Timeout waiting for ACK/NACK after 'Get Status (0x23)'

server:/swdownloads/cc2538-bsl/cc2538-bsl-master# python3 cc2538-bsl.py -p socket://zigstargw.local:6638 -evw /Downloads/CC1352P2_CC2652P_launchpad_coordinator_20230507.hex
Opening port socket://zigstargw.local:6638, baud 500000
Reading data from /Downloads/CC1352P2_CC2652P_launchpad_coordinator_20230507.hex
Firmware file: Intel Hex
Connecting to target...
CC1350 PG2.0 (7x7mm): 352KB Flash, 20KB SRAM, CCFG.BL_CONFIG at 0x00057FD8
Primary IEEE Address: 00:XX:XX:XX:XX:XX:XX:XX
Performing mass erase
Erasing all main bank flash sectors
Erase done
Writing 360448 bytes starting at address 0x00000000
ERROR: Timeout waiting for ACK/NACK after 'Get Status (0x23)'

I ended up going through the code and doubling (or tripling) all of the timeout values (from 2 to 4 or 8, ...) and it worked straight away after that:

server:/swdownloads/cc2538-bsl/cc2538-bsl-master# python3 cc2538-bsl.py -p socket://zigstargw.local:6638 -evw /Downloads/CC1352P2_CC2652P_launchpad_coordinator_20230507.hex
Opening port socket://zigstargw.local:6638, baud 500000
Reading data from /Downloads/CC1352P2_CC2652P_launchpad_coordinator_20230507.hex
Firmware file: Intel Hex
Connecting to target...
CC1350 PG2.0 (7x7mm): 352KB Flash, 20KB SRAM, CCFG.BL_CONFIG at 0x00057FD8
Primary IEEE Address: 00:XX:XX:XX:XX:XX:XX:XX
Performing mass erase
Erasing all main bank flash sectors
Erase done
Writing 360448 bytes starting at address 0x00000000
Write 104 bytes at 0x00057F988
Write done
Verifying by comparing CRC32 calculations.
Verified (match: 0xe83aa727)
server:/swdownloads/cc2538-bsl/cc2538-bsl-master#

Perhaps the timeouts could automatically be extended when a network connection is used instead of a local serial one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant