<?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>51822 bootloader setting</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/87654/51822-bootloader-setting</link><description>Hi, 
 recently I&amp;#39;m building dfu function on my board, using nrf51822 qfaa and softdevice s110. 
 
 Here is the situation, I get two 51822 modules: 
 -one is Raytac MDBT40 , using nRF51822 QFAA H00, called A 
 -the other I&amp;#39;m not sure, using nRF51822 QFAA</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 13 May 2022 10:22:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/87654/51822-bootloader-setting" /><item><title>RE: 51822 bootloader setting</title><link>https://devzone.nordicsemi.com/thread/367799?ContentTypeID=1</link><pubDate>Fri, 13 May 2022 10:22:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e06e35c1-b266-43c6-98e7-a801c324f791</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I forgot that the keil projects for the bootloader had this. If it works, that is completely fine. What the different command does is quite self explaining. The --reset flag will reset the device when the programming is complete. So if you don&amp;#39;t have the --reset flag, you will need to reset the device manually, either by power cycling it, or by using the command nrfjprog --reset.&lt;/p&gt;
&lt;p&gt;The --family NRF51 just tells the programmer that it is an nRF51 chip. If you don&amp;#39;t specify it, the programmer will check a register that says what chip it is.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 51822 bootloader setting</title><link>https://devzone.nordicsemi.com/thread/367732?ContentTypeID=1</link><pubDate>Fri, 13 May 2022 01:40:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b4afe3e-5b91-416f-86d6-d03e375fad8f</guid><dc:creator>Yulien</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;　　Raytac engineer helps me to find out a little different.&lt;/p&gt;
&lt;p&gt;In my project which is transformed from SDK sample code, I&amp;nbsp;use these argument setting:&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1652404243742v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;And these are Raytac engineer using (I was told that he uses&amp;nbsp;SDK, too):&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1652404435226v3.png" /&gt;&lt;/p&gt;
&lt;p&gt;So, I try the following 3 argument settings:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;--family NRF51 --program &amp;quot;#H&amp;quot;　　　　　&lt;span style="color:#ff0000;"&gt;➜ I use at first&lt;/span&gt;　&lt;/li&gt;
&lt;li&gt;--reset --program &amp;quot;#H&amp;quot;　　　　　　　　&amp;nbsp;&lt;span style="color:#ff0000;"&gt;➜ Raytac uses&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;--reset --family NRF51 --program &amp;quot;#H　&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style="color:#ff0000;"&gt;➜ I mix 1 &amp;amp; 2&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Both setting 2 and 3 lead modules to work.&lt;/p&gt;
&lt;p&gt;After I turn back to try setting 1, modules work, too.&lt;/p&gt;
&lt;p&gt;It seems there is something wrong if I keep using setting 1; and in 2 or 3 Keil fixes the problems.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 51822 bootloader setting</title><link>https://devzone.nordicsemi.com/thread/367585?ContentTypeID=1</link><pubDate>Thu, 12 May 2022 11:42:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72e32905-96e5-4eee-81a4-e8ebd78af6db</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Have you tried using nrfjprog (nrf command line tools)&lt;/p&gt;
&lt;p&gt;But you never see these JLink - Cortex-M Error when you debug your application (without bootloader)?&lt;/p&gt;
&lt;p&gt;When you try to debug the bootloader, does the JLink error come immediately, or does it reach the main() function first?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 51822 bootloader setting</title><link>https://devzone.nordicsemi.com/thread/367509?ContentTypeID=1</link><pubDate>Thu, 12 May 2022 05:31:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f9f9f0d-f0b9-45cf-a62e-0390b4f1ec57</guid><dc:creator>Yulien</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;　　I use either Keil or nrfgo studio through Jlink.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;　　If I try to use programmer in nrf connect for desktop, it&amp;nbsp;cannot read my board. It might be some problem which I haven&amp;#39;t figure out yet.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 51822 bootloader setting</title><link>https://devzone.nordicsemi.com/thread/367348?ContentTypeID=1</link><pubDate>Wed, 11 May 2022 09:08:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71a8d6ad-cda1-4cc8-8090-1443320cb46f</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;How have you connected the programmer to your boards, and what programmer are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 51822 bootloader setting</title><link>https://devzone.nordicsemi.com/thread/367130?ContentTypeID=1</link><pubDate>Tue, 10 May 2022 10:05:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2acb855c-da98-4d4c-89c8-04854279f0eb</guid><dc:creator>Yulien</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/87654/51822-bootloader-setting/367082#367082"]So if you have an LFXTAL (32kHz physical xtal) with 20PPM accuracy, that is fine. If not, look in the enum from nrf_sdm.h, line 100, and find one entry that suits your HW. If you don&amp;#39;t have an LFXTAL, try using&amp;nbsp;NRF_CLOCK_LFCLKSRC_RC_250_PPM_250MS_CALIBRATION.[/quote]
&lt;p&gt;I&amp;#39;ve changed it into &amp;quot;NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION&amp;quot; already.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/87654/51822-bootloader-setting/367082#367082"]If that doesn&amp;#39;t work, then have you tried debugging? Try setting a breakpoint in the main() function of the bootloader. What happens? Is it reached?`Try to compare the working and non working device, and see if you see any difference in behavior.[/quote]
&lt;p&gt;Yes, I just use debug mode for a while. It stops&amp;nbsp;and shows this error when the code comes to nrf_delay.h.&amp;nbsp; &lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/2022_2D00_05_2D00_10-16_5F00_56_5F00_30_2D00_E_5F005F00_Yulien_5F00_nrf5_5F00_TEST_5F00_nRF5_5F00_SDK_5F00_10.0.0_5F00_dc26b5e_5F00_examples_5F00_dfu_5F00_bootloader_5F00_3_5F00_pca10028_5F00_d.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The other module, which can work well, stops at other place.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/2022_2D00_05_2D00_10-16_5F00_54_5F00_32_2D00_E_5F005F00_Yulien_5F00_nrf5_5F00_TEST_5F00_nRF5_5F00_SDK_5F00_10.0.0_5F00_dc26b5e_5F00_examples_5F00_dfu_5F00_bootloader_5F00_2_5F00_pca10028_5F00_d.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I think there are answers about these errors in devzone, but I haven&amp;#39;t figure it out yet.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 51822 bootloader setting</title><link>https://devzone.nordicsemi.com/thread/367082?ContentTypeID=1</link><pubDate>Tue, 10 May 2022 08:01:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fce222b-c8ca-4a7e-96f9-f5d24ec360dd</guid><dc:creator>Edvin</dc:creator><description>[quote user="Yulien"]According to Raytac document, there is a 16MHz crystal on board, which is covered by a metal shield. Crystal on the other module&amp;nbsp;could be&lt;span&gt;&amp;nbsp;seen with the naked eye&lt;/span&gt;.[/quote]
&lt;p&gt;So no LFXTAL (32kHz), then? Does your application settings (sdk_config.h) take this into consideration?&lt;/p&gt;
&lt;p&gt;I am not that familiar with the SDK10 bootloader, as it is starting to get quite old, but from a quick glance, the main.c seems to have something like this (looking at the dual_bank_ble_s110 bootloader):&lt;/p&gt;
&lt;p&gt;in main.c, line 154:&lt;/p&gt;
&lt;p&gt;SOFTDEVICE_HANDLER_APPSH_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, true);&lt;/p&gt;
&lt;p&gt;So if you have an LFXTAL (32kHz physical xtal) with 20PPM accuracy, that is fine. If not, look in the enum from nrf_sdm.h, line 100, and find one entry that suits your HW. If you don&amp;#39;t have an LFXTAL, try using&amp;nbsp;NRF_CLOCK_LFCLKSRC_RC_250_PPM_250MS_CALIBRATION.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If that doesn&amp;#39;t work, then have you tried debugging? Try setting a breakpoint in the main() function of the bootloader. What happens? Is it reached?`Try to compare the working and non working device, and see if you see any difference in behavior.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 51822 bootloader setting</title><link>https://devzone.nordicsemi.com/thread/367041?ContentTypeID=1</link><pubDate>Tue, 10 May 2022 01:47:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55cac3b0-8722-4e82-8ae9-81f45f416551</guid><dc:creator>Yulien</dc:creator><description>&lt;p&gt;Thank you for your information.&lt;/p&gt;
&lt;p&gt;I forgot to say. I use legacy dfu.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/87654/51822-bootloader-setting/366736#366736"]Where did you get the twi different configuration from?[/quote]
&lt;p&gt;I get address from &amp;quot;Project&amp;quot; listed in Keil toolbar.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1652144451964v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;This is from sample code, so I only change memory map and board settings to fit 51822.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/87654/51822-bootloader-setting/366962#366962"]Did you try to make sure it was erased before you start? When you hit &amp;quot;Erase all&amp;quot;, does it give any errors? If you disconnect and reconnect it, does it appear as only one region, or does it still say &amp;quot;Bootloader&amp;quot; and &amp;quot;Application&amp;quot; regions?[/quote]
&lt;p&gt;Yes, I check every time before I download hex through either Keil or nrfgo studio. In both modules, I could see only one region if I erase all,&amp;nbsp;with no error occurred.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/87654/51822-bootloader-setting/366962#366962"]So check the flash after programming both devices, and check the readbacks to see that they match, and check whether the one that isn&amp;#39;t working has an LFXTAL or not (32kHz crystal).&amp;nbsp;[/quote]
&lt;p&gt;According to Raytac document, there is a 16MHz crystal on board, which is covered by a metal shield. Crystal on the other module&amp;nbsp;could be&lt;span&gt;&amp;nbsp;seen with the naked eye&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If I download only softdevice(s110)+application, it works well on both &lt;span&gt;module (including BLE connection)&lt;/span&gt;; when it comes to softdevice+application+bootloader, it would fail on Raytac module.&lt;/p&gt;
&lt;p&gt;So, I guess there is no difference between the two modules, and the reason may&amp;nbsp;come from bootloader.&lt;/p&gt;
&lt;div style="left:86px;position:absolute;top:5.71429px;" id="gtx-trans"&gt;
&lt;div class="gtx-trans-icon"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 51822 bootloader setting</title><link>https://devzone.nordicsemi.com/thread/366962?ContentTypeID=1</link><pubDate>Mon, 09 May 2022 13:23:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0588a77b-1676-412e-bbb5-6242cf731ec2</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Sorry, I meant &amp;quot;two&amp;quot; not &amp;quot;twi&amp;quot;. I am sorry for the confusion.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know anything about Raytac bootloader, but if you have erased it, I guess that shouldn&amp;#39;t matter. Did you try to make sure it was erased before you start? When you hit &amp;quot;Erase all&amp;quot;, does it give any errors? If you disconnect and reconnect it, does it appear as only one region, or does it still say &amp;quot;Bootloader&amp;quot; and &amp;quot;Application&amp;quot; regions?&lt;/p&gt;
&lt;p&gt;If it doesn&amp;#39;t work to erase it using nRFGo studio, please try to use nRF Command Line Tools, and the command &amp;quot;nrfjprog --recover&amp;quot;. The reason is that it says that the readback protection is turned on, so you may need to recover the module first. This will erase the chip, and disable the readback protection.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Other than that, are the two modules identical? Does both of them (or none, or only one) have a built in LFXTAL? Did you try to read out the flash after flashing the devices to check that they are the same after being programmed? You can use &amp;quot;nrfjprog --readcode my_flash_dump.hex&amp;quot; and &amp;quot;nrfjprog --readuicr my_uicr_dump.hex&amp;quot; to read out both the flash and UICR registers on both devices. Then you can use a diff tool (I use &amp;quot;Meld&amp;quot;, which is a free diff tool) to see whether the content on the flash is actually the same.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="Yulien"]1. What does &amp;quot;0x0072&amp;quot;, which is listed after QFAAH00 in the image, mean?[/quote]
&lt;p&gt;I guess it is just a register it uses to identify the version of the chip.&amp;nbsp;&lt;/p&gt;
[quote user="Yulien"]2. Bootloader doesn&amp;#39;t work without softdevice, does it?[/quote]
&lt;p&gt;If it is a BLE bootloader, then no, it doesn&amp;#39;t work without the softdevice. If it is a serial bootloader, it will work if you have either programmed the softdevice or the MBR. You would use the MBR if your application and bootloader doesn&amp;#39;t use the softdevice. The bootloader requires the MBR. The MBR is part of the softdevice, but also exists as a standalone .hex file. If you flash the softdevice, you don&amp;#39;t need to flash the MBR separately.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So check the flash after programming both devices, and check the readbacks to see that they match, and check whether the one that isn&amp;#39;t working has an LFXTAL or not (32kHz crystal).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 51822 bootloader setting</title><link>https://devzone.nordicsemi.com/thread/366821?ContentTypeID=1</link><pubDate>Mon, 09 May 2022 01:00:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:718767a2-ba8a-4394-a179-3288f488f99b</guid><dc:creator>Yulien</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;I use Keil v5 and SDK 10 to&amp;nbsp;build bootloader, SDK 7.2 to build application, through&amp;nbsp;both Keil and nrfgo studio to download hex.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure what do you mean because I don&amp;#39;t use I2C or SPI but UART in my code.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/87654/51822-bootloader-setting/366736#366736"]&lt;p&gt;Where did you get the twi different configuration from?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;At the very beginning, Raytac module has bootloader inside (attached image), and the other is totally empty. I do erase the memory before download into them.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/2022_2D00_05_2D00_09-08_5F00_54_5F00_08_2D00_nRFgo-Studio.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Other questions:&lt;/p&gt;
&lt;p&gt;1. What does &amp;quot;0x0072&amp;quot;, which is listed after QFAAH00 in the image, mean?&lt;/p&gt;
&lt;p&gt;2. Bootloader doesn&amp;#39;t work without softdevice, does it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 51822 bootloader setting</title><link>https://devzone.nordicsemi.com/thread/366736?ContentTypeID=1</link><pubDate>Fri, 06 May 2022 13:03:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70e6ad11-1e8d-4129-b6f1-48b32f3da814</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;What SDK version are you using?&lt;/p&gt;
&lt;p&gt;Where did you get the twi different configuration from?&lt;/p&gt;
&lt;p&gt;How do you program the devices? Are you using a programmer for both of them? And did you make sure to delete the flash before you programmed everything? (nrfjprog --eraseall if you are using a programmer).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>