<?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>How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80283/how-to-use-the-trigger-library-to-program-the-nrf52840-dongle</link><description>Sorry but I find the documentation useless. I don&amp;#39;t even know where to start. It could be I have not found the correct documentation which is not surprising. 
 The best I have is this: https://devzone.nordicsemi.com/f/nordic-q-a/77254/nrf52840-dongle</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 01 Nov 2021 08:48:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80283/how-to-use-the-trigger-library-to-program-the-nrf52840-dongle" /><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/336796?ContentTypeID=1</link><pubDate>Mon, 01 Nov 2021 08:48:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80572277-0970-4464-9c71-e3572342979e</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;Once I got it to build and it still didn&amp;#39;t work I thought it was time for a new thread. Turns out there are some additional problems I don&amp;#39;t understand that need to be addressed in order for the USB to enumerate on Windows. I also had competition on the handling of the SoftDevice sd_app_evt_wait()/get() mehtods.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/336794?ContentTypeID=1</link><pubDate>Mon, 01 Nov 2021 08:42:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06df1138-df23-4342-b566-c6341cd81776</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I see you are deeper into this discussion in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/81194/trigger-library-does-not-work"&gt;this thread&lt;/a&gt;, so I suggest continuing there instead of speeding the discussion across multiple threads.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/336631?ContentTypeID=1</link><pubDate>Fri, 29 Oct 2021 09:35:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13c0aa67-afea-4b7c-af12-bc65db2ca6e3</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;Einar,&lt;/p&gt;
