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 Reply Children
  • Updating the LTE modem turns out to be easy using a Python script:

    from pyocd.target.family.target_nRF91 import ModemUpdater
    from pyocd.core.helpers import ConnectHelper
    from pyocd.flash.file_programmer import FileProgrammer
    
    with ConnectHelper.session_with_chosen_probe(options = {"frequency": 4000000, "target_override": "nrf9160_xxaa"}) as session:
        ModemUpdater(session).program_and_verify("mfw_nrf9160_1.3.5.zip")
    

    Not sure how to do that from the command line though.

Related