Reading the modem key digest

You must program a modem firmware loader image into the RAM to transfer the modem firmware image from the Serial Wire Debug (SWD) interface to the modem. This image needs to be signed with an authentication key recognized by the preprogrammed firmware in the modem. To select the correct modem firmware loader from the downloaded modem firmware package, get the key from the modem by reading the modem key digest. This digest determines the modem firmware loader you need to upgrade the modem.

To request the modem key digest, do the following steps.
  1. Poll IPC.MODEM_CTRL_EVENT by reading the event registers in the following table and doing the corresponding action.
    • FAULT_EVENT (0x4002A100)
    • COMMAND_EVENT (0x4002A108)
    • DATA_EVENT (0x4002A110)
    Register Action
    FAULT_EVENT (0x4002A100) Restart the procedure if this register contains a value other than 0.
    COMMAND_EVENT (0x4002A108) Proceed to step 2 if this register contains a value other than 0.
    DATA_EVENT (0x4002A110) Proceed to step 2 if this register contains a value other than 0.
  2. Write 0 to the registers listed in step 1 to acknowledge events and reset event registers.
  3. Read the value of address 0x20000010 to 0x20000030 to readout the digest.
    Note: Readout values need to be converted from big endian to little endian (e.g. readout value 0x01234567 is equal to 0x67452301).
  4. Compare the first 7 hexadecimal digits of the readout value with the filenames in the nRF9160 modem firmware package. If there is no corresponding file with same hexadecimal digits, check if there are other packages with a valid file.