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? 

  • Hi

    I'm sorry, what device is it that you've put into bootloader mode and that is now visible as a COM port? Have you put the DK into the BOOT mode by holding the IF BOOT/RESET button on the DK? In that case you will have to flash the Interface MCU firmware back onto the DK by dragging and dropping the .bin file downloadable here into the BOOTLOADER window that pops up when powering up the DK.

    Best regards,

    Simon

  • The device I cant connect to is a fantel BT840 which has a nrf52840 ic in it. I was trying to test the open bootloader. I can see the device in device manager and it connects with nrfConnect. I am not trying to alter anything on the DK board. That works fine and I am able to connect to a different BT840 with it. Just trying to bring my first DK840 back to life. 

  • Not sure if it was clear, but I am using the DK board jlink debugger to hook up to a another board through the debug out connector on the DK board. 

  • 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. 

Related