This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Programming nRF9160 modem firmware with a stand-alone SEGGER J-Link

I have a PCB containing an nRF9160 using a SEGGER J-Link. I am able to update the application firmware at will using a variety of tools but if I use nRF Connect v3.2.0 to run Programmer v1.2.3 and select the J-Link device, the software hangs.

As far as I am aware, nRF Connect / Programmer is the only supported way to update the modem firmware, so how can I get new modem firmware on my PCB?

I have tried using an nRF9160-DK but I was unable to get the board to detect the external target.

I did also try nrf9160_mdm_dfu but that stopped working with the 1.0.0 release, giving a the error:

ERROR: Missing file: firmware.update.image.hex

Kind regards,

Jonathan

Parents
  • As MJD093 points out, it could be an issue with how you have connected the custom device to the programmer.

    As far as I am aware, nRF Connect / Programmer is the only supported way to update the modem firmware

    It's also possible to use a python script with pynrfjprog to flash the modem. 

    You might need to run pip3 install pynrfjprog -U before testing this.

    Simple example:

    #!/usr/bin/env python3
    #
    # Copyright (c) 2019 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
    
    
    from pynrfjprog import HighLevel
    api = HighLevel.API()
    api.open()
    snr = api.get_connected_probes()
    for s in snr:
        probe = HighLevel.IPCDFUProbe(api, s, HighLevel.CoProcessor.CP_MODEM)
        probe.program("mfw_nrf9160_1.0.1.zip")
        probe.verify("mfw_nrf9160_1.0.1.zip")
        print("Done")
     
    api.close()

    With threading[experimental]

    #!/usr/bin/env python3
    #
    # Copyright (c) 2019 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
    
    from pynrfjprog import HighLevel
    import threading
     
    class myThread (threading.Thread):
       def __init__(self, threadID, name, counter):
          threading.Thread.__init__(self)
          self.threadID = threadID
          self.name = name
          self.counter = counter
       def run(self):
          print ("Starting " + self.name)
          update_fw(self.name)
          print ("Exiting " + self.name)
     
    def update_fw(snr):
        print("updating FW in {}".format(snr))
        probe = HighLevel.IPCDFUProbe(api, int(snr), HighLevel.CoProcessor.CP_MODEM)
        print("{} probe initialized". format(snr))
        probe.program("mfw_nrf9160_1.0.1.zip")
        print("{} programmed".format(snr))
        probe.verify("mfw_nrf9160_1.0.1.zip")
        print("{} verified".format(snr))
     
    # Create new threads
    api = HighLevel.API()
    api.open()
    devices = api.get_connected_probes()
    threads = list()
    for idx, device in enumerate(devices):
        threads.append(myThread(idx, device, idx))
     
    # Start new Threads
    for thread in threads:
        thread.start()
     
    print("waiting for all threads to complete")
    #wait for threads to finish
    for t in threads:
        t.join()
     
    api.close()
    print("Exiting Main Thread")

Reply
  • As MJD093 points out, it could be an issue with how you have connected the custom device to the programmer.

    As far as I am aware, nRF Connect / Programmer is the only supported way to update the modem firmware

    It's also possible to use a python script with pynrfjprog to flash the modem. 

    You might need to run pip3 install pynrfjprog -U before testing this.

    Simple example:

    #!/usr/bin/env python3
    #
    # Copyright (c) 2019 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
    
    
    from pynrfjprog import HighLevel
    api = HighLevel.API()
    api.open()
    snr = api.get_connected_probes()
    for s in snr:
        probe = HighLevel.IPCDFUProbe(api, s, HighLevel.CoProcessor.CP_MODEM)
        probe.program("mfw_nrf9160_1.0.1.zip")
        probe.verify("mfw_nrf9160_1.0.1.zip")
        print("Done")
     
    api.close()

    With threading[experimental]

    #!/usr/bin/env python3
    #
    # Copyright (c) 2019 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic
    
    from pynrfjprog import HighLevel
    import threading
     
    class myThread (threading.Thread):
       def __init__(self, threadID, name, counter):
          threading.Thread.__init__(self)
          self.threadID = threadID
          self.name = name
          self.counter = counter
       def run(self):
          print ("Starting " + self.name)
          update_fw(self.name)
          print ("Exiting " + self.name)
     
    def update_fw(snr):
        print("updating FW in {}".format(snr))
        probe = HighLevel.IPCDFUProbe(api, int(snr), HighLevel.CoProcessor.CP_MODEM)
        print("{} probe initialized". format(snr))
        probe.program("mfw_nrf9160_1.0.1.zip")
        print("{} programmed".format(snr))
        probe.verify("mfw_nrf9160_1.0.1.zip")
        print("{} verified".format(snr))
     
    # Create new threads
    api = HighLevel.API()
    api.open()
    devices = api.get_connected_probes()
    threads = list()
    for idx, device in enumerate(devices):
        threads.append(myThread(idx, device, idx))
     
    # Start new Threads
    for thread in threads:
        thread.start()
     
    print("waiting for all threads to complete")
    #wait for threads to finish
    for t in threads:
        t.join()
     
    api.close()
    print("Exiting Main Thread")

Children
No Data
Related