pynrfprog v19.0 modem update

Hi,

As part of our end of line test for our product we are updating the modem to a more recent version. We are using the pynrfprog library for this.

Previously we were running v17.3 of the pynrfprog and noticed an issue where repetive programming sessions would cause the following error.

NrfApplication.py", line 165, in flash_application
api.write(segment.address, segment.data, True)
File "C:\Users\Spike\AppData\Local\Programs\Python\Python311\Lib\site-packages\pynrfjprog\LowLevel.py", line 879, in write
raise APIError(result, error_data=self.get_errors())
pynrfjprog.APIError.APIError: An error was reported by NRFJPROG DLL: -93 NOT_AVAILABLE_BECAUSE_TRUST_ZONE.

This would occur every other time (So it works correctly the first time, then would fail the next, then would work again etc.)

After updating to v19.0 it seemed to have fixed this issue but in the new software the modem updates no longer seem to work. We are using the following code: 

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(".\provisioning-python-script\mfw_nrf9160_1.3.3.zip")
    probe.verify(".\provisioning-python-script\mfw_nrf9160_1.3.3.zip")
    probe.close()
    print("Done")
api.close()

This results in the following error:

probe.program(".\provisioning-python-script\mfw_nrf9160_1.3.3.zip")
File "C:\Users\Spike\AppData\Local\Programs\Python\Python311\Lib\site-packages\pynrfjprog\HighLevel.py", line 388, in program
raise APIError(result, error_data=self.get_errors(), log=self._logger.error)
pynrfjprog.APIError.APIError: An error was reported by NRFJPROG DLL: -220 TIME_OUT.
[Probes.51025440] [SeggerBackend] JLinkARM.dll reported "-261", "Could not find supported CPU.".
extra: [Probes.51025440] [SeggerBackend] JLinkARM.dll reported "-261", "Could not find supported CPU.".
extra: [Probes.51025440] [SeggerBackend] JLinkARM.dll reported "-261", "Could not find supported CPU.".
extra: [Probes.51025440] [SeggerBackend] JLinkARM.dll reported "-261", "Could not find supported CPU.".
extra: [Probes.51025440] [SeggerBackend] JLinkARM.dll reported "-261", "Could not find supported CPU.".
extra: [Probes.51025440] [DebugProbe] Failed while programming device.
extra: [HighLevel] Failed programming the device.
extra: [Probes.51025440] [nRF91] Timeout, operation used more than 10 sec
extra: [Probes.51025440] [nRF91] Failed in wait for ack
extra: [Probes.51025440] [nRF91] Failed while waiting for program operation to finish.
extra: [Probes.51025440] [nRF91] Failed to upload file
extra: [Probes.51025440] [nRF91] Failed while programming package .\provisioning-python-script\mfw_nrf9160_1.3.3.zip.

The exact same script works fine on version 17.3.

Is there anything changed in the latest version which could cause this problem?

Kind regards,

Sebastiaan

Parents
  • I have the very same problem.

    - nRF command line tools 10.21.0

    - JLink software & documentation pack 7.86h

    - Python 3.10.6

    - pynrfjprog-10.19.0-py3-none-any.whl

    Device a: nRF9160 DK connected via its USB port -> works perfectly with any method

    Device b: nRF9160 SiP in our device connected via Segger JLink on its SWDIO/SWDCLK pins -> no way

    (One device connected at a time, of course)

    Both devices have the same version of SLM app installed. (Well, with blanked app it should do as well)
    The DK had MFW 1.3.3 installed before I tried and upgraded it to 1.3.4
    The SiP, since the MFW was never flashed successfully (while the app does), identifies with mfw-pti_nrf9160_1.1.5

    a) Using nrfjprog

    lamm@fonb038:~$ nrfjprog --log --verify --program mfw_nrf9160_1.3.4.zip
    [ #################### ] 0.000s | Finding image components - Finished
    [error] [ Client] - Encountered error -220: Command program_file executed for 10091 milliseconds with result -220
    [error] [ nRF91] - Failed to install bootloader
    [error] [ nRF91] - Failed to program bootloader file
    Timeout, operation used more than 10 seconds
    [error] [ Worker] - Timeout, operation used more than 10 seconds
    ERROR: Operation failed due to timeout. Check the log messages for more details.

    b) Using pynrfprog script like above

    lamm@fonb038:~$ ./mfw_prog.py mfw_nrf9160_1.3.4.zip
    Traceback (most recent call last):
      File "/home/lamm/mfw_prog.py", line 17, in <module>
        probe.program(firmware)
      File "/home/lamm/.local/lib/python3.10/site-packages/pynrfjprog/HighLevel.py", line 388, in program
        raise APIError(result, error_data=self.get_errors(), log=self._logger.error)
    pynrfjprog.APIError.APIError: An error was reported by NRFJPROG DLL: -220 TIME_OUT.
    [Probes.51022075] [SeggerBackend] JLinkARM.dll reported "-261", "Could not find supported CPU.".
        extra: [Probes.51022075] [SeggerBackend] JLinkARM.dll reported "-261", "Could not find supported CPU.".
        extra: [Probes.51022075] [SeggerBackend] JLinkARM.dll reported "-261", "Could not find supported CPU.".
        extra: [Probes.51022075] [SeggerBackend] JLinkARM.dll reported "-261", "Could not find supported CPU.".
        extra: [Probes.51022075] [SeggerBackend] JLinkARM.dll reported "-261", "Could not find supported CPU.".
        extra: [Probes.51022075] [DebugProbe] Failed while programming device.
        extra: [HighLevel] Failed programming the device.
        extra: [Probes.51022075] [nRF91] Timeout, operation used more than 10 sec
        extra: [Probes.51022075] [nRF91] Failed in wait for ack
        extra: [Probes.51022075] [nRF91] Failed while waiting for program operation to finish.
        extra: [Probes.51022075] [nRF91] Failed to upload file
        extra: [Probes.51022075] [nRF91] Failed while programming package /home/lamm/FB/nRF91/mfw_nrf9160_1.3.4.zip.

    c) nRF Connect Programmer v3.0.8:

