<?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>Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45501/bootloader-and-settings-problem---gcc-compiler</link><description>I have a custom board with an application that works fine. 
 But when adding a secure bootloader my board starts to act weird. I am using the RESET pin on the chip as an input PIN. My chip resets every time the input is used when the app is run with the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Apr 2019 08:25:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45501/bootloader-and-settings-problem---gcc-compiler" /><item><title>RE: Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/thread/180438?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2019 08:25:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:721adb19-f13b-455a-9902-1ffe57a667ef</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Glad to hear that it works now, thanks for the update! I&amp;nbsp;excluded this possibility after you confirmed that UICR.PSELRESET was not set, but it&amp;#39;s written at runtime (implementation in system_nrf52) so guess you checked the register content before it had been set.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/thread/180429?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2019 07:59:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69e99f9a-372b-4d07-bc92-021e0394fe71</guid><dc:creator>Jenzo</dc:creator><description>&lt;p&gt;Got it!&lt;/p&gt;
&lt;p&gt;The makefile did have the&amp;nbsp;&lt;span&gt;-DCONFIG_GPIO_AS_PINRESET. When it was erased from the makefile it works fine with the bootloader. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I am primarily using SES now, so I have happily forgot all about the makefile. Excuse me for that.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you for a fantastic service.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Jens&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/thread/180423?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2019 07:40:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e4fb668-1af1-4bc4-9e73-aee0499efd1a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;It&amp;#39;s whether or not you build with&amp;nbsp;-DCONFIG_GPIO_AS_PINRESET that matters.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[quote user="Jenzo"][/quote]&lt;/p&gt;
&lt;p&gt;Sorry, but the second time I power cycled the device it read this:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;iMac:nrfjprog jenzo$ ./nrfjprog --memrd 0x40000400 --n 4&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;0x40000400: 00000000&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;|....|&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;iMac:nrfjprog jenzo$&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is this consistent? I mean, does the reset register always read zero after a power cycle? Maybe&amp;nbsp;you should give the program some time to run before you check the register.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/thread/180419?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2019 07:20:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7fec9ac1-3a1c-4bea-924c-ad8374e06cdb</guid><dc:creator>Jenzo</dc:creator><description>&lt;p&gt;yes, the makefile refers to the same system_nrf52.c file:&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="s1"&gt;$(SDK_ROOT)&lt;/span&gt;/components/toolchain/system_nrf52.c \&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/thread/180370?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2019 16:46:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dbad90ba-1ae9-4f0d-a8b1-1a18daaa3447</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;Is your bootloader compiled with the same system_nrf52.c as your firmware ? It looks like that the bootloader is compiled with pin reset enabled.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/thread/180301?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2019 12:04:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:721e3b13-5142-4094-9b42-c2e69eb90e1e</guid><dc:creator>Jenzo</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Considering that my battery powered device with output pins that control a DC motor, what could be wrong with my hardware? meaning how can the bootloader reset my board / reconfigure the PO.21?&lt;/p&gt;
&lt;p&gt;The board is working fine without the bootloader.&lt;/p&gt;
&lt;p&gt;Regards&lt;br /&gt;Jens&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/thread/180243?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2019 09:42:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a23b2919-2904-4055-a950-d2b993d1e656</guid><dc:creator>Jenzo</dc:creator><description>&lt;p&gt;Sorry, but the second time I power cycled the device it read this:&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;iMac:nrfjprog jenzo$ ./nrfjprog --memrd 0x40000400 --n 4&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;0x40000400: 00000000&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;|....|&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;iMac:nrfjprog jenzo$ &lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/thread/180240?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2019 09:39:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbfd9684-3e8e-48e0-bf72-7f60b00364f1</guid><dc:creator>Jenzo</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Now I am performing a power cycle before reading the register! The bootloader used is the one you provided.&amp;nbsp;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;iMac:nrfjprog jenzo$ ./nrfjprog --eraseall&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Erasing user available code and UICR flash areas.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Applying system reset.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;iMac:nrfjprog jenzo$ ./nrfjprog --program bl_blset_app_sd_v22.hex&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Parsing hex file.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Reading flash area to program to guarantee it is erased.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Checking that the area to write is not protected.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Programing device.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;strong&gt;&lt;span class="s1"&gt;POWER CYCLE the device!&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;iMac:nrfjprog jenzo$ ./nrfjprog --memrd 0x40000400 --n 4&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;0x40000400: 00000004&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;|....|&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;iMac:nrfjprog jenzo$&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Regards&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Jens&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/thread/180216?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2019 09:05:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea388c66-39c0-41d4-8ba3-8063231b9da7</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Jens, I was referring&amp;nbsp;to the&amp;nbsp;nrjprog&amp;nbsp;error &amp;quot;&lt;span&gt;Cannot connect to any nRF device&amp;quot;. A &amp;quot;deadlock&amp;quot; should not prevent the debugger from connecting. However, I think it makes sense to ignore that for now as it works on the other board you had.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;[quote userid="42209" url="~/f/nordic-q-a/45501/bootloader-and-settings-problem---gcc-compiler/180183"][/quote]&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;iMac:nrfjprog jenzo$ ./nrfjprog --reset&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Applying system reset.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Run.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;iMac:nrfjprog jenzo$ ./nrfjprog --memrd 0x40000400 --n 4&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;0x40000400: 00000004&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Did you turn the power off and on before you read the RESETREAS register here? In that case, the application is doing a soft reset.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/thread/180213?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2019 08:56:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef674546-3f7f-4254-aeff-26c02826a7e3</guid><dc:creator>Jenzo</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;I get the same result with the bootloader provided by you.&lt;/p&gt;
&lt;p&gt;I do have output pins that control DC motor driver.&lt;/p&gt;
&lt;p&gt;If it is a hardware problem, how can you explain the issue? It works perfectly without the bootloader.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Jens&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/thread/180208?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2019 08:35:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40778075-556f-4b3f-8297-c1c4d499d3cf</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Jens,&lt;/p&gt;
&lt;p&gt;This sounds more like HW issue.&amp;nbsp;Do you have any Output pins that control regulator supply, etc.? Please try attached bootloader (.hex) and see if you get the same result. It&amp;#39;s based on the original project but without any re-configuration of the GPIO pins.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-be9353a50b4144d3a167cec2c45ff8bd/nrf52832_5F00_xxaa_5F00_s132.hex"&gt;devzone.nordicsemi.com/.../nrf52832_5F00_xxaa_5F00_s132.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/thread/180183?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2019 07:57:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd13d6b2-6c76-4025-8d77-76aeaac62685</guid><dc:creator>Jenzo</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;First time I performed the procedure the board got into a deadlock, possibly because it resets constantly:&lt;/strong&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;iMac:nrfjprog jenzo$ ./nrfjprog --eraseall&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Erasing user available code and UICR flash areas.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Applying system reset.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;iMac:nrfjprog jenzo$ ./nrfjprog --program bl_blset_app_sd_v22.hex&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Parsing hex file.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Reading flash area to program to guarantee it is erased.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Checking that the area to write is not protected.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Programing device.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;iMac:nrfjprog jenzo$ ./nrfjprog --reset&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Applying system reset.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Run.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;iMac:nrfjprog jenzo$ ./nrfjprog --memrd 0x40000400 --n 4&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;ERROR: Cannot connect to any nRF device. Please make sure a device is&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;ERROR: connected to the debugger and supplied.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;iMac:nrfjprog jenzo$ ./nrfjprog --memrd 0x40000400 --n 4&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;ERROR: Cannot connect to any nRF device. Please make sure a device is&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;ERROR: connected to the debugger and supplied.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;iMac:nrfjprog jenzo$ &lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;strong&gt;&lt;span class="s1"&gt;I used another board and got this result:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;iMac:nrfjprog jenzo$ ./nrfjprog --eraseall&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Erasing user available code and UICR flash areas.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Applying system reset.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;iMac:nrfjprog jenzo$ ./nrfjprog --program bl_blset_app_sd_v22.hex&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Parsing hex file.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Reading flash area to program to guarantee it is erased.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Checking that the area to write is not protected.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Programing device.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;iMac:nrfjprog jenzo$ ./nrfjprog --reset&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Applying system reset.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Run.&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;iMac:nrfjprog jenzo$ ./nrfjprog --memrd 0x40000400 --n 4&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;0x40000400: 00000004&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;|....|&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;iMac:nrfjprog jenzo$&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Regards&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Jens&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/thread/180176?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2019 07:46:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc171724-2c06-45da-abfe-09ce97d32bf2</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Jens,&lt;/p&gt;
&lt;p&gt;Yes, you&amp;#39;re reading out the correct register. Bit 3 indicates that the reset source is SREQ (i.e., soft reset). But I forgot to add that you should power cycle the board before checking the register.&amp;nbsp;This is to ensure you do not see the reset performed by the debugger.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;app must have&amp;nbsp;called NVIC System reset&amp;nbsp;if the bit is still set after a power cycle.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/thread/180166?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2019 07:07:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2a954ac-f6fe-4a2c-ba23-bc981aceb011</guid><dc:creator>Jenzo</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;I just read the memory after startup with the bootloader and I get this result:&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;iMac:nrfjprog jenzo$ ./nrfjprog --memrd 0x40000400 --n 4&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;0x40000400: 00000004&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;I am not sure if it is the right memory address that I am readiing?! If it is the right address then I am not sure what the result means but I am sure you know:)&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;regards&lt;/span&gt;&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;Jens&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/thread/180158?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2019 06:53:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8e4e5b4-dead-47b6-b41e-a7ff71de192c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Jens,&lt;/p&gt;
&lt;p&gt;I get that it resets when you use P0.21, but&amp;nbsp;we don&amp;#39;t know why. Can you check the POWER-&amp;gt;RESETREAS register on startup to see what the reset source is?&amp;nbsp;&lt;/p&gt;
[quote userid="42209" url="~/f/nordic-q-a/45501/bootloader-and-settings-problem---gcc-compiler/180153"]What could I have done wrong?[/quote]
&lt;p&gt;I suspect it&amp;#39;s caused by a peripheral (GPIO for instance) being initialized by the bootloader that&amp;#39;s not being properly reset before booting the app. And that this somehow breaks the app.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/thread/180153?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2019 06:46:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fbf9a897-80ab-43d9-84c1-05d382cd1112</guid><dc:creator>Jenzo</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;I know exactly why is resets! It resets when the input on PO.21 goes high. On my custom board I have a sensor that is active high.&lt;/p&gt;
&lt;p&gt;When the bootloader is not programmed on the nRF52832 then it works fine. But as soon as the bootloader is programmed then it resets every time the sensor activates.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What could I have done wrong?&lt;/p&gt;
&lt;p&gt;Regards&lt;br /&gt;Jens&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/thread/180146?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2019 06:19:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6cc0883-1751-475b-aca8-4d0e215dc115</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Jens,&lt;/p&gt;
&lt;p&gt;Thanks for verifying that the pinreset&amp;nbsp;functionality is indeed disabled.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
[quote user=""]I have read somewhere on the Nordic DEVZONE that the gcc compiler places the settingsfile in the wrong place of the memory map. But I lack a good method of fixing it.[/quote]
&lt;p&gt;I don&amp;#39;t recall seeing this issue. We did, however, have a bug where the buttonless app and bootloader placed data in the same flash region which would cause merge conflicts when combining the two. I think we fixed that in SDK 12.3.0.&lt;/p&gt;
&lt;p&gt;The format of the settings page generated is the same regardless&amp;nbsp;of the toolchain you use. Also, the bootloader would not have booted the app if you had an invalid settings page.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
[quote user=""]But when adding a secure bootloader my board starts to act weird. I am using the RESET pin on the chip as an input PIN. My chip resets every time the input is used when the app is run with the bootloader. But it works fine without the bootloader.[/quote]
&lt;p&gt;Are you able to debug the app to see what causes the reset? You can build with -DDEBUG to catch code assertions (error handler will perform a reset otherwise).&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/thread/179900?ContentTypeID=1</link><pubDate>Wed, 03 Apr 2019 08:11:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8b1e789-1e81-40d4-b992-bdbcfacee4bb</guid><dc:creator>Jenzo</dc:creator><description>&lt;p&gt;Hi Vidar,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Pinreset is disabled. Readout of memory: 0xFF.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am using mergehex to merge and nrfjprog to program the board. Does GCC compile it wrong?&lt;/p&gt;
&lt;p&gt;Please help.&lt;/p&gt;
&lt;p&gt;Jens&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/thread/179531?ContentTypeID=1</link><pubDate>Mon, 01 Apr 2019 13:38:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0aa4fc51-c936-4f70-aad3-84e9791cec7d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Jens,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please readout&amp;nbsp; UICR.PSELRESET[x] after programming the bootloader to verify that it&amp;#39;s not set. It should be 0xFF..&amp;nbsp;if pinreset is disabled. E.g., with nrfjprog&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;nrfjprog --memrd&amp;nbsp;0x10001200&lt;/p&gt;
&lt;p&gt;This option is enabled if you build the project with&amp;nbsp;&lt;span&gt;CONFIG_GPIO_AS_PINRESET independent of what board file you use.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/thread/179529?ContentTypeID=1</link><pubDate>Mon, 01 Apr 2019 13:31:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:982da218-b853-4590-ab07-7f914071a68b</guid><dc:creator>Jenzo</dc:creator><description>&lt;p&gt;Hi Cyril,&lt;/p&gt;
&lt;p&gt;I have defined the PIN reset to a normal GPIO.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The app works fine. But the bootloader does not work. Strange, because both are using the same board file.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jens&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader and settings problem - gcc compiler</title><link>https://devzone.nordicsemi.com/thread/179008?ContentTypeID=1</link><pubDate>Thu, 28 Mar 2019 15:19:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:953bc1ff-6734-4717-95dd-6b5a79d10750</guid><dc:creator>Cyril</dc:creator><description>&lt;p&gt;Hello&lt;br /&gt;&lt;br /&gt;did you take a look at the declaration of CONFIG_GPIO_AS_PINRESET in both your app and your bootloader?&lt;/p&gt;
&lt;p&gt;Check the comment in system_nrf52.c:&lt;/p&gt;
&lt;pre&gt;&lt;span&gt;/* Configure GPIO pads as pPin Reset pin if Pin Reset capabilities desired. If CONFIG_GPIO_AS_PINRESET is not&lt;br /&gt;&lt;/span&gt;&lt;span&gt;  defined, pin reset will not be available. One GPIO (see Product Specification to see which one) will then be&lt;br /&gt;&lt;/span&gt;&lt;span&gt;  reserved for PinReset and not available as normal GPIO. */&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;Best,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>