This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Reset cc-debugger from software

Other Parts Discussed in Thread: CC2540, CC-DEBUGGER, CC2510, CC2511, CC2530

Hi

I'm in the process of developing production/testing equipment for a cc2540 BLE product.

I'm planing on using the cc-debugger for flashing the firmware but there is one bottleneck I want to come around.

If  the testrigg is powered up before a board is attached to it the CC-Debugger will shine red and when a board is

attached it wont flash it until the reset button on the CC-Debugger is pressed and the led shines green.

Is there a way to initiate this reset from software, I'm using the SmartRFProgConsole tool.

Or will I have to add an external relay to toggle this button?

Best Regards

Joakim Arnsby

  • Hi Joakim,

    did you manage to solve the issue? I have the same problem..

    Best regards,

    Dejan.

  • No I couldn't find a software solution. I had to use an externally controlled relay in my testrigg to trigger the reset.

    /Joakim

  • Hi,

    One workaround is to connect the first product to the CC Debugger and let it detect the device (LED is green). You can hotswap the consequent products to the CC Debugger without resetting it.

    Br,
    ABO 

    --
    PS. Thank you for clicking  Verify Answer  below if this answered your question!

  • Hi

    I tested that method at first but noticed that in some cases when a new board was being mounted the cc-debugger changed state and required a reset.

    I'm not sure if this was due to the order the pins got connected as I was using a testbed with spring loaded pins? Is there a recommended sequence?

    Also why does the entire MCU in the cc-debugger need to be restarted for it do detect a new device?

    This reset gives an additional delay when the computer has to re-enumerate the usb-device.

    /Joakim

  • Hi,

    There's no recommended sequence for connecting the DUT to the CC Debugger, but starting with GND is always a good idea.

    I have to come back to you with regards to whether there is a better solution/possible to redetect a device without physically pushing the CC debugger reset button.

    Br,
    ABO

     

  • Hi again,

    See the next post for the updated version of sw_redetect!

    It is possible to do a software triggered chip re-detect. It is not available from e.g. the SmartRF Flash Programmer, so I made a small tool that performs a chip re-detect of the first CC Debugger, Smart04EB, SmartRF05EB or SmartRF TrxEB it detects.

    The tool is very simple, and I'll add possibility to specify device ID.

    1. Simply run the sw_redetect.exe (you must rename it in the zip)
    2. If you add any argument, it will list the devices it detects (the redetect is done on index 0) 

    Br,
    ABO 

    sw_redetect.zip
  • A new version of sw_redetect is out, please see post further down!

    sw_redetect updated to support DIDs.

    From readme.txt

    /******************************************************************************
    * ABOUT
    */
    sw_redetect forces a chip re-detect by the EB with the specified DID. If no DID 
    is specified, the application will list all the found EBs and their DID.
    
    
    /******************************************************************************
    * HARDWARE REQUIREMENTS
    */
    SmartRF04EB, SmartRF05EB, CC debugger or SmartRF TrxEB with CEBAL-supporting 
    firmware.
    
    
    /******************************************************************************
    * EXAMPLE USE
    */
    //
    // List all connected devices
    //
    > sw_redetect.exe
    
    //
    // Force chip redetect on EB with DID (Device ID) 1234
    //
    > sw_redetect.exe 1234

    Br,
    ABO

    sw_redetect_25345.zip
  • Thanks!

    That is exactly what I need!

    Best regards,

    Dejan.

  • Thanks TIABO for the utility.

    When i tried to reset the device using the utility i got the error as "No new chip detected, or chip detect failed."

    The device doesn't restart after that. Pressing the reset on the cc debugger does the job.

    Can you please help us where is it getting stuck and not resetting the device?

    Regards,

    Shriharsh

  • Hi Shriharsh,

    My apologies for the delayed response.

    The message means that
    (a) no chip was detected (i.e. the CC Debugger LED is red),
    (b) no new chip is detected (i.e. no change in chip type detected. E.g. a CC2540 is still connected to the CC Debugger) or
    (c) something failed during chip detect

    The latter (c) is very rare. (a) and (b) aren't errors, but the driver abstracts cases and only returns sucess or fail in all three cases.

    Hope this helps.

    Br,
    ABO 

  • Thanks TIABO for the reply.

    Can i reset the device (DUT connected to CC debugger) using this utility?

    We want to reset the debugger & reset the device also using some command line utility.

    Can you suggest any solution for same?

    Regards,

    Shriharsh

  • The sw_redetect utility resets the DUT connected to the debugger, not the CC Debugger itself.

    Br,
    TIABO 

  • I also felt the same things that the DUT would reset using this utility.

    But somehow i don't see the DUT getting reset when i observe this error returned from the utility.

    Device was resetting properly when the utility worked without error (this happened only once or twice).

    Henceforth when tried using this utility again; it return the error prints and the device doesn't reset. :(

    Need some inputs.

    Regards,

    Shriharsh

  • Hello TIABO,

    Below is detailed description of what i observe.

    Working scenario,

    Device is connected to CC debugger and the CC debugger LED is RED. When i run the sw_redetect the CC debugger and device both reset properly. Utility return "Program done OK".

    NonWorking scenario,

    Device is connected to CC debugger and the CC debugger LED is GREEN. When i run the sw_redetect the CC debugger remains GREEN and device doesn't reset properly. Utility return "No new chip detected, or chip detect failed".

    Can you please change the utility to reset the device even if the CC debugger LED is GREEN?

    Or else can you share the utility so that we can do the relevant changes to it and use the same?

    Email id: shriharsh.datar@mavensystems.com

    Request you to please help us with this device reset from utility.

    Regards,

    Shriharsh

  • Hi,

    I observed the same issue. 

    Attached is a new version of sw_redetect (v1.1). After the redetect, it resets the device connected to the debugger if any.

    Hope this helps!

    Br,
    TIABO 

    sw_redetect_1_1.zip
  • Hello TIABO,

    New utility is working perfect. :)

    Thank you so much for the help.

    Regards,

    Shriharsh

  • Hello Tiabo,

    Is there any chance this functionality could be added into the Smart RF Flash Programmer CMD tool (SmartRFProgConsole.exe )?  This would be extremely useful for production and would be better than having to use this "unofficial" sw_redetect.exe.

    Thanks,

    Ryan

  • Ryan,

    I will file a feature request for this on the SmartRF Flash Programmer.

    Br,
    TIABO.

  • Thanks, That is greatly appreciated.  I hope to see it added in the future.

  • Hello TAIBO,

    Really appreciate that the reset utility to be incorporated in the command line utility itself.

    But for our production purpose to integrate the same thing in our application can you send us the code for the resetting the programmer? That will really help us.

    Regards,

    Shriharsh

  • Hi,

    I don't think we have the right licenses to release the source code. I will have to look into it.

    Edit: It should be possible to run the command line utility from your production test ...?

    Br,
    TIABO 

  • Hi,

    Is sw_redetect still working with latest CC debugger firmware ?
    I'm trying it, looks like resets CPU, but keeps it that way, firmware is not started.
  • Nikola, what hardware are you using, and what firmware version do you have?

    Edit: As far as I know, there are no changes that should suggest this won't work anymore. 

  • I`m using CC2510 on custom board with CC debugger, EB firmware ID=05CC EB firmware rev=0044.
  • I tested with sw_redetect (v1.1) and a CC debugger (fw rev. 0044) connected to a CC2510CC2511. I'm able to reset it as.

    However, when using a SmartRF05EB (fw rev. 0044) connected to a CC2530, the device does not appear to be reset in the same way. I will have to look at this a bit further.

    TIABO 

  • Hi TIABO,

    Any progress ? I will really appreciate your help, since we need this for production.


    Regards,
    Nikola Gmajnic