<?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>Difference between DFU and Segger Studio Build and Run/Debug</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70217/difference-between-dfu-and-segger-studio-build-and-run-debug</link><description>Hello, 
 I have a custom nrf52832 board with a SparkFun HX711 load cell. 
 I&amp;#39;ve developed my firmware using Segger Studio testing my data through a BLE connection with the option Build and Debug or Run. Let&amp;#39;s call writing the firmware using Segger&amp;#39;s Studio</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Jan 2021 16:03:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70217/difference-between-dfu-and-segger-studio-build-and-run-debug" /><item><title>RE: Difference between DFU and Segger Studio Build and Run/Debug</title><link>https://devzone.nordicsemi.com/thread/288021?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2021 16:03:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e665f976-c947-489e-b235-686a4100a9b7</guid><dc:creator>PauDC</dc:creator><description>&lt;p&gt;Thanks Awneil and Edvin.&lt;/p&gt;
&lt;p&gt;While debugging I saw an error in my code that somehow it only triggered when using method b.&lt;/p&gt;
&lt;p&gt;Nevertheless I&amp;#39;m going to keep testing what both of you said, just to understand everything.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difference between DFU and Segger Studio Build and Run/Debug</title><link>https://devzone.nordicsemi.com/thread/288014?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2021 15:36:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28057f53-9395-49af-8b8a-5c15d5e6aa8b</guid><dc:creator>awneil</dc:creator><description>[quote userid="89030" url="~/f/nordic-q-a/70217/difference-between-dfu-and-segger-studio-build-and-run-debug/287999#287999"]What do you mean by cold start[/quote]
&lt;p&gt;Starting immediately after a power-up or System Reset - when all the chips systems, registers, and peripherals will be in the defined initial states.&lt;/p&gt;
&lt;p&gt;With a bootloader, it&amp;#39;s that bootloader that runs immediately after a reset or power-up; not your code - your code doesn&amp;#39;t get to start until after the bootloader has run.&lt;/p&gt;
&lt;p&gt;Therefore the bootloader may have changed some stuff from its reset defaults. If your code is relying upon the&amp;nbsp;&lt;span&gt;reset defaults, it won&amp;#39;t behave as expected...&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difference between DFU and Segger Studio Build and Run/Debug</title><link>https://devzone.nordicsemi.com/thread/288011?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2021 15:27:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3155f03-0dd5-4ab0-ade2-a4264bcedf58</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I agree with Awneil. You should try to debug your B version. Your application samples some data and sends it over BLE, I assume. Based on your figures, it looks like B has less samples than A (Less frequently sampled). So you need to debug to check whether:&lt;/p&gt;
&lt;p&gt;1: B doesn&amp;#39;t sample as often as A.&lt;/p&gt;
&lt;p&gt;2: B samples as often as A, but is not able to send all the data through BLE. Hint: Check the return value of the function that is sending data, probably sd_ble_gatts_hvx().&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To debug in SES while you have the bootloader programmed, make sure that B is flashed either by performing the DFU, or by flashing directly in addition to generating and flashing bootloader settings (using nrfutil). Then press &amp;quot;Target&amp;quot; -&amp;gt; &amp;quot;Attach Debugger&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you hit build and run, then Segger will flash the application, and the bootloader will reject the application, because no bootloader settings are matching the application.&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: Difference between DFU and Segger Studio Build and Run/Debug</title><link>https://devzone.nordicsemi.com/thread/287999?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2021 15:08:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d34e6806-f9a8-4b7e-9846-73c5c8b20ff3</guid><dc:creator>PauDC</dc:creator><description>&lt;p&gt;Hello Awneil, Thanks for the fast reply.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m going to try to print some timestamps when the load cell is reading the data to check if the issue is here.&lt;/p&gt;
&lt;p&gt;Now I&amp;#39;m receiving the number of packets I&amp;#39;m expecting, it&amp;#39;s just like the data doesn&amp;#39;t update as fast as it did before.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t understand your last sentence. What do you mean by cold start and the state of the bootloader?&lt;/p&gt;
&lt;p&gt;I mean I update the firmware correctly. I can reset the device as many times as I want that the result is always the same.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difference between DFU and Segger Studio Build and Run/Debug</title><link>https://devzone.nordicsemi.com/thread/287984?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2021 14:42:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f877751e-7e64-46af-8ca8-64a5349a6266</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;So have you tried debugging the B&amp;nbsp; version to see what&amp;#39;s going on?&lt;/p&gt;
&lt;p&gt;Looks like it might be running at different (slower) speed?&lt;/p&gt;
&lt;p&gt;Starting from a bootloader isn&amp;#39;t a &amp;quot;cold start&amp;quot; - you have to take account of what state the bootloader has left things in ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>