Reply
  • I have the very same problem.

    - nRF command line tools 10.21.0

    - JLink software & documentation pack 7.86h

    - Python 3.10.6

    - pynrfjprog-10.19.0-py3-none-any.whl

    Device a: nRF9160 DK connected via its USB port -> works perfectly with any method

    Device b: nRF9160 SiP in our device connected via Segger JLink on its SWDIO/SWDCLK pins -> no way

    (One device connected at a time, of course)

    Both devices have the same version of SLM app installed. (Well, with blanked app it should do as well)
    The DK had MFW 1.3.3 installed before I tried and upgraded it to 1.3.4
    The SiP, since the MFW was never flashed successfully (while the app does), identifies with mfw-pti_nrf9160_1.1.5

    a) Using nrfjprog

    lamm@fonb038:~$ nrfjprog --log --verify --program mfw_nrf9160_1.3.4.zip
    [ #################### ] 0.000s | Finding image components - Finished
    [error] [ Client] - Encountered error -220: Command program_file executed for 10091 milliseconds with result -220
    [error] [ nRF91] - Failed to install bootloader
    [error] [ nRF91] - Failed to program bootloader file
    Timeout, operation used more than 10 seconds
    [error] [ Worker] - Timeout, operation used more than 10 seconds
    ERROR: Operation failed due to timeout. Check the log messages for more details.

    b) Using pynrfprog script like above

    lamm@fonb038:~$ ./mfw_prog.py mfw_nrf9160_1.3.4.zip
    Traceback (most recent call last):
      File "/home/lamm/mfw_prog.py", line 17, in <module>
        probe.program(firmware)
      File "/home/lamm/.local/lib/python3.10/site-packages/pynrfjprog/HighLevel.py", line 388, in program
        raise APIError(result, error_data=self.get_errors(), log=self._logger.error)
    pynrfjprog.APIError.APIError: An error was reported by NRFJPROG DLL: -220 TIME_OUT.
    [Probes.51022075] [SeggerBackend] JLinkARM.dll reported "-261", "Could not find supported CPU.".
        extra: [Probes.51022075] [SeggerBackend] JLinkARM.dll reported "-261", "Could not find supported CPU.".
        extra: [Probes.51022075] [SeggerBackend] JLinkARM.dll reported "-261", "Could not find supported CPU.".
        extra: [Probes.51022075] [SeggerBackend] JLinkARM.dll reported "-261", "Could not find supported CPU.".
        extra: [Probes.51022075] [SeggerBackend] JLinkARM.dll reported "-261", "Could not find supported CPU.".
        extra: [Probes.51022075] [DebugProbe] Failed while programming device.
        extra: [HighLevel] Failed programming the device.
        extra: [Probes.51022075] [nRF91] Timeout, operation used more than 10 sec
        extra: [Probes.51022075] [nRF91] Failed in wait for ack
        extra: [Probes.51022075] [nRF91] Failed while waiting for program operation to finish.
        extra: [Probes.51022075] [nRF91] Failed to upload file
        extra: [Probes.51022075] [nRF91] Failed while programming package /home/lamm/FB/nRF91/mfw_nrf9160_1.3.4.zip.

    c) nRF Connect Programmer v3.0.8:

Children
Related