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

Can no longer connect a module to J-Link after downloading firmware

I’m developing a wireless sensor based on MINEW nRF52832 modules.

I use SDK 16 and SEGGER embedded studio.

The target is powered by a 3.6V Lithium Thionil battery via a Power Profiler Kit.

Sometimes during development I noticed the following problem: after loading code in a module it no longer responds. If then I try to connect the module I have the following response from J-Link probe : “Failed to connect to target. No IdCode detected”.

I think this happens when I try to program a module that is in Power-Off mode. Note: there is no component connected to the reset pin.

If this is really the cause of the problem, is there a way to recover the failed modules?

  • Hi

    You should be able to wake up the devices by providing power to the device, either to VDD or the pin(s) that are set as the wake-up source. When the chip is in system ON mode, you should be able to run the nrfjprog --recover or nrfjprog --eraseall call using the nRF Command Line Tools in order to either recover the device or to erase the entire flash memory.

    A common issue seen when using third party modules is that they don't come with the external LF clock, that all our SDK examples configure by default, so in order to run example projects on these modules, you need to edit the following defines in the sdk_config.h header file to use the internal RC oscillator instead.

    // <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

    Best regards,
    Simon

Related