<?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>DFU app update over BLE with non-BLE app.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/57273/dfu-app-update-over-ble-with-non-ble-app</link><description>HI, 
 
 
 I got nrfutil + BLE DFU app update working using the ble_app_hrs for the test. I am using the nrf52DK + SES for development, and I have also an external nrf52832 + MPU9250 external board attached to it. The DFU update work fine on both the nrf52DK</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Feb 2020 17:24:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/57273/dfu-app-update-over-ble-with-non-ble-app" /><item><title>RE: DFU app update over BLE with non-BLE app.</title><link>https://devzone.nordicsemi.com/thread/232911?ContentTypeID=1</link><pubDate>Wed, 05 Feb 2020 17:24:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14f0e345-5d5d-41f3-af11-039fb1e304c4</guid><dc:creator>SL06</dc:creator><description>&lt;p&gt;This is the link that I was using for the RAM and FLASH position:&lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/adjustment-of-ram-and-flash-memory"&gt;https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/adjustment-of-ram-and-flash-memory&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For my s132 softdevice v7.0.0 the Ram start at&amp;nbsp;&lt;span&gt;0x20001668 and Flash start at&amp;nbsp;0x26000 work just fine&amp;nbsp;with my apps without the&amp;nbsp;softdevice. &amp;nbsp;I had&amp;nbsp;also to decrease the HEAP size to solve an error.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I played also with the app version with the softdevice but did no solved completely the error mention above:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;ASSERTION FAILED at ../../../../../../integration/nrfx/nrfx_glue.h:107&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A work&amp;nbsp;around was to remove the line SOFTDEVICE_PRESENT in the preprocessor. &amp;nbsp;I used the RAM and flash setting above. The ESB was not working until I&amp;nbsp;change &amp;nbsp;&lt;/span&gt;.radio_irq_priority = 1, to 2 in the nerf_esb.h header file.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t need the softdevice version since the first app is now working properly , so I won&amp;#39;t pursue that route. &amp;nbsp;&amp;nbsp;Your help was greatly appreciate.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&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: DFU app update over BLE with non-BLE app.</title><link>https://devzone.nordicsemi.com/thread/232461?ContentTypeID=1</link><pubDate>Tue, 04 Feb 2020 08:14:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4c74f53-7a1f-4a49-9ad3-526bcb35835d</guid><dc:creator>Edvin</dc:creator><description>[quote user="SL06"]I am not sure what&amp;nbsp;is the problem. &amp;nbsp; Is there a priority not define,&amp;nbsp;a conflict, or something else.[/quote]
&lt;p&gt;That sounds like a conflict, yes.&lt;/p&gt;
&lt;p&gt;I suspect this is already what you are doing, but you need your application to be able to run while having the softdevice, so for now you don&amp;#39;t need to worry about the bootloader.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;The INTERRUPT_PRIORITY_IS_VALID() define comes from nrfx_glue.h:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#ifdef NRF51
#ifdef SOFTDEVICE_PRESENT
#define INTERRUPT_PRIORITY_IS_VALID(pri) (((pri) == 1) || ((pri) == 3))
#else
#define INTERRUPT_PRIORITY_IS_VALID(pri) ((pri) &amp;lt; 4)
#endif //SOFTDEVICE_PRESENT
#else
#ifdef SOFTDEVICE_PRESENT
#define INTERRUPT_PRIORITY_IS_VALID(pri) ((((pri) &amp;gt; 1) &amp;amp;&amp;amp; ((pri) &amp;lt; 4)) || \
                                          (((pri) &amp;gt; 4) &amp;amp;&amp;amp; ((pri) &amp;lt; 8)))
