<?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>nrf52820 dfu</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/122669/nrf52820-dfu</link><description>This is the command I used to generate setting.hex.The primary address of my app is 0x19000. 
 
 This is my hex distribution. The library used is nRF5_SDK_17.1.0_ddde560. Now the app is not functioning properly. Why is that? The log indicates that the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 04 Jul 2025 09:38:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/122669/nrf52820-dfu" /><item><title>RE: nrf52820 dfu</title><link>https://devzone.nordicsemi.com/thread/541427?ContentTypeID=1</link><pubDate>Fri, 04 Jul 2025 09:38:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64fd8f5b-fb1c-466b-804c-792a49fd162b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Then I don&amp;#39;t see how it could become &amp;quot;stuck&amp;quot; in the printf call. Please pause the debugger in Keil and take a screenshot that shows where the&amp;nbsp;program hangs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52820 dfu</title><link>https://devzone.nordicsemi.com/thread/541425?ContentTypeID=1</link><pubDate>Fri, 04 Jul 2025 09:27:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3a668b4-0c29-48eb-9623-97219fa62cc5</guid><dc:creator>shsh</dc:creator><description>&lt;p&gt;UART_HWFC is false&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52820 dfu</title><link>https://devzone.nordicsemi.com/thread/541411?ContentTypeID=1</link><pubDate>Fri, 04 Jul 2025 08:03:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:458c8348-9e34-4cdb-8dbb-8ab70c1a992e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Is&amp;nbsp;UART_HWFC set to &amp;#39;True&amp;#39;? In that case, please set it to &amp;#39;False&amp;#39; and see if it still hangs.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52820 dfu</title><link>https://devzone.nordicsemi.com/thread/541400?ContentTypeID=1</link><pubDate>Fri, 04 Jul 2025 06:14:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc36412e-2b08-4ecd-9f01-d4383bad1eb5</guid><dc:creator>shsh</dc:creator><description>&lt;p&gt;I found that the app kept restarting. After running once, it would freeze and then restart.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52820 dfu</title><link>https://devzone.nordicsemi.com/thread/541395?ContentTypeID=1</link><pubDate>Fri, 04 Jul 2025 03:22:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9bd1bba-0d04-4bf4-bf11-167b3bd68e53</guid><dc:creator>shsh</dc:creator><description>&lt;p&gt;Hello, I just did a debug and found that the application can start but gets stuck after only one execution. This is very strange because it doesn&amp;#39;t happen in the bare-metal application.&lt;br /&gt;There is no low-speed crystal oscillator on my board. I have selected the internal RC option in the DFU mode. However, I couldn&amp;#39;t find the definition of the low-speed clock in the app. The app I&amp;#39;m using is the UART routine. The current situation is that once the app enters the printf function, it will freeze. Including the sending function of SPI, it would get stuck when entering. I have never figured out the reason for this. Because on the bare machine, printf and the SPI sending function work normally.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52820 dfu</title><link>https://devzone.nordicsemi.com/thread/541306?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 10:04:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8feb4d3-4e37-40f3-9207-7d9720cf2d00</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Please debug the application then to see where the program hangs.&amp;nbsp;&lt;/p&gt;
[quote user="shsh"]您好，我刚刚做了一个调试，发现应用程序可以启动，但只执行一次就卡住了。这很奇怪，因为它不会发生在裸机应用程序中。[/quote]
&lt;p&gt;Please repost this in English.&lt;/p&gt;
[quote user="shsh"]Look at this picture. There is an abnormal situation in this picture. That is, after I download the program on the left into the chip, the chip will generate three programs of approximately the same size occupying bytes in the &amp;quot;setting file&amp;quot; area. Is this normal?[/quote]
&lt;p&gt;The settings and MBR parameter page are updated by the bootloader at runtime, so yes, it is expected to change.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52820 dfu</title><link>https://devzone.nordicsemi.com/thread/541263?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 06:52:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be4f0586-51f6-4ca5-9313-1affe2a70bb3</guid><dc:creator>shsh</dc:creator><description>&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1751525428047v2.png" alt=" " /&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;Look at this picture. There is an abnormal situation in this picture. That is, after I download the program on the left into the chip, the chip will generate three programs of approximately the same size occupying bytes in the &amp;quot;setting file&amp;quot; area. Is this normal?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52820 dfu</title><link>https://devzone.nordicsemi.com/thread/541257?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 06:34:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:728b3ac7-c990-40d9-9043-5cb1fa5c7e6b</guid><dc:creator>shsh</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;uint32_t err_code;
	clocks_start();
	    const app_uart_comm_params_t comm_params =
      {
          RX_PIN_NUMBER,
          TX_PIN_NUMBER,
          RTS_PIN_NUMBER,
          CTS_PIN_NUMBER,
          UART_HWFC,
          false,
#if defined (UART_PRESENT)
          NRF_UART_BAUDRATE_921600
#else
          NRF_UARTE_BAUDRATE_115200
#endif
      };

    APP_UART_FIFO_INIT(&amp;amp;comm_params,
                         UART_RX_BUF_SIZE,
                         UART_TX_BUF_SIZE,
                         uart_error_handle,
                         APP_IRQ_PRIORITY_LOWEST,
                         err_code);

   // APP_ERROR_CHECK(err_code);

