Programming nRF9160 with DAPLink programmer

I am attempting to program/debug an nRF9160 with a CMSIS-DAP programming adapter (not a Segger JLink adapter). Debugging seems to be fully functional. However, any attempts at programming the device are unsuccessful and the tools I use are ARM Cortex M33/ARMv8 aware. I've tried using Keil's Mbed (uVision) and pyOCD. Both debug with full functionality. In terms of programming the device, neither tool works. I have been able to erase the chip by manually manipulating the correct registers. I've also been on the pyOCD forum and I'm told that the algorithm used by Nordic to erase/program the nRF9160 may be the problem. 

I've attempted these activities on three boards: nRF9160DK, Thingy:91, my own board.

Please advise.

Thanks,

Johnas

Parents
  • Any new info on this? I'd really like to be able to use something other than a thousand dollar Segger to debug.

    It looks like the people at https://github.com/probe-rs/probe-rs are close, and have an open issue concerning the nRF91, but I was not able to flash the 91 myself with it. I was able to erase its flash, though.

  • I've got it working, but using various hacks. I'm writing a command line tool on top of probe-rs that will allow you to easily unlock/erase/flash the nrf9160.

    The key part is that to do a mass-erase you should unlock the chip...because the current flash-loader firmware has the mass-erase bug in it. I'll check up on the progress of that getting fixed...

    Currently my tool doesn't flash a hex file yet...but I'll work on that next week. You can use my tool to unlock it, then probe-rs-cli to flash.

    https://github.com/narwo/dbug-cli

Reply Children