Bricked MCU?

Hi, we've a custom board with an nRF52820 chip on, and are just at the start of bringing the board up.

Previously we've been developing our code on the nRF52822DK, and doing ok.

We had a blinky program, and I'd managed to flash that onto the custom board, and was starting to probe if it was actually running, but now I can't connect to the target board.

We're using a Jlink base to program and debug, and the SWD interface (with the reset line connected), and the target's getting a good 3.0V supply to the target.

We've been using VS code and have tried resetting and erasing the board, but get an error like:

-- west flash: using runner nrfjprog
-- runners.nrfjprog: Flashing file: /Users/nRFprojects/220905//build_P/zephyr/zephyr.hex
[error] [ Client] - Encountered error -102: Command read_device_info executed for 133 milliseconds with result -102
[error] [ Worker] - An unknown error.
[error] [ Client] - Encountered error -102: Command read_memory_descriptors executed for 31 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.
FATAL ERROR: command exited with status 33: nrfjprog --program /Users/nRFprojects/220905/build_P/zephyr/zephyr.hex --sectoranduicrerase --verify -f NRF52 --snr 51028748

As suggested, I've tried running that with the --log option but it says:

FATAL ERROR: runner nrfjprog received unknown arguments: ['--log']

I'm updating to the 2.5 toolchain now, but don't expect that'll help, so any help or advice on how to unbrick the board would be very much appreciated!

Alex

Parents Reply
  • Hi Håkon, thanks for the suggestion, sadly that recover command doesn't seem to work:

    nrfjprog --recover -f nrf52 --log   
    Recovering device. This operation might take 30s.
    [error] [ Client] - Encountered error -21: Command recover executed for 131 milliseconds with result -21
    [error] [ Worker] - An unknown error.
    ERROR: Recover failed. Please make sure that the correct device family is given
    ERROR: and try again.

    Is there anything else I can try?

    Alex

Children
  • Hi again Håkon, a little bit of persistence and I've got it back working!

    I added the -c option to set the clock speed to 4kHz and that worked - maybe this means my board isn't be best layout?!

    nrfjprog -f NRF52 -c 4 --recover

    Thanks for your help, and I'm now going on to try the options about the LFCLK and DCDC convertor, but thought I'd let you know I'd made progress - thanks!

    Alex

  • Hi again Håkon, I reckon this might be the last post on this tonight, but I set the LFCLK option in the prj.conf file

    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y

    as you suggested, and I can now run my program (in debug) and connect to the board over Bluetooth, so thanks ever so much for your help!

    I'll do some research on how to set the board to run my code on boot, but thought I'd mark your answer as an answer, as with that config setting and

    nrfjprog -f NRF52 -c 4 --recover

    you've got me from a bricked board back to developing again, and that's brilliant, thank you!

    Alex

Related