This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF9160 modem firmware upgrade firmware loader not starting

Hi,

I'm making my own program to upgrade the nRF9160's modem firmware over SWD. So far, application note nAN41 has helped a lot, but I'm getting stuck when trying to get the firmware loader up and running. After the loader has been programmed into RAM and the IPC transaction is started, the IPC.MODEM_CTRL_EVENT doesn't get set within 10 seconds. The modem control event does get asserted without faults when reading the key digest, so the modem has booted correctly I also verified whether the contents of the loader matched the written RAM, which is the case.

To check whether I'm missing something, I compared the programming sequence of the nrf_dfu_api with nAN41. I saw some differences but it didn't seem to help:

  • All IPC events are acknowledged after the IPC is configured (self.acknowlage_events()).
  • The RAM is powered on prior to making all sections non-secure (self.api.power_ram_all()). Not sure if it's needed and what this function does as it's a proprietary driver.
  • The modem response is read after acknowledging events (self.read_be(0x2000000C))

Is there some step I'm maybe missing after loading the firmware loader? It's not stated in the manual, but do I need to enable the core again because it's halted? If it is, how do I set the correct starting address in the MCU where it should boot from?

Thanks,
Martin

  • Hi Torbjørn,

    I was first going to say that I haven't seen the issue come back anymore. Funny enough, I accidentally made the modem firmware upgrade not work anymore!

    To make the modem accept the loader again, I flashed a random application to the board with a J-link. However, as you suggested I compared the UICR registers prior to flashing something and after, and got the following difference:
    Address 0x00FF801C went from 0xFFFFFFFF to 0xFFFFFFFE
    Address 0x00FF8020 went from 0xFFFFFFFF to 0xFFFFFF20

    Both registers are used for enabling the HFXO, which is apparently required for the modem to start the update process. The reason why the HFXO got disabled is probably because I did a full flash erase prior to flashing an application, so the UICR was erased as well. When I write the UICR again and reset the device, the modem works again reliably after an erase.

    Thanks a lot for the help!

    Regards,
    Martin

Related