nrf52833(QFN) cannot be flashed. cannot debug.

I have a nrf52833 small board.  nrf52833 QFN

and the several board have the same finding:
at first time, the board can be flash and be debugged to main entrance.

but , afterwards. I cannot flash and even debug the board.

-- west flash: using runner nrfutil
-- runners.nrfutil: reset after flashing requested
-- runners.nrfutil: Flashing file: E:\Nordic\bluetoothproj\build\merged.hex
Error: One or more batch tasks failed:
* 1050635330: Device error: Setting the debug port SELECT register failed while powering up sys and debug regions (Unknown Error in J-Link DLL (error code =-1)).

This might indicate that the debug port is unavailable. Please double-check device power supply and SWD lines, and that SWD isn't disabled (Generic)

FATAL ERROR: command exited with status 1: nrfutil --json device x-execute-batch --batch-path 'E:\Nordic\bluetoothproj\build\generated_nrfutil_batch.json' --serial-number 1050635330

* The terminal process terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.

once upon a time. I debugging in the code. but suddenly, it report debugging stoped.  

so, my question is : why the firsttime, the debugger can debug the board but afterwards. it always failed.

and the recovery and reset command would fail too.

nrfjprog --reset -f NRF52
[error] [ Worker] - An unknown error.
[error] [ Client] - Encountered error -102: Command read_device_info executed for 158 milliseconds with result -102
[error] [ Client] - Encountered error -102: Command read_memory_descriptors executed for 45 milliseconds with result -102
Failed to read device memories.[error] [ Worker] - An unknown error.

ERROR: JLinkARM DLL reported an error. Try again. If error condition
ERROR: persists, run the same command again with argument --log, contact Nordic
ERROR: Semiconductor and provide the generated log.log file to them.
NOTE: For additional output, try running again with logging enabled (--log).
NOTE: Any generated log error messages will be displayed.

  it looks the chip is recongized.

how can this occur?  how to run out of this trouble.

the following is my design: 

thanks.

Parents
  • Hi,

    Can you share a schematic or drawing which pins are connected to the programmer? If you are supplying the target board separately, then you need to provide the VDD supply of the board to the programmer as well (VTref).

    If your custom board does not have a 32.768 kHz crystal but the firmware after first time programing expects it, the app can hang in standalone mode but can run under debugger.

    Best regards,
    Ressa


  • I use 52833 DK as debugger.  (my board have no 32k osc)
    connet my own board by (swd swclk vcc gnd) (4 lines). it works well on other 52833 board( I buy from other company)
    I try all the 5 board. they have the same issue:
    at first try, It will run into main function. I cannot find any issue.
    and afterwards. I try and try, but it cannot run into main function. it looks it loss the connect to the board.

    another board have such problem: flash ok. but loss connection immedialtely.

    flash image done, but loss connection with no error.

  • Hi,

    Thanks for clarification. So you have one board (bought from different company) that works fine in all situation , is that correct? Does this board have 32kHz oscillator ? 

    Also for programming a custom board using DK debug out port, the minimum connections are as follow:  pins 1 (VTref), 2 (SWDIO), 4 (SWDCLK), and 5 (GND).
    *Pin 3 (SWD0_SELECT) is used for debug out selection and should be connected to GND on the target board for proper operation on some DKs.
    *For reliable operation, also connect pin 10 (RESET) if available.


    If you cannot add an external 32kHz crystal to your boards, then try to change the configuration to use internal 32kHz crystal. 
     in your prj.conf make sure to have below lines:

    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n

     Also if the board is unresponsive try to recover it by this command:

    nrfjprog --recover -f nrf52

     or 

    nrfutil device recover --serial-number <SERIAL_NUMBER>

    and find serial number with:

    nrfutil device list --traits jlink


    Best regards,
    Ressa

  • the third party board (works well) have no 32k oscillator either.
    Pin 3 (SWD0_SELECT).  what do you mean by Pin3?  I cannot find any pin in the QDAA chip

    and I do not change any thing when I try third part board(works well QIAA) and my own board(QDAA)
    for the reset pin, I make it unconnected. 

  • Hi,

    By SWD0_SEL I mean the below pin on Debug out connector of nRF52833 DK:



    It should be connected to the ground on your target board (your own board). By doing that, DK can recognize that there is an external board connected to the DK. 

  • for QFN40 NRF52833. 
    the swd and swclk is specific pin (19,20)
    and the reset pin is P0.18/reset   (16)
    is it true?
    I should make sure this is right.

Reply Children
Related