<?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>[nRF52833] USB DFU Trigger Library Issue with nrfutil</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/90283/nrf52833-usb-dfu-trigger-library-issue-with-nrfutil</link><description>Hi, 
 I&amp;#39;m having an issue including USB DFU Trigger library in my prototype application running on nRF52833. 
 My application is based on the ble_uart example, to which I added Buttonless DFU Service. My bootloader is based off of secure DFU bootloader</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 Nov 2022 08:31:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/90283/nrf52833-usb-dfu-trigger-library-issue-with-nrfutil" /><item><title>RE: [nRF52833] USB DFU Trigger Library Issue with nrfutil</title><link>https://devzone.nordicsemi.com/thread/395701?ContentTypeID=1</link><pubDate>Tue, 15 Nov 2022 08:31:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10013f6d-78f0-4aa0-b0d1-f0162a670ee9</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Thanks for updating the case Marco. I&amp;#39;m glad that you found the root cause :)&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF52833] USB DFU Trigger Library Issue with nrfutil</title><link>https://devzone.nordicsemi.com/thread/395663?ContentTypeID=1</link><pubDate>Tue, 15 Nov 2022 00:35:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d8deaab-44fa-44f6-874f-34107e9f484d</guid><dc:creator>Marco R</dc:creator><description>&lt;p&gt;Hi Hung, thanks for your help. I forgot to update the thread after I found a solution. My issue was that I used the same&amp;nbsp;USB VID/PID as the Bootloader example, in my App. I believe that was causing the `nrfutil` tool to get confused and failed.&lt;/p&gt;
&lt;p&gt;Changing the PID to something else (rather than 0x512f) fixed the issue for me&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF52833] USB DFU Trigger Library Issue with nrfutil</title><link>https://devzone.nordicsemi.com/thread/378565?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2022 14:25:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0e6b8a5-f46b-4e13-a318-70560fb0bce2</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Marco,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would suggest to have a look at this similar case:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/81194/trigger-library-does-not-work"&gt;Trigger library does not work&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I did a test with Vidar&amp;#39;s example &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/4466.usbd_5F00_cdc_5F00_acm_5F00_w_5F00_dfu_5F00_trigger.zip"&gt;usbd_cdc_acm_w_dfu_trigger.zip&lt;/a&gt;&amp;nbsp;and it seems to work with nrfutil, I can get to the breakpoint inside&amp;nbsp;dfu_trigger_evt_handler().&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please take a look at this info from Vidar:&amp;nbsp;&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/pastedimage1658759058640v1.png" alt=" " /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;There is a chance that the driver used on MAC doesn&amp;#39;t fully support the trigger library.&amp;nbsp;&lt;br /&gt;I would suggest to test Vidar example and follow his approach to include the CDC ACM class.&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: [nRF52833] USB DFU Trigger Library Issue with nrfutil</title><link>https://devzone.nordicsemi.com/thread/378371?ContentTypeID=1</link><pubDate>Fri, 22 Jul 2022 17:54:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1b91226-d52f-44d8-845f-80e20728e95f</guid><dc:creator>Marco R</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;Thanks for your assistance. See my answers below:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I tried putting a breakpoint in&amp;nbsp;&lt;span&gt;&lt;span&gt;&lt;code&gt;dfu_trigger_evt_handler()&lt;/code&gt; and it does not trigger; the&amp;nbsp;DK does not reboot into Bootloader DFU when I run nrfutil (see the tool error message from the screenshot in my initial post).&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Yes, I did modify the&amp;nbsp;&lt;code&gt;dfu_trigger_evt_handler()&lt;/code&gt; to write GPREGRET and then trigger a soft reset to enter DFU. I also modified the Bootloader to enable GPREGRET as a DFU entry mode.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;I am able to perform a DFU update if I enter Bootloader DFU using Button4+RESET using the command: &amp;quot;&lt;code&gt;./nrfutil dfu usb-serial -pkg AppUpdateFile.zip -p /dev/tty.usbmodemF40B1429CE201&lt;/code&gt;&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span class="s1"&gt;Yes,&amp;nbsp;&lt;span&gt;&lt;code&gt;app_usbd_serial_num_generate()&lt;/code&gt; is called in the App (in&lt;/span&gt;&amp;nbsp;the DFU Trigger Library, &lt;code&gt;nrf_dfu_trigger_usb.c&lt;/code&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class="s1"&gt;I think nrfutil isn&amp;#39;t properly detecting the USB DFU Trigger interface. When FW App is running, I do see my DevKit in the &amp;quot;USB Device Tree&amp;quot; in macOS (see screenshot in my initial post), however I do not see any serial port in &lt;code&gt;/dev/tty.*&lt;/code&gt;, I&amp;#39;m not sure if this is expected.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="s1"&gt;Is the DFU Trigger Library supposed to expose a virtual COM port? If so -- and since I&amp;#39;m unable to see the virtual COM port under &lt;code&gt;/dev/tty.*&amp;nbsp;--&lt;/code&gt;&amp;nbsp;maybe my project is missing some defines in sdk_config.h ?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF52833] USB DFU Trigger Library Issue with nrfutil</title><link>https://devzone.nordicsemi.com/thread/378298?ContentTypeID=1</link><pubDate>Fri, 22 Jul 2022 12:30:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b61e194-9589-4b91-b285-e7740334d465</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Marco,&amp;nbsp;&lt;br /&gt;There are two parts in this set up that need to work together.&amp;nbsp;&lt;br /&gt;First is the DFU trigger library on the application and second is the DFU bootloader.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We need to verify if they both working.&amp;nbsp;&lt;br /&gt;First please put a breakpoint and check if&amp;nbsp;dfu_trigger_evt_handler() is called. It should also printout a log &amp;quot;&amp;nbsp;DFU Detach request received. Triggering a pin reset.&amp;quot;&lt;/p&gt;
&lt;p&gt;I assume you have&amp;nbsp;modified&amp;nbsp;&lt;span&gt;dfu_trigger_evt_handler() to write to&amp;nbsp;GPREGRET&amp;nbsp;, I assume you triggered a soft reset after that ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;In your bootloader application, do you see that it enters DFU mode ? I would suggest to add a breakpoint and check if the application trigger a reset and the bootloader can read GPREGRET and enter DFU mode.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Have you tried to do DFU using COMPort instead of the serial number.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;For use with serial number you need to match the serial number of the application and the bootloader in DFU mode. I assume&amp;nbsp;app_usbd_serial_num_generate() is called in the application ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>