<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nRF9160 modem firmware upgrade firmware loader not starting</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79601/nrf9160-modem-firmware-upgrade-firmware-loader-not-starting</link><description>Hi, 
 I&amp;#39;m making my own program to upgrade the nRF9160&amp;#39;s modem firmware over SWD. So far, application note nAN41 has helped a lot, but I&amp;#39;m getting stuck when trying to get the firmware loader up and running. After the loader has been programmed into RAM</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 28 Sep 2021 19:39:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79601/nrf9160-modem-firmware-upgrade-firmware-loader-not-starting" /><item><title>RE: nRF9160 modem firmware upgrade firmware loader not starting</title><link>https://devzone.nordicsemi.com/thread/331580?ContentTypeID=1</link><pubDate>Tue, 28 Sep 2021 19:39:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64a7445f-8d8e-4b48-8b3b-2420fb67d067</guid><dc:creator>ruimtepuin</dc:creator><description>&lt;p&gt;Hi Torbj&amp;oslash;rn,&lt;/p&gt;
&lt;p&gt;I was first going to say that I haven&amp;#39;t seen the issue come back anymore. Funny enough, I accidentally made the modem firmware upgrade not work anymore!&lt;/p&gt;
&lt;p&gt;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:&lt;br /&gt;Address &lt;code&gt;0x00FF801C&lt;/code&gt; went from &lt;code&gt;0xFFFFFFFF&lt;/code&gt; to &lt;code&gt;0xFFFFFFFE&lt;/code&gt;&lt;br /&gt;Address &lt;code&gt;0x00FF8020&lt;/code&gt; went from &lt;code&gt;0xFFFFFFFF&lt;/code&gt; to &lt;code&gt;0xFFFFFF20&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;Thanks a lot for the help!&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Martin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 modem firmware upgrade firmware loader not starting</title><link>https://devzone.nordicsemi.com/thread/331219?ContentTypeID=1</link><pubDate>Mon, 27 Sep 2021 07:39:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc0e84b7-88e1-4293-a4e6-2884a6998725</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Martin&lt;/p&gt;
&lt;p&gt;I discussed this with one of the developers, but he was not aware of any persistent prerequisites that needed to be in place in order to update the modem.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you please let me know which version of the nRF9160DK you are using?&lt;/p&gt;
&lt;p&gt;Also, it could be interesting to check the state of the UICR registers between the working and non working state, in case there could be some UICR configuration that is missing.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To check this could you please read out the UICR registers through nrfjprog, both when the board is working and when it is not?&lt;/p&gt;
&lt;p&gt;&lt;em&gt;nrfjprog --readuicr uicr.hex&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 modem firmware upgrade firmware loader not starting</title><link>https://devzone.nordicsemi.com/thread/330921?ContentTypeID=1</link><pubDate>Thu, 23 Sep 2021 18:33:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:479dc780-15b1-4aac-b636-ada7f3576d05</guid><dc:creator>ruimtepuin</dc:creator><description>&lt;p&gt;Hi Torbj&amp;oslash;rn,&lt;/p&gt;
[quote userid="2116" url="~/f/nordic-q-a/79601/nrf9160-modem-firmware-upgrade-firmware-loader-not-starting/329591#329591"]Version 10.14.0 of the nRF Command Line tools for Linux64 should also support ARM targets.[/quote]
&lt;p&gt;That was just released when I created the ticket apparently ;), but awesome that it&amp;#39;s finally supported!&lt;/p&gt;
&lt;p&gt;Anyway I still want to try to update the modem firmware parallel on multiple devices, without having to use multiple J-links.&lt;br /&gt;&lt;br /&gt;Because it would be hard to debug the issue without me having much information on what happens when it fails, I decided to compare what the J-link does with nAN41. With a logic analyser I was able to extract the different steps the J-link takes and saw quite some differences&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;First, the J-link writes and reads some debug registers (DHCSR, DEMCR, DSCSR, ...).&lt;/li&gt;
&lt;li&gt;After reading the modem keys as usual (step 4.2.3), it will load some other firmware loader. Starting with 0x5049656D and ending with 0xBED856EB.&lt;/li&gt;
&lt;li&gt;Then it starts the IPC, until the transfer has completed, after which it starts again with allocating RAM (step 4.1.4) and loading, this time the real, firmware loader.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Especially the extra firmware loader seems weird to me, since there is no mention of it in nAN41. However, loading this firmware loader myself did not help, because the modem didn&amp;#39;t respond to this event either.&lt;/p&gt;
&lt;p&gt;However, when I first uploaded the modem firmware with the J-link, my program suddenly worked! So the J-link is configuring the nRF9160 in some way that it does accept the loader. The change the J-link made is persistent, so I can power cycle the nRF9160 and it still accepts my firmware loader. I also didn&amp;#39;t get anymore issues afterwards.&lt;/p&gt;
&lt;p&gt;Do you maybe have an idea on what perquisites are required to start the modem firmware upgrade process? It seems that it&amp;#39;s some configuration in flash, since the configuration is persistent and the modem keeps acknowledging the loader after power cycles.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Martin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 modem firmware upgrade firmware loader not starting</title><link>https://devzone.nordicsemi.com/thread/329591?ContentTypeID=1</link><pubDate>Wed, 15 Sep 2021 11:37:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2be10d11-1420-4224-bad8-9538e40f83ea</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Martin&lt;/p&gt;
[quote user="ruimtepuin"]Currently the modem firmware can only be updated&amp;nbsp;with PCs, because the nrfjprog libs are only&amp;nbsp;compiled for x86. [/quote]
&lt;p&gt;Version 10.14.0 of the nRF Command Line tools for Linux64 should also support ARM targets. Below is an excerpt from the release notes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;Installers:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;- Update bundled Segger installers and tar balls to v7.52d&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;- Provide universal binaries for MacOS M1 and x86_64.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;- Provide binaries for armhf raspbian targets.&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
[quote user="ruimtepuin"]Nordic also only provides exclusive support for programming with J-link devices, which is expensive (because you&amp;#39;re actually not allowed to use the DK for programming external targets).[/quote]
&lt;p&gt;This is true. The license for the Segger chip on the DK&amp;#39;s doesn&amp;#39;t cover production programming, but I would argue that paying 350 Euros for a J-Link Base programmer is not very expensive. The DK&amp;#39;s are not designed to be used in a production setting, and any time you have to spend debugging why a kit stops working, or on implementing your own programming solutions, carries a cost as well (as they say, time is money).&amp;nbsp;&lt;/p&gt;
[quote user="ruimtepuin"]If I&amp;nbsp;make something myself&amp;nbsp;I also have much more flexibility&amp;nbsp;and can update firmware&amp;nbsp;in parallel on multiple devices easier, shortening the process.[/quote]
&lt;p&gt;We will do our best to support you if you go down this route, but be aware that it is likely to require a significant investment in development time, compared to using the tools that we already provide.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 modem firmware upgrade firmware loader not starting</title><link>https://devzone.nordicsemi.com/thread/329433?ContentTypeID=1</link><pubDate>Tue, 14 Sep 2021 12:12:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2429941c-e657-456f-ac1a-4627e0a66f96</guid><dc:creator>ruimtepuin</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Torbj&amp;oslash;rn,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I could&amp;#39;ve expected&amp;nbsp;this question would come ;)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Currently the modem firmware can only be updated&amp;nbsp;with PCs, because the nrfjprog libs are only&amp;nbsp;compiled for x86. Having to use a PC rather than something like a Raspberry PI for production programming is way overkill.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Nordic also only provides exclusive support for programming with J-link devices, which is expensive (because you&amp;#39;re actually not allowed to use the DK for programming external targets).&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If I&amp;nbsp;make something myself&amp;nbsp;I also have much more flexibility&amp;nbsp;and can update firmware&amp;nbsp;in parallel on multiple devices easier, shortening the process.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;&lt;/span&gt;&lt;span&gt;Martin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 modem firmware upgrade firmware loader not starting</title><link>https://devzone.nordicsemi.com/thread/329419?ContentTypeID=1</link><pubDate>Tue, 14 Sep 2021 11:44:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99a1d3f0-18d6-4b86-9a68-3976c259c0c4</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To start with a stupid question, any reason why you couldn&amp;#39;t just use one of the provided scripts to do this, rather than make your own?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>