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
  • (Fwiw, I'm the pyOCD maintainer.)

    I can confirm Johnas' issues. The nrf91xx.flm flash algo from NordicSemiconductor.nRF_DeviceFamilyPack.8.44.1.pack seems to be broken. It doesn't work in either Arm MDK or pyOCD (both use the same FLM algos).

    The flash algo seems to hang the device when performing a chip or sector erase. Specifically, the MEM-AP transaction to read DHCSR times out whilst waiting for the erase operation to complete (too many WAIT responses). At least this is what happens with pyOCD, and its flash load implementation is very similar to MDK's.

    It appears the flash algo needs to be fixed by Nordic.

Reply
  • (Fwiw, I'm the pyOCD maintainer.)

    I can confirm Johnas' issues. The nrf91xx.flm flash algo from NordicSemiconductor.nRF_DeviceFamilyPack.8.44.1.pack seems to be broken. It doesn't work in either Arm MDK or pyOCD (both use the same FLM algos).

    The flash algo seems to hang the device when performing a chip or sector erase. Specifically, the MEM-AP transaction to read DHCSR times out whilst waiting for the erase operation to complete (too many WAIT responses). At least this is what happens with pyOCD, and its flash load implementation is very similar to MDK's.

    It appears the flash algo needs to be fixed by Nordic.

Children
No Data
Related