//#ifndef ENABLE_LOOPBACK_TEST
    //printf(&amp;quot;\r\nUART example started.\r\n&amp;quot;);
	
	nrf_drv_spi_config_t spi_config = NRF_DRV_SPI_DEFAULT_CONFIG;
    spi_config.ss_pin   = SPI_SS_PIN;
    spi_config.miso_pin = SPI_MISO_PIN;
    spi_config.mosi_pin = SPI_MOSI_PIN;
    spi_config.sck_pin  = SPI_SCK_PIN;
	spi_config.frequency  = NRF_DRV_SPI_FREQ_8M;
    nrf_drv_spi_init(&amp;amp;spi, &amp;amp;spi_config, spi_event_handler, NULL);
		
    
//    err_code = esb_init();
//    APP_ERROR_CHECK(err_code);

//    NRF_LOG_DEBUG(&amp;quot;Enhanced ShockBurst Receiver Example started.&amp;quot;);

//    err_code = nrf_esb_start_rx();
//    APP_ERROR_CHECK(err_code);

    while (true)
    {
		
		//nrf_gpio_pin_clear(SPI_SS_PIN);
		m_tx_buf[0]++;
		//printf(&amp;quot;%d\r\n&amp;quot;,m_tx_buf[0]);
		nrf_drv_spi_transfer(&amp;amp;spi, m_tx_buf, m_length, NULL, NULL);
		//nrf_gpio_pin_set(SPI_SS_PIN);
//		app_uart_put((uint8_t)m_tx_buf[0]);
		nrf_delay_ms(1);
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;您好，我刚刚做了一个调试，发现应用程序可以启动，但只执行一次就卡住了。这很奇怪，因为它不会发生在裸机应用程序中。&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1751524693851v1.png" alt=" " /&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52820 dfu</title><link>https://devzone.nordicsemi.com/thread/541255?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 06:29:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6bb8d64c-99ac-4334-986c-f0eaf2db4bca</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks. The readout shows that a fault exception has been raised. Are you building the bootloader with the default optimization setting? Reason for asking is that the&amp;nbsp;&lt;span&gt;jump_to_addr() function is known to fail if compiler optimization is not enabled.&amp;nbsp; It&amp;#39;s because the implementation&lt;/span&gt;&amp;nbsp;assumes that the input arguments will not be pushed on stack.&lt;/p&gt;
&lt;p&gt;If you need to troubleshoot this further, I suggest you start a debug session with your bootloader project and place a breakpoint in jump_to_addr() and try to single step from there to see if you can see&amp;nbsp;when the fault is triggered.&lt;/p&gt;
&lt;p&gt;Regarding the failing nrfutil command, it seems like you are using and older version. To upgrade, run: nrfutil self-upgrade &amp;amp;&amp;amp; nrfutil upgrade.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52820 dfu</title><link>https://devzone.nordicsemi.com/thread/541234?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 01:07:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccc59ce7-789d-4c38-a04b-e12cee289e98</guid><dc:creator>shsh</dc:creator><description>&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1751504828772v1.png" alt=" " /&gt;&lt;br /&gt;What about this one?&lt;/p&gt;
&lt;p&gt;nrfutil device cpu-register-read&lt;br /&gt;error: unrecognized subcommand &amp;#39;cpu-register-read&amp;#39;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52820 dfu</title><link>https://devzone.nordicsemi.com/thread/541204?ContentTypeID=1</link><pubDate>Wed, 02 Jul 2025 15:38:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:072e4770-cedb-4da8-a685-63ca48680804</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The settings page looks to be correctly generated. The bootloader also sees it as valid since it does try to jump to the application. Please try to read out the CPU registers after the jump to see if this may provide us with some more clues as to what&amp;#39;s wrong.&lt;/p&gt;
&lt;p&gt;Reading the CPU register with&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/nrfutil/page/README.html"&gt;nrfutil&lt;/a&gt; from command line:&lt;/p&gt;
&lt;p&gt;$ nrfutil device cpu-register-read&amp;nbsp;&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></channel></rss>