<?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>nRF52 ANT DFU, hangs at wait_for_events()</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/28458/nrf52-ant-dfu-hangs-at-wait_for_events</link><description>Hello, I&amp;#39;m trying to implement a buttonless DFU via ANT for a custom nRF52 board. I&amp;#39;ve got the 212 v4.02 Softdevice and I&amp;#39;m using the 14.0.0 SDK. I am able to transmit and receive via ANT, I am able to go into my bootloader, and I can progress through</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 22 Dec 2017 08:00:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/28458/nrf52-ant-dfu-hangs-at-wait_for_events" /><item><title>RE: nRF52 ANT DFU, hangs at wait_for_events()</title><link>https://devzone.nordicsemi.com/thread/112480?ContentTypeID=1</link><pubDate>Fri, 22 Dec 2017 08:00:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4dfd899b-c360-495c-9a5d-a18a0235f403</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Were you able to resolve this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ANT DFU, hangs at wait_for_events()</title><link>https://devzone.nordicsemi.com/thread/112479?ContentTypeID=1</link><pubDate>Thu, 21 Sep 2017 06:21:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8eab09ce-7c6a-40b6-ad89-5d76feb00515</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Are any modifications necessary to get the bootloader to work on the custom board? If it is, change it as little as possible. Can&amp;#39;t you just use the working bootloader hex you are using on the nRF52 on the custom board? It should start in bootloader mode if no application is present. Don&amp;#39;t bother with the application now, let&amp;#39;s just get the bootloader to work first.&lt;/p&gt;
&lt;p&gt;No, the ANT stack will not handle everything. The bootloader is handling the DFU process.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ANT DFU, hangs at wait_for_events()</title><link>https://devzone.nordicsemi.com/thread/112477?ContentTypeID=1</link><pubDate>Wed, 20 Sep 2017 18:58:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3eed5537-7ab8-4181-b07f-25c062f60794</guid><dc:creator>DGraham</dc:creator><description>&lt;p&gt;I&amp;#39;ve taken the modifications that were done on the nRF52 DK project and I&amp;#39;ve implemented them in my current project.  If I run things on the nRF52 DK I can connect immediately, and I am able to initialize the upload less than a second after I press upload on the OTA program.  On the custom board I can connect immediately,, and when I try to upload it sits at 0%.  I tried to look at the logs and it doesn&amp;#39;t really give any real information other than the timeout.&lt;/p&gt;
&lt;p&gt;Just to clarify, once I&amp;#39;m able to connect via ANT-FS and the OTA Updater program and I click update, isn&amp;#39;t everything supposed to be handled by the ANT stack?  Even if I force the device into the DFU mode without ever entering the program application it doesn&amp;#39;t work.  I am still able to connect. Is this a settings issue?  Something in the sdk_config.h?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ANT DFU, hangs at wait_for_events()</title><link>https://devzone.nordicsemi.com/thread/112475?ContentTypeID=1</link><pubDate>Tue, 19 Sep 2017 09:17:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ac3a826-b191-45da-b285-a9cded101c29</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Not sure. You are able to do this on the nRF52 DK? With that hex?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ANT DFU, hangs at wait_for_events()</title><link>https://devzone.nordicsemi.com/thread/112474?ContentTypeID=1</link><pubDate>Mon, 18 Sep 2017 17:02:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17c1fc95-3f04-407e-ad66-e6f276d4ddb5</guid><dc:creator>DGraham</dc:creator><description>&lt;p&gt;You were correct, I needed to add the ANT_FS_NETWORK_KEY (and I added the ANT+ network key too).  Now I am able to connect to the device, but I am unable to upload an image.  It says I have 421888 free space, and my .hex is only 49152.&lt;/p&gt;
&lt;p&gt;When I look at the ao_debug_ANTFSHost.txt file, it shows the device being found, has data, has upload enabled, is not in pairing mode, and is a match. It shows some pinging, downloads, and requests, and then it starts &amp;quot;Requesting Upload...&amp;quot; and continues to do so until it says:&lt;/p&gt;
&lt;p&gt;&amp;quot;    36.156 {   2422468}: ANTFSHostChannel::Upload():  Timeout.
36.156 {   2422468}: ANTFSHostChannel::UploadLoop(): RETURN_FAIL - 2412937
36.281 {   2422593}: ANTFSHostChannel::Upload():  Tx error sending upload command.&amp;quot;&lt;/p&gt;
&lt;p&gt;At this point I lose connection and I am unable to reconnect without restarting the device and putting it back into bootloader DFU mode.  What should I do to solve this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ANT DFU, hangs at wait_for_events()</title><link>https://devzone.nordicsemi.com/thread/112478?ContentTypeID=1</link><pubDate>Mon, 18 Sep 2017 10:58:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19b925fe-0f94-4d5d-9b8f-223f2e5bd084</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure what those defines have to do with the network key? Have you defined ANT_FS_NETWORK_KEY? It will be all zeroes if not modified, and then I don&amp;#39;t think it will work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ANT DFU, hangs at wait_for_events()</title><link>https://devzone.nordicsemi.com/thread/112476?ContentTypeID=1</link><pubDate>Fri, 15 Sep 2017 21:35:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2124c573-a017-4434-a6ca-a03450200681</guid><dc:creator>DGraham</dc:creator><description>&lt;p&gt;I haven&amp;#39;t tried the bootloader without application code, no. I guess I can try that out here in a minute.&lt;/p&gt;
&lt;p&gt;I am using the same bootloader, however I have ANTFS_CONFIG_AUTH_TYPE_PASSKEY_ENABLED set to 0 and ANTFS_CONFIG_AUTH_TYPE_PASSTHROUGH_ENABLED set to 1, so I don&amp;#39;t think it&amp;#39;s the network key.&lt;/p&gt;
&lt;p&gt;I know my application code and my bootloader code have different sdk_config.h files, so is there some conflict I need to be resolving in there or something?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ANT DFU, hangs at wait_for_events()</title><link>https://devzone.nordicsemi.com/thread/112470?ContentTypeID=1</link><pubDate>Fri, 15 Sep 2017 09:18:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc051dbc-14d7-4558-b68f-280ca47f8625</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I meant without the buttonless application. Only SoftDevice and bootloader. Then you should start in the bootloader directly, but as I said shot in the dark.&lt;/p&gt;
&lt;p&gt;There is a trick you can do to be able do debug. If you set optimizations to 0, then increase the amount of flash set aside for the bootloader and set the new start address in UICR. I set the flash start to 0x77000 and size to 0x9000. Then you you can change the BOOTLOADER_REGION_START to 0x77000.&lt;/p&gt;
&lt;p&gt;Have you checked with ANTware that the bootloader is actually broadcasting?&lt;/p&gt;
&lt;p&gt;Are you using the exact same bootloader firmware on the nRF52 DK and the custom board? If not, could it be that you forgot to set the ANT-FS network key? ANT_FS_NETWORK_KEY&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ANT DFU, hangs at wait_for_events()</title><link>https://devzone.nordicsemi.com/thread/112471?ContentTypeID=1</link><pubDate>Thu, 14 Sep 2017 22:21:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:214d620c-1d58-41f1-9dbc-2f0f00d0f100</guid><dc:creator>DGraham</dc:creator><description>&lt;p&gt;I received another one of my custom boards.  Same symptoms on that board as the first one.  I am able to do everything ANT I could want within the application, but I am unable to connect with the OTA DFU program when I put it into bootloader DFU mode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ANT DFU, hangs at wait_for_events()</title><link>https://devzone.nordicsemi.com/thread/112469?ContentTypeID=1</link><pubDate>Thu, 14 Sep 2017 17:15:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abcea543-1811-4b16-a15c-05c40c09cf8d</guid><dc:creator>DGraham</dc:creator><description>&lt;p&gt;Yes, I&amp;#39;m using an external crystal with a tolerance of 40ppm.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t really follow when you say use the bootloader directly as I am using the bootloader.  I am able to parse an incoming ANT event, set a persistent flag, and read the flag in the bootloader.  That&amp;#39;s how I&amp;#39;m pushing to the DFU mode, but once I progress through that it hangs/times out as I described previously.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m going to get another one of my custom boards later today and I will try and investigate if it&amp;#39;s a hardware issue, but I don&amp;#39;t really understand how it could be.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ANT DFU, hangs at wait_for_events()</title><link>https://devzone.nordicsemi.com/thread/112468?ContentTypeID=1</link><pubDate>Thu, 14 Sep 2017 13:29:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76f8fc65-c1fd-4af0-9ef0-4342ead35055</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Just to confirm, you have a LFXO witha frequency tolerance less than 50 ppm? It is weird that it works in application code, and on the nRF52 DK as well.&lt;/p&gt;
&lt;p&gt;Have you tried to use the bootloader directly? It is a shot in the dark though. Sounds to me like it is some kind of hardware issue, but I&amp;#39;m not sure what. Have you tested with several of these custom boards?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ANT DFU, hangs at wait_for_events()</title><link>https://devzone.nordicsemi.com/thread/112473?ContentTypeID=1</link><pubDate>Wed, 13 Sep 2017 17:20:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:972be0da-687e-473c-9dfd-2dd603f99eef</guid><dc:creator>DGraham</dc:creator><description>&lt;p&gt;Quick update, when I try to debug the DFU stuff I am able to breakpoint up until it enters bootloader_dfu_start(), but I can&amp;#39;t breakpoint within the bootloader.c code, so it&amp;#39;s hard to get an idea of what is going on in the registers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ANT DFU, hangs at wait_for_events()</title><link>https://devzone.nordicsemi.com/thread/112472?ContentTypeID=1</link><pubDate>Wed, 13 Sep 2017 17:09:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7da9c166-34e5-453e-9a21-c095ae39d855</guid><dc:creator>DGraham</dc:creator><description>&lt;p&gt;Hi Petter,&lt;/p&gt;
&lt;p&gt;Yes, it works fine on the nRF52 DK.  There are a bunch of hardware differences between my custom device and the DK, but ultimately I don&amp;#39;t know how they would contribute to this issue.  Both are using the nRF52832, but mine is on a custom board without any of the same buttons, LEDs, onboard programming. Mine is using an external crystal that meets ANT spec, uses a different VReg system, connects to peripherals over the TWI interface, etc. etc. Keep in mind, I am attempting to do this buttonless (which I&amp;#39;ve been able to do on the DK).&lt;/p&gt;
&lt;p&gt;Again, the weird part is that I am able to broadcast ANT in the application code, so I don&amp;#39;t understand why it wouldn&amp;#39;t be able to do the DFU stuff in the bootloader code.  Is there something on the hardware side of things that makes DFU possible?  What else should I be looking at?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ANT DFU, hangs at wait_for_events()</title><link>https://devzone.nordicsemi.com/thread/112467?ContentTypeID=1</link><pubDate>Wed, 13 Sep 2017 10:50:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db455891-3c7b-4e20-9c41-0ac8316f5463</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;So it works perfectly on the nRF52 DK? Any important hardware differences between the nRF52 DK and the custom board?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>