#else
#define INTERRUPT_PRIORITY_IS_VALID(pri) ((pri) &amp;lt; 8)
#endif //SOFTDEVICE_PRESENT
#endif //NRF52&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In your case, SOFTDEVICE_PRESENT should be true, and NRF51 should be false, hence, this line is what will be checked:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;#define&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;INTERRUPT_PRIORITY_IS_VALID&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;pri&lt;/span&gt;&lt;span&gt;) ((((pri) &lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;) &lt;/span&gt;&lt;span&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span&gt; ((pri) &lt;/span&gt;&lt;span&gt;&amp;lt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;4&lt;/span&gt;&lt;span&gt;)) &lt;/span&gt;&lt;span&gt;||&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;\&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; (((pri) &lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;4&lt;/span&gt;&lt;span&gt;) &lt;/span&gt;&lt;span&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span&gt; ((pri) &lt;/span&gt;&lt;span&gt;&amp;lt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;8&lt;/span&gt;&lt;span&gt;)))&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;So your priority needs to be either 2, 3, 5, 6, or 7 when you are working on an nRF52, and you are using the softdevice. The reason for this is that the interrupt priority levels 0, 1, and 4 is reserved by the softdevice:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sds_s132/SDS/s1xx/processor_avail_interrupt_latency/exception_mgmt_sd.html"&gt;https://infocenter.nordicsemi.com/topic/sds_s132/SDS/s1xx/processor_avail_interrupt_latency/exception_mgmt_sd.html&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Not sure if the link you provided is the one you intended to provide, but when you start your application, the log should tell you if you should adjust your ram and flash settings.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Edvin&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU app update over BLE with non-BLE app.</title><link>https://devzone.nordicsemi.com/thread/232431?ContentTypeID=1</link><pubDate>Mon, 03 Feb 2020 22:45:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14f38836-9117-460b-872f-89cb7428ad9e</guid><dc:creator>SL06</dc:creator><description>&lt;p&gt;Hi, &amp;nbsp;I have fiddle&amp;nbsp;around with my project changing FLASH and RAM address&amp;nbsp;without success&amp;nbsp;&lt;span style="font-family:inherit;"&gt;and decide finally to use blinky_S132 as a template and transpose my program in it. &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;It took several hours.&amp;nbsp;&lt;/span&gt;I had to set the&amp;nbsp;&lt;span&gt;start addresses for RAM and FLASH&amp;nbsp;according to those recommandation&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/33077/sdk15-nrfx-error-numbering"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/33077/sdk15-nrfx-error-numbering&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I had also to reduce the heap size by half &amp;nbsp;to 4096. &amp;nbsp;I read in ticket that it could be set to 0 if I use&amp;nbsp;the s132 softdevice. I have not tried.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;am at the point now that my program compile without error, start te setup part but stop after a few line , where I am trying to init the twi driver &amp;nbsp;with the following routine:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;uint32_t nrf_drv_mpu_init(void)
{
    uint32_t err_code;
    
    const nrfx_twi_config_t twi_mpu_config = {
       .scl                = MPU_TWI_SCL_PIN,
       .sda                = MPU_TWI_SDA_PIN,
       .frequency          = NRF_TWI_FREQ_400K,
     //  .interrupt_priority = APP_IRQ_PRIORITY_HIGHEST,
       //.clear_bus_init     = false
    };
    
    err_code = nrfx_twi_init(&amp;amp;m_twi_instance, &amp;amp;twi_mpu_config, nrfx_mpu_twi_event_handler, NULL);
    if(err_code != NRF_SUCCESS)
	{
		return err_code;
	}
    
    nrfx_twi_enable(&amp;amp;m_twi_instance);
	
	return NRF_SUCCESS;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The error on the Segger RTT &amp;nbsp;terminal is :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;00&amp;gt; &amp;lt;error&amp;gt; app: ASSERTION FAILED at ../../../../../../integration/nrfx/nrfx_glue.h:107&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Line 107 in &lt;span&gt;nrfx_glue.h&lt;/span&gt;&amp;nbsp;is : &amp;nbsp;ASSERT(INTERRUPT_PRIORITY_IS_VALID(priority));&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;static inline void _NRFX_IRQ_PRIORITY_SET(IRQn_Type irq_number,
                                          uint8_t   priority)
{
    ASSERT(INTERRUPT_PRIORITY_IS_VALID(priority));
    NVIC_SetPriority(irq_number, priority);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am not sure what&amp;nbsp;is the problem. &amp;nbsp; Is there a priority not define,&amp;nbsp;a conflict, or something else.&lt;/p&gt;
&lt;p&gt;Thanks for helping.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU app update over BLE with non-BLE app.</title><link>https://devzone.nordicsemi.com/thread/232364?ContentTypeID=1</link><pubDate>Mon, 03 Feb 2020 14:16:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a11a8fb-2fac-4b3b-a24a-3d6d2cd23c7e</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;If you use a BLE bootloader, remember that the bootloader itself use the softdevice, so it is not deleted. If you look in the SDK\examples\peripheral\blinky\pca10040 folder, you see that there are three project files. One blank, one mbr and one for the softdevice. The differences are mostly linking and RAM placement, but if possible, I suggest you use a project file that already has the softdevice included. You don&amp;#39;t need to actively use the softdevice in your application, but since the&amp;nbsp; bootloader requires it, you can&amp;#39;t save space by deleting it either way.&lt;/p&gt;
&lt;p&gt;The other approach is to fiddle around with the project settings, so that it will run with a softdevice in the bottom of flash and ram.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU app update over BLE with non-BLE app.</title><link>https://devzone.nordicsemi.com/thread/232200?ContentTypeID=1</link><pubDate>Sun, 02 Feb 2020 18:55:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7eddeea-8e74-4bff-b1cc-4c0fa9082399</guid><dc:creator>SL06</dc:creator><description>&lt;p&gt;I have tried the nrtutil&amp;nbsp;&lt;span&gt;settings generate&lt;span class="Apple-converted-space"&gt;&amp;nbsp;command, since I did not had problem with the&amp;nbsp;&lt;/span&gt;&lt;/span&gt;ble_app_hrs test, and was not shure of the purpose. &amp;nbsp;Should I lookout this ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU app update over BLE with non-BLE app.</title><link>https://devzone.nordicsemi.com/thread/232197?ContentTypeID=1</link><pubDate>Sun, 02 Feb 2020 18:16:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47980358-cbda-4b0c-ab2d-b68ffda15939</guid><dc:creator>SL06</dc:creator><description>&lt;p&gt;I have forgot to mention. &amp;nbsp;I am using SDK v16.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>