[SOLVED] SRFPROG.exe sometimes stuck or crashed

You might have experienced this same issue, presented on e2e.ti.com forum, but TI has “locked” my thread without answer. Here’s how to solve that for a very fast and reliable flashing usable in production.

We are trying to use srfprog.exe to flash the CC2640R2F, and it gets stuck very often, on any step or any argument, under Win-10 64, and using the JTAG from LaunchXL-CC2640R2. Note that SmartRF Flash Programmer 2 also gets stuck or crashes sometimes. I believe for the same reason.

This, for example, is an output of srfprog where it got stuck and never returned:

srfprog -ls auto

Texas Instruments SmartRF Flash Programmer 2 v1.7.5-windows
-------------------------------------------------------------------------------

… stuck here.

Here is the solution that has been proven to get srfprog.exe to work reliably without crashing for flashing TI’s CC2640 BLE chip family:

  • Wrap the srfprog calls into another program. Let’s call this wrapper srfwrap.
  • srfwrap will detect output activity from srfprog.exe .
  • If srfprog.exe is doing it’s job, it just goes on.
  • If srfprog.exe crashes or gets stuck, srfwrap will kill srfprog and restart the last command. Until it is successfully done.
  • Using this technique, I have been able to reliably program CC2640R2F in production.
  • Combined with other tools, programming the CC2640R2F can be as fast as under 40 seconds per chip, including the MAC address, a Serial Number, and securely locking the JTAG for unwanted access.

I hope this helps, let me know in the comments 🙂

Jerome