This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

JLink wont connect after bootloader program

Using Segger with PCA10056 as a debugger connected to a pcb with a NRF52840 on it. Been working fine and I tried building open bootloader and programmed it. I see the device as a com port now and its visible with nrfconnect. I can no longer connect to it with jlink though. Error says no idcode detected. How do I get this back to a state where I can debug my app again with jlink? 

Parents
  • Hi

    Just to clarify, is the board that's connected to the DK J-Link debugger a Fanstel BT840 based board? Keep in mind that it needs to be powered, as the debug cable won't be able to power external devices "by itself".

    I think the Fanstel boards don't have an external LF clock by default, have you mounted this onto the Fanstel board? If not, you will have to configure the project on your Fanstel board you have to use the internal RC oscillator instead of the external LF clock which is set by default. This can be done by changing the following defines in sdk_config.h:

    // <h> Clock - SoftDevice clock configuration
    
    //==========================================================
    // <o> NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.
     
    // <0=> NRF_CLOCK_LF_SRC_RC 
    // <1=> NRF_CLOCK_LF_SRC_XTAL 
    // <2=> NRF_CLOCK_LF_SRC_SYNTH 
    
    #ifndef NRF_SDH_CLOCK_LF_SRC
    #define NRF_SDH_CLOCK_LF_SRC 0
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
    #ifndef NRF_SDH_CLOCK_LF_RC_CTIV
    #define NRF_SDH_CLOCK_LF_RC_CTIV 16
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
    // <i> How often (in number of calibration intervals) the RC oscillator shall be calibrated
    // <i>  if the temperature has not changed.
    
    #ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
    #define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_ACCURACY  - External clock accuracy used in the LL to compute timing.
     
    // <0=> NRF_CLOCK_LF_ACCURACY_250_PPM 
    // <1=> NRF_CLOCK_LF_ACCURACY_500_PPM 
    // <2=> NRF_CLOCK_LF_ACCURACY_150_PPM 
    // <3=> NRF_CLOCK_LF_ACCURACY_100_PPM 
    // <4=> NRF_CLOCK_LF_ACCURACY_75_PPM 
    // <5=> NRF_CLOCK_LF_ACCURACY_50_PPM 
    // <6=> NRF_CLOCK_LF_ACCURACY_30_PPM 
    // <7=> NRF_CLOCK_LF_ACCURACY_20_PPM 
    // <8=> NRF_CLOCK_LF_ACCURACY_10_PPM 
    // <9=> NRF_CLOCK_LF_ACCURACY_5_PPM 
    // <10=> NRF_CLOCK_LF_ACCURACY_2_PPM 
    // <11=> NRF_CLOCK_LF_ACCURACY_1_PPM 
    
    #ifndef NRF_SDH_CLOCK_LF_ACCURACY
    #define NRF_SDH_CLOCK_LF_ACCURACY 1
    #endif

    If the Fanstel board seems "lifeless" you can try calling using the  nrfjprog --eraseall call from the nRF Command Line Tools to erase the flash memory.

    Best regards,

    Simon

  • Thanks the nrfprog --eraseall commands brought it back to life. 

Reply Children
No Data
Related