Error flashing custom board w/ nRF52832 (unable to read)

I'm trying to flash a custom board (schematics in this ticket - Schematic/Layout review request) using a Jlink EDU mini and keep running into an error message saying it's failing to read or erase memory. I've seen suggestions on other posts that running nrfjprog --recover can remove the read protection mechanism, but when I ran that (with --log, which I've attached) it also failed.

 

4274.log.log

I've had the flash process succeed sometimes, but the board doesn't act any differently to before (can't control the GPIO) so I'm assuming that's another issue.

Any ideas for what could be causing this?

Thanks

  • So for this action (I think it's --debugreset based on this) that's not being allowed, is there another reason why the command would fail other than being an Engineering A device? Because it should work otherwise, right?

    I did try reading the registers and I don't have access to the RESETREAS register (or a lot of other ones by the look of it), so no help on that front.

    For the connections to the board, I'm a bit stuck on how the Jlink can return what the chip is if there's some issue with the SWD lines, unless it reads that back in a different way than I'm aware of. That seems like pretty good proof that the IC is properly connected.

    And my above thought was possibly confirmed when I tried running the same command from the log file with a --clockspeed 10 added to it. That completed with no errors (took ages though), and then same with --clockspeed 100. I then tried the "flash" through the VSCode extension, which should be the same command that failed previously and it worked. Not sure what the difference might be now, but there are also now progress bars for each step that weren't there before (Still on v10.24.2 of nrfjprog).

    There are still intermittent issues with programming where it says it's unable to read memory (below), but it probably works 70% of the time now (there is a separate issue of the program seeming to stall once it gets to a delay but that seems unrelated)

  • Hi

    Glad to hear it works most of the time now. I still think there is some connection issue somewhere on your board. Not necessarily the SWD lines, but a VDD line or something on the nRF that is having an iffy connection due to the J-Link being mostly good but sometimes failing to read. Do you see this on more than just one board on your end?

    As for the --readregs command you need to input the specific register you want to read to not just get these default registers. Use the nRF52832 product specification for reference here: https://docs.nordicsemi.com/bundle/ps_nrf52832/page/power.html#d935e3470 

    Best regards,

    Simon

  • Hey,

    I've only assembled 2/5 boards I had made but they do both exhibit this issue. I'll try the others this week, hopefully they're different.

    For the --readregs command, if I add the specific register it returns a similar error about failing to read memory

Related