&lt;p&gt;where I avoid the SDK is with respect to Bluetooth. It&amp;#39;s the only part of all this material I have any understanding of. Personally I find it much easier to use the basic GATT/GAP concepts (which I understand and know) provided by SoftDevice than trying to learn the SDK. In addition, I am working on a new standard and there is no support for it in the SDK. I also needed to work with multiple different versions of the Nordic MCUs and the changes in the SDK were huge whereas the changes in SoftDevice were not. That makes my code easier to port. Lastly, I started all this work using the pc-ble-driver and you had no choice but to use SoftDevice. I wrote a series of test suites for clients that supported the BT-SIG health device profiles and got quite familiar with SoftDevice.&lt;/p&gt;
&lt;p&gt;This new standards project came a year later and to me it was very important to see how difficult it is to implement this new standard on real embedded systems - not mock ones on a PC with its powerful OS. But I am no embedded programmer. Have little experience, So with respect to everything else but GATT/GAP, I 100% rely on these examples to get the MCU up and running so I can do Bluetooth.&lt;/p&gt;
&lt;p&gt;So long story short - YOU BET I USE BSP!&lt;/p&gt;
&lt;p&gt;Okay - so back to DFU (again which I do not have a good understanding of how it works with this GPIO and stuff).&lt;/p&gt;
&lt;p&gt;I set shared to 0, and therefore I assume my interface number is 0 as this is the first one.&lt;/p&gt;
&lt;p&gt;In the connectivity example I see two USB callbacks - one in main (usbd_user_evt_handler) and another one in the trigger library code (usbd_user_evt_handler). I assume the one in main is for serializing data over USB such as with the pc-ble-library. If I can use the&amp;nbsp;&lt;span&gt;&amp;nbsp;BOARDS_WITH_USB_DFU_TRIGGER option and have my&amp;nbsp;bsp_board_init() call do all the setup work including initializing USB I am a happy camper!&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;My concern is that I also had to take over the handling of events by using&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;sd_app_evt_wait(0 and&amp;nbsp;sd_ble_evt_get() in my main for(;;) loop that every example calls because my data stream was longer than a MTU and had to be fragmented. I fell onto situations where I had to wait for the TX queue to empty and since there was no semaphore support the only way to do an efficient wait was sd_app_evt_wait(). That really shook up my code design! But I have gotten it to work and have been using it for quite a while now.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So with this DFU, will my sd_app_evt_wait() and sd_ble_evt_get() conflict with the&amp;nbsp;soc library&amp;#39;s use of sd_evt_get()? I note the connectivity app also &amp;#39;clears&amp;#39; some registers in the on_idle() call in main(). I do not understand this.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/336600?ContentTypeID=1</link><pubDate>Fri, 29 Oct 2021 07:57:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa4120ff-f765-4554-b998-ff355adbd07e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I see. For instance&amp;nbsp;BOARDS_WITH_USB_DFU_TRIGGER is used by the BSP to call nrf_dfu_trigger_usb_init() for you during&amp;nbsp;bsp_board_init(). If you do not use the BSP (which I assume not, as&amp;nbsp; you seem to prefer to avoid as many libraries as possible?), then you call&amp;nbsp;nrf_dfu_trigger_usb_init() directly in your code instead, as is done in the ble_connectivity example.&lt;/p&gt;
&lt;p&gt;If you do not use USB for anything else,&amp;nbsp;NRF_DFU_TRIGGER_USB_USB_SHARED should be 0.&lt;/p&gt;
&lt;p&gt;Note that if this case a lot of problems and you have another way of communicating with your app, you could also use a custom way to enter DFU mode. As long as you are able to tell your application that it should enter DFU mode in one way or another (the DFU trigger library implementing one of them via USB), then actually entering DFU mode is straight-forward.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/336521?ContentTypeID=1</link><pubDate>Thu, 28 Oct 2021 14:08:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa5b4d31-8721-4cdb-a322-9090222ac563</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;There are a lot of opens. I thought I only had to call the triigger init method in my app. But I have been looking at others who have had problems and there are all kinds of things I still don&amp;#39;t know about. Some posts are old enough they might no longer apply.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;BOARDS_WITH_USB_DFU_TRIGGER&amp;nbsp; being one&lt;/p&gt;
&lt;p&gt;The SHARED and INTERFACE number for another&lt;/p&gt;
&lt;p&gt;and I do not have USB in my original app so it looks like I have to do those usb init and unsb enable and callbacks for events. I will have an additional challenge as I handle events myself in the infinite for loop&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/336484?ContentTypeID=1</link><pubDate>Thu, 28 Oct 2021 12:44:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83218688-4bc8-4ab2-b26a-e7d5b546a281</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="brianreinhold"]The APP worked, but nRF Connect stated no Nordic DFU Trigger library found. So all that was pointless.[/quote]
&lt;p&gt;It seems like you have done a good part of the job now, so I it&amp;nbsp;should not be pointless even though apparently&amp;nbsp;something is missing.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you remember to initialize the USB driver and DFU trigger library,&amp;nbsp;similarly to how it is tone in&amp;nbsp;examples/connectivity/ble_connectivity/main.c?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/336417?ContentTypeID=1</link><pubDate>Thu, 28 Oct 2021 10:54:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43e1ec3a-6ebd-4f73-b4cb-667d14a874f1</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;Well, here I go again. Since my app uses no USB, I take it I am NOT shared&lt;/p&gt;
&lt;p&gt;//==========================================================&lt;br /&gt;// &amp;lt;h&amp;gt; nrf_dfu_trigger_usb - USB DFU Trigger library&lt;/p&gt;
&lt;p&gt;//==========================================================&lt;br /&gt;// &amp;lt;q&amp;gt; NRF_DFU_TRIGGER_USB_USB_SHARED - Flag indicating whether USB is used for other purposes in the application.&lt;/p&gt;
&lt;p&gt;#ifndef NRF_DFU_TRIGGER_USB_USB_SHARED&lt;br /&gt;#define NRF_DFU_TRIGGER_USB_USB_SHARED&amp;nbsp;0&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;// &amp;lt;o&amp;gt; NRF_DFU_TRIGGER_USB_INTERFACE_NUM - The USB interface to use for the DFU Trigger library. &amp;lt;0-255&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;// &amp;lt;i&amp;gt; According to the USB Specification, interface numbers cannot have&lt;br /&gt;// &amp;lt;i&amp;gt; gaps. Tailor this value to adhere to this limitation.&lt;/p&gt;
&lt;p&gt;#ifndef NRF_DFU_TRIGGER_USB_INTERFACE_NUM&lt;br /&gt;#define NRF_DFU_TRIGGER_USB_INTERFACE_NUM&amp;nbsp;1&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I finally got it to build. Copy path between two instances of SES and KEIL was the savior here. The final size went only to 22K from 10K which wasn&amp;#39;t so bad BUTit did not work. The APP worked, but nRF Connect stated no Nordic DFU Trigger library found. So all that was pointless.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/336369?ContentTypeID=1</link><pubDate>Thu, 28 Oct 2021 08:56:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c76a7be-6190-4037-b3cd-b84bde244cff</guid><dc:creator>Einar Thorsrud</dc:creator><description>[quote user="brianreinhold"]So what you are saying is all the way at the beginning. I have to hunt and peck for all those c-files and h-files and sdk_config.h options. [/quote]
&lt;p&gt;Yes. That is not very fun work but that is how it is in the nRF5 SDK. (In the nRF Connect SDK most of this is automated using CMake).&lt;/p&gt;
[quote user="brianreinhold"]There has go to be a feasible way to do this.[/quote]
&lt;p&gt;Yes. The best approach is to look at an example and add what you think are relevant C files, include directories and sdk_config.h sections. After that try to build and fix errors as you go.&lt;/p&gt;
[quote user="brianreinhold"]the errors you get are missing methods - which doesn&amp;#39;t help you find the c-file.[/quote]
&lt;p&gt;It is the opposite, actually. You just have to&amp;nbsp;search for what is missing to see which file it is defined in. Then you probably have not included the file, or is missing an sdk_config.h define that makes the preprocessor remove what you need.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/336362?ContentTypeID=1</link><pubDate>Thu, 28 Oct 2021 08:42:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c68f75df-cfc7-4cdc-99e8-be96cd0359f6</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;So this is for the pc-ble-driver. The first thing I ever did with Nordic hardware was use the pc-ble-driver (and the system info restore on a bonded reconnect bug is still there)- I wrote test suites for BT-SIG profile health device clients - that is why all my current projects use SoftDevice only for BTLE as with the pc-ble-driver that&amp;#39;s all you can use. I like working with SoftDevice only, however, as the Bluetooth is the only part of all this stuff I have a decent understanding of.&lt;/p&gt;
&lt;p&gt;So what you are saying is all the way at the beginning. I have to hunt and peck for all those c-files and h-files and sdk_config.h options. If I do that I then can use the NRF Connect as the DFU client (or whatever the sender of the updated code is called).&lt;/p&gt;
&lt;p&gt;There has go to be a feasible way to do this. Those c-files are all over the place throughout the SDK, and the errors you get are missing methods - which doesn&amp;#39;t help you find the c-file.Wonder if it would be possible to hack into the SES or Keil project files though I still wouldn&amp;#39;t know which of them were relevant for for the trigger. It is far more than just USB as I found out.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/336323?ContentTypeID=1</link><pubDate>Thu, 28 Oct 2021 06:23:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ba9371b-f148-443c-934f-9717ba1b409f</guid><dc:creator>Einar Thorsrud</dc:creator><description>[quote user="brianreinhold"]Okay, now that I am going to try and make the merge between this 70K DFU and my 10K app, I have not been able to find any documentation about this example. So how does it work?[/quote]
&lt;p&gt;The&amp;nbsp;ble_connectivity project? It demonstrates serialization, so you can refer to the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_serialization.html"&gt;serialization documentation&lt;/a&gt;. From what I understand you don&amp;#39;t actually need this project, you just wanted to start with project files that has the needed dependencies for the USB DFU trigger library, is that still the case? If so, I guess the details of serialization is not relevant, as you are anyway going to strip that away.&lt;/p&gt;
[quote user="brianreinhold"]here is BTLE stuff in the project. Does that mean the huge USB stuff is just to enter DFU mode and the actual download of the application is via Bluetooth?[/quote]
&lt;p&gt;No, it does not mean that. This project is intended so that one device can send SoftDevice API commands over a&amp;nbsp;serial interface (like USB) to use the device running this example as a connectivity IC. So this&amp;nbsp;example use both USB and bluetooth. The example code itself does not do DFU at all, as that is handled by the bootloader. But it uses the USB DFU trigger library to enter DFU mode via USB. That is really the only thing this project does that is relevant for you as far as I understand it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/336274?ContentTypeID=1</link><pubDate>Wed, 27 Oct 2021 15:24:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a691426-f842-4089-8d47-96d74d46ae4d</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;Okay, now that I am going to try and make the merge between this 70K DFU and my 10K app, I have not been able to find any documentation about this example. So how does it work? There is BTLE stuff in the project. Does that mean the huge USB stuff is just to enter DFU mode and the actual download of the application is via Bluetooth?&lt;/p&gt;
&lt;p&gt;If there IS documentation for this example somewhere, it would be great if you could tell me where it is.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/335725?ContentTypeID=1</link><pubDate>Mon, 25 Oct 2021 12:05:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f48f98f-859d-43b4-be3b-0ed4564ee1db</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;In that case you would have the required libraries, drivers and sdk_config.h configurations in place, yes. There will probably be other adaptations needed for your project though, but this may be the simplest approach.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/335697?ContentTypeID=1</link><pubDate>Mon, 25 Oct 2021 11:09:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93b6fae0-f4eb-426a-ac32-06e23b112851</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;Okay. So if I copied my application code into&amp;nbsp;&lt;span&gt;examples\connectivity\ble_connectivity\pca10059\ser_s140_usb_hci&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;that should provide the necessary trigger support? I just got overwhelmed going the other way and never reached the end of adding more c files and include files never mind the sdk_config.h 90% of which I do not know what it does.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/335666?ContentTypeID=1</link><pubDate>Mon, 25 Oct 2021 09:16:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68656650-2c85-4471-9ba7-5d1eb4bfced4</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="brianreinhold"](I still have not figured out how to make quotes like you have done.)[/quote]
&lt;p&gt;When you highlight text there is a &amp;quot;Quote&amp;quot; button you can press to quote:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/quote.PNG" /&gt;&lt;/p&gt;
[quote user="brianreinhold"]So if I understand you correctly, even though my app is NOT YET INSTALLED on the dongle, by including the trigger library and all the usb and related stuff around it into my app I will be able to install this app onto the dongle without pressing the reset button - even though the nRF COnnect programmer does not see the dongle. I don&amp;#39;t understand how that will work![/quote]
&lt;p&gt;No. Clearly, any discussion about what you can do from your app only applies when it is actually programmed on the device. Note that the dongle ships with a version of the connectivity firmware installed which includes the DFU Trigger library. So with a new dongle, it will show up in nRF Connect programmer. If you hare programmed it with firmware without the DFU trigger library it will not, and in that case you need to recover by pressing the reset button. If you need the DFU trigger library functionality it is your responsibility to not flash firmware that does not have it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/335662?ContentTypeID=1</link><pubDate>Mon, 25 Oct 2021 09:09:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4132d7d6-9864-4876-824d-4862b74ea567</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;(I still have not figured out how to make quotes like you have done.)&lt;/p&gt;
&lt;p&gt;So if I understand you correctly, even though my app is NOT YET INSTALLED on the dongle, by including the trigger library and all the usb and related stuff around it into my app I will be able to install this app onto the dongle without pressing the reset button - even though the nRF COnnect programmer does not see the dongle. I don&amp;#39;t understand how that will work!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;That being said, it sounds like it would be easier to copy my app code into&amp;nbsp;&lt;span&gt;examples\connectivity\ble_connectivity\pca10059\ser_s140_usb_hci&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;than trying to find and configure SES or Keil with the mssing project files and h files. I had gotten a couple of hours into that and new mssing references just kept coming and trying to find them inthe SDK was a tedious and time consuming task.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/335660?ContentTypeID=1</link><pubDate>Mon, 25 Oct 2021 08:59:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:196fb479-7bee-4def-b440-27307b5cdf80</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="brianreinhold"]What I want to be able to do is to install my application and all the support software onto the dongle without ever pressing the reset button. I don&amp;#39;t want to have to push the reset button the first time I program the dongle or the Nth time I program it.[/quote]
&lt;p&gt;I see. So the question about BLE was not relevant then? I assume USB DFU is the only thing you want. In that case, you can ignore what I wrote about the buttonless DFU service and Buttonless DFU Template Application in my previous reply.&lt;/p&gt;
[quote user="brianreinhold"]In addition, If I use the nRF Connect Programming app it does not see the dongle unless the reset button is pushed. But I cannot access the reset button. Is there a way around that?[/quote]
&lt;p&gt;The workaround for that is to include the DFU triggers library, as we have discussed before. That is designed for this exact use case.&lt;/p&gt;
[quote user="brianreinhold"]Okay, maybe its going to cost me downloading a 70-80K support application in order to use a 10K application though I am still unclear as to how to do that. It appears that some simply install a separate app that is only a DFU and then they install their app in addition; That does sound easier than messing up my app with trigger support given that the trigger support code is so huge it completely obscures my stuff. A three-app solution sounds better (1) SoftDevice (2) DFU (3) My application. Easier to maintain as well.[/quote]
&lt;p&gt;I am not sure why that would be easier. Most of the USB related stuff here would be isolated to SDK libraries and drivers, and you can make a clear separation between this and the rest of your application.&amp;nbsp;The SDK bootloader does not support multiple apps. Also, I do not see how multiple apps would support this. You would need a method to trigger the other app then, which should in turn trigger DFU mode. But if you have a method to trigger the new app, then you could just trigger DFU mode instead. So this would just complicate things much more and not bring any value. This reminds me to re-iterate an important point: There is no need for you to use the DFU trigger library to trigger bootloader mode if you do not want to. You can use any method, as long as you are able to inform your application somehow that it should enter DFU mode, then actually entering DFU mode is a simple task.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/335657?ContentTypeID=1</link><pubDate>Mon, 25 Oct 2021 08:47:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9940a517-658a-4214-8276-6527a426131c</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;Okay, I am getting so confused here let&amp;#39;s fall back on what I need to do. I think there have been a number of rabbit holes that have been entered and now I don&amp;#39;t know where I am.&lt;/p&gt;
&lt;p&gt;The problem sounds simple. I have a BTLE application which works on the nRF52840 DK and the nRF52840 dongle. The only problem is that I have to press the reset button in order to install my application and SoftDevice onto the dongle. In addition, I must use the nRF Connect Programmer to install. (This is far superior to be forced to use a command line implementation.)&lt;/p&gt;
&lt;p&gt;What I want to be able to do is to install my application and all the support software onto the dongle without ever pressing the reset button. I don&amp;#39;t want to have to push the reset button the first time I program the dongle or the Nth time I program it.&lt;/p&gt;
&lt;p&gt;In addition, If I use the nRF Connect Programming app it does not see the dongle unless the reset button is pushed. But I cannot access the reset button. Is there a way around that?&lt;/p&gt;
&lt;p&gt;Okay, maybe its going to cost me downloading a 70-80K support application in order to use a 10K application though I am still unclear as to how to do that. It appears that some simply install a separate app that is only a DFU and then they install their app in addition; That does sound easier than messing up my app with trigger support given that the trigger support code is so huge it completely obscures my stuff. A three-app solution sounds better (1) SoftDevice (2) DFU (3) My application. Easier to maintain as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/335620?ContentTypeID=1</link><pubDate>Mon, 25 Oct 2021 06:30:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b20fce1-84f6-4960-8816-c09ca51e82fd</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="brianreinhold"]If I add the BLE DFU to talk to my application and do all that other stuff you mentioned above, how do I get my application onto the dongle? I cannot press the reset button.[/quote]
&lt;p&gt;For buttonless DFU you want the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/service_dfu.html"&gt;buttonless DFU service&lt;/a&gt;. That is demonstrated by the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/ble_sdk_app_buttonless_dfu.html"&gt;Buttonless DFU Template Application&lt;/a&gt;.&lt;/p&gt;
[quote user="brianreinhold"]\examples\connectivity\ble_connectivity\pca10059\ser_s140_usb_hci\[/quote]
&lt;p&gt;The examples under&amp;nbsp;\examples\connectivity\ble_connectivity\ are intended to be used when the nRF is a connectivity device. Then the SoftDevice APIs are exposed via a serial interface (typically UART or SPI). This is for instance the basis for the connectivity firmware used by the pc-ble-driver, though that patches the example extensively. There are also some other examples that are in folders starting with &amp;quot;ser_&amp;quot; and these are then for the host side, so that you use these examples on one DK, and the connectivity firmware on another. You can refer to the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_serialization.html"&gt;Serialization documentation&lt;/a&gt; as well as &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/nrf51_setups_serialization.html"&gt;Running a serialized application&lt;/a&gt;&amp;nbsp;if you want to know more about this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/335546?ContentTypeID=1</link><pubDate>Fri, 22 Oct 2021 19:03:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5318be61-d930-4643-8595-a7fe93274a42</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;If I add the BLE DFU to talk to my application and do all that other stuff you mentioned above, how do I get my application onto the dongle? I cannot press the reset button.&lt;/p&gt;
&lt;p&gt;Another&amp;nbsp; hurdle - no documentation on&lt;/p&gt;
&lt;p&gt;&lt;span&gt;\examples\connectivity\ble_connectivity\pca10059\ser_s140_usb_hci\&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;There is no documentation on any of the examples in &amp;#39;connectivity&amp;#39; as far as I can tell. I don&amp;#39;t even know what this example is supposed to do.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/332854?ContentTypeID=1</link><pubDate>Wed, 06 Oct 2021 13:23:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c352abb-8577-4d02-91c7-bf613bf430a6</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I am not sure exactly what information/documentation you seek. There is no specific tutorial for adding the DFU trigger library to an application that does not use USB from before, so you have to do this yourself. There is nothing special about the DFU trigger library here, so you should do the same there as with other modules/libraries. In practice this is not hard though, as you generally just have to correct compiler errors and warnings along the way, but it a bit tedious an annoying. This is the same as for adding other libraries/modules.&lt;/p&gt;
[quote user="brianreinhold"]The huge overhead will probably also mean a corresponding cost in power - memory alone.[/quote]
&lt;p&gt;I do not see how flash usage itself increases power consumption.&lt;/p&gt;
[quote user="brianreinhold"]It there alternative approaches to programming the dongle without pressing the reset and using the USB (imagine the dongle in a sealed shell so you are stuck with the USB)?[/quote]
&lt;p&gt;Yes and no. If you build a bootloader that has&amp;nbsp;NRF_BL_DFU_ENTER_METHOD_GPREGRET set to 1 in the bootloader&amp;#39;s sdk_config.h that will allow you to enter bootloader mode by simply writing a magic word to the retention register and doing a soft reset. If you are using the USB bootloader that shipped with the dongle without any modification that does not work, but in this case you can trigger DFU mode by asserting pin reset using a GPIO connected to the reset pin. See the handling of&amp;nbsp;APP_USBD_NRF_DFU_TRIGGER_USER_EVT_DETACH in&amp;nbsp;components\libraries\bootloader\dfu\nrf_dfu_trigger_usb.c. In any case you would need a method to tell your firmware that it should enter DFU mode though. We provide the DFU trigger library to do this via DFU, but if you have another method of communication you can use that as well (UART, BLE, whatever).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/332852?ContentTypeID=1</link><pubDate>Wed, 06 Oct 2021 13:11:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a905d8d-8c53-4c19-89dc-54a2c2949fe0</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;So I take it this information is not documented anywhere. It&amp;#39;s figure it out from the example. No wonder so many are having issues.&lt;/p&gt;
&lt;p&gt;And as I said above, I use both compilers, Keil and Segger. The huge overhead will probably also mean a corresponding cost in power - memory alone. It there alternative approaches to programming the dongle without pressing the reset and using the USB (imagine the dongle in a sealed shell so you are stuck with the USB)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/332838?ContentTypeID=1</link><pubDate>Wed, 06 Oct 2021 12:46:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc30e7eb-4a62-4abe-8eba-32cba11ef019</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I understand the problem, but this is the way it is. You will probably not be able to get this to fit within the size limitation of Keil, so you should consider an alternative. Either obtain a Keil silence, or use Segger Embedded Studio, which is also an excellent IDE which you can use free of charge when developing for a nRF device.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/332829?ContentTypeID=1</link><pubDate>Wed, 06 Oct 2021 12:11:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:056bd58d-64c8-49a3-b5fb-612d0cc76ea5</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;My original project used no USB. Its a BTLE project which advertises&amp;nbsp;as a cycle power and heart rate service. When connected it starts scanning for non connectable advertisements sent by a stationary exercise bike. It decodes the advertisement and notifies the connected client the power, crank, and heart rate data.&lt;/p&gt;
&lt;p&gt;The project uses the LEDs, SoftDevice for BTLE and flash writes and not much else besides all the necessary files for the board and other hardware support like the RTC. There are probably files I don&amp;#39;t need still in the project but I have no idea what many of them do. I have tried to get rid of all superfluous material but I am sure I am no where close.&lt;/p&gt;
&lt;p&gt;The compiled image according to Keil (with logging disabled) is 10K. It&amp;#39;s pretty small which is nice.&lt;/p&gt;
&lt;p&gt;It does not use any USB.&lt;/p&gt;
&lt;p&gt;Building the example project cited above gives 70K according to Keil. That alone is frightening. I have the size limited version of Keil but have been using it since it is better at finding potential problems with its warnings. I have&amp;nbsp;my project in Segger as well when I need intense logging at Debug level with 0 optimization which makes the code image just over the limit for Keil.&lt;/p&gt;
&lt;p&gt;As far as porting over the files from the cited project are concerned it would be nice to know from some documentation what files are necessary and where they are and what sdk_config options are necessary and what they are. Finding the source files&amp;nbsp;once you have their names is a task in itself.&amp;nbsp;Every time I added one I would get new undefined references sometime due to missing sdk_config settings and sometimes due to missing c-files or both. The c-files are scattered across several different directories as I soon learned. At least the h-files are easier to find since they are listed in the Keil config and extra h-files do not cost on the final build size or efficiency.&lt;/p&gt;
&lt;p&gt;After several hours of adding, searching, rebuilding, and just continuing to get new errors I figured I must be on the wrong track. Probably added files I didn&amp;#39;t need which required more unneeded files etc. I was adding files without usbd or trigger in the names.&lt;/p&gt;
&lt;p&gt;I am making a desperate call for documentation. From what is out there, it sounded easy as adding a few methods and a reference to a library.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/332789?ContentTypeID=1</link><pubDate>Wed, 06 Oct 2021 10:37:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76b5dcb6-c5b8-47d9-963a-a7d593056d40</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is not that much to say really, other than that yes, there are a log of dependencies, and if you want to use the USB DFU trigger library you need to add them all.&amp;nbsp; If your project use USB allready they will probably not add too much. If it does not, then there is quite a bit.&lt;/p&gt;
&lt;p&gt;If you refer to the example I suggested, you can use that as a reference. Or you can base what you do on build warnings/error. Looking at the log you posted you can check which files those symbols are defined in, and make sure you add related .c files and include paths. And also remember to enable the relevant parts of sdk_config.h. I suggest you copy large sections of the example sdk_config.h, yes. Not necessarily everything, but for instance if adding USB copy the whole section, and then adapt afterwards if needed. That is much more efficient than picking single configuration defines at a time.&lt;/p&gt;
&lt;p&gt;This is a bit of tedious work, but this is how the nRF5 SDK is organized and so it is just how it is when you work with it (the nRF Connect SDK is better in this regard, as such tasks are automated by the build system there).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use the trigger library to program the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/332689?ContentTypeID=1</link><pubDate>Tue, 05 Oct 2021 16:03:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d60a50b7-a4b7-4a65-ab2f-7b6696a5ae02</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;This is absurd!! I am adding file after file and every time there are more and more undefined symbols.&lt;/p&gt;
&lt;p&gt;I have had to add many config items in the sdk_config.h file and there are only more undefined references.&lt;/p&gt;
&lt;p&gt;Catch this!!&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol app_usbd_nrf_dfu_trigger_class_methods (referred from nrf_dfu_trigger_usb.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrf_drv_power_init (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrf_drv_power_usbevt_init (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrf_drv_power_usbevt_uninit (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_active_irq_config (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_disable (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_enable (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_ep_disable (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_ep_dtoggle_clear (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_ep_enable (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_ep_enable_check (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_ep_handled_transfer (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_ep_stall (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_ep_stall_clear (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_ep_transfer (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_force_bus_wakeup (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_init (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_is_enabled (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_is_initialized (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_start (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_stop (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_suspend (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_suspend_irq_config (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_uninit (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_wakeup_req (referred from app_usbd.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_ep_max_packet_size_get (referred from app_usbd_core.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_ep_stall_check (referred from app_usbd_core.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_feeder_buffer_get (referred from app_usbd_core.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_last_setup_dir_get (referred from app_usbd_core.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_setup_clear (referred from app_usbd_core.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_setup_data_clear (referred from app_usbd_core.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_setup_get (referred from app_usbd_core.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_usbd_setup_stall (referred from app_usbd_core.o).&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;By the time this is done my 10K project is going to be 100K. Is this for real? How big is the overhead here? Building that project gives a size of more than 70K. I thought it would be adding two methods and a few source files and two config lines.&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t even find half of these undefined symbols. They are all over the place in the SDK&lt;/p&gt;
&lt;p&gt;Everywhere I see this Macro&lt;/p&gt;
&lt;p&gt;NRF_MODULE_ENABLED(...)&lt;/p&gt;
&lt;p&gt;The code after it is disabled. More config items copied into the sdk_config.h file and still more undefined references but some of those disables become enabled.&lt;/p&gt;
&lt;p&gt;DO I have to copy the entire sdk_config.h file into mine and then include every c-file in the project into mine?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>