<?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>USBD on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/57206/usbd-on-nrf52840-dongle</link><description>Hi, 
 I modified your USBD BLE UART Example by commenting out the button and LED code to run on a dongle with J-Link debugger soldered on. 
 I removed the bootloader and set NRF_UICR-&amp;gt;REGOUT0 to 3.3V, to ensure proper voltage. 
 The example runs, all</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 06 Feb 2020 22:56:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/57206/usbd-on-nrf52840-dongle" /><item><title>RE: USBD on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/233164?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2020 22:56:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67051be2-97aa-4f21-a0bc-1fd840977c3a</guid><dc:creator>Gerry</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I finally found the cause of that problem. DTR of the terminal has to be set, see&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/28107/nrf52-dk---usb-cdc-acm-example-not-working-with-hterm-qt/110855#110855"&gt;this post&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your support anyway.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/233151?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2020 21:07:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75971b16-35b8-4b7f-97a7-2f2f97201043</guid><dc:creator>Gerry</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;PuTTY was a good idea. Everything works fine with PuTTY even on the dongle. Sadly, this seems to be the only terminal it&amp;#39;s working with. I also have an own PC-application written in c# that works fine with my application on the nRF52840 DK, but not with the USBD BLE UART example.&lt;/p&gt;
&lt;p&gt;In the end, I will have to communicate from/to that custom PC-application to the dongle.&lt;/p&gt;
&lt;p&gt;Do you have an idea, what could&amp;nbsp;cause this problem? There must be a difference in this virtual com ports right?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/233124?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2020 16:25:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4758157-8227-4d6b-a79b-1d524a5e8be7</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It is expected that you get the same behavior using a DK and a dongle.&lt;/p&gt;
[quote user="gerry"]When I send some characters to the virtual comport the terminal program gets stuck. Could this be a driver issue?[/quote]
&lt;p&gt;I am not sure. Is there a pattern? Always the same number of characters? Or something else?&lt;/p&gt;
[quote user="gerry"]I&amp;#39;m using Windows10 and&amp;nbsp;&lt;a href="https://sites.google.com/site/terminalbpp/"&gt;this terminal program&lt;/a&gt;[/quote]
&lt;p&gt;It should not matter, but could you test with PuTTY?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/232934?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2020 01:55:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31906fa6-5a65-40df-9ba6-eef759e796d9</guid><dc:creator>Gerry</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I changed this, thanks for the input. The behavior is still the same. I now tried with the original (unchanged) example on a nRF52840 DK and I have the exact same issue. When I send some characters to the virtual comport the terminal program gets stuck. Could this be a driver issue? I also tried another USB-port and uninstalled the driver. When I plug in USB, the driver is installed autom. and shows no errors.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using Windows10 and&amp;nbsp;&lt;a href="https://sites.google.com/site/terminalbpp/"&gt;this terminal program&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/232765?ContentTypeID=1</link><pubDate>Wed, 05 Feb 2020 09:22:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16037ea2-6de5-4823-bf53-f4a6907bdb15</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I was not able to reproduce the exact error you describe here. However, I tested now and did get an obvious error when sending data from the PC over the USB-UART (CDC). You have commented out the call to ble_nus_data_send() in the handling of APP_USBD_CDC_ACM_USER_EVT_RX_DONE , but you continue to check the uninitialized ret variable repeatedly. This triggers an error in my test (though it might fail differently or not at all for you, depending on what happens to be in memory).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/232643?ContentTypeID=1</link><pubDate>Tue, 04 Feb 2020 15:44:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fa2013b-6d5b-49b8-bb3f-6de968259730</guid><dc:creator>Gerry</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I now replaced the code for 3.0V with&amp;nbsp;&lt;span&gt;gpio_output_voltage_setup() in components\boards\boards.c and made a chip erase (&amp;quot;Erase all&amp;quot; in SES)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I also tried to toggle an LED in&amp;nbsp;cdc_acm_user_ev_handler. This is really never fired.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;After some more debugging, I found, that if I connect BLE with the Nordic UART App. and send some characters, I end up in&amp;nbsp;the&amp;nbsp;nus_data_handler. When&amp;nbsp;app_usbd_cdc_acm_write is called there, it returns 8 =&amp;nbsp;NRF_ERROR_INVALID_STATE&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;        // Send data through CDC ACM
        ret_code_t ret = app_usbd_cdc_acm_write(&amp;amp;m_app_cdc_acm,
                                                m_nus_data_array,
                                                length);
        if(ret != NRF_SUCCESS)
        {
            NRF_LOG_INFO(&amp;quot;CDC ACM unavailable, data received: %s&amp;quot;, m_nus_data_array);
        }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;could it be a problem of the dongle? I have 2 brand new dongles here. Have you ever tried to run this on a nRF52840 dongle?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/232493?ContentTypeID=1</link><pubDate>Tue, 04 Feb 2020 09:37:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0cbff9d9-0a27-4788-939a-762545f8091b</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Diffing your code to the example I do not see anything obvious:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-6a32ba2d10c44fe6834954ce9853a6af/main.c.diff"&gt;devzone.nordicsemi.com/.../main.c.diff&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You disable logging and do not use the BSP (for LEDs). Then you add code for setting the REG0 voltage to 3.3 V to compensate for not calling the BSP code that does this. The BSP implementation sets 3.0 V (see gpio_output_voltage_setup() in components\boards\boards.c), but that should not matter.&lt;/p&gt;
&lt;p&gt;How have you verified that&amp;nbsp;cdc_acm_user_ev_handler is never fired when it should? Could it be a problem with optimization or similar? What happens if you try to&amp;nbsp; toggle a&amp;nbsp;GPIO in the event handler?&lt;/p&gt;
&lt;p&gt;(One other thing I notice is that the way you check REGOUT0 before setting it, the device would continue to write to it and reset forever if it was for instance set to 3 V initially (last three bits 0x4 which is &amp;quot;100&amp;quot;), since only 1&amp;#39;s are converted to 0&amp;#39;s when writing to flash). So if you have not performed a full chip erase that might be a problem, as 3 V is used by the firmware it ships with. This does not seem relevant though since it is done at the beginning of main() and it seems the nRF enumerates correctly).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/232144?ContentTypeID=1</link><pubDate>Fri, 31 Jan 2020 16:33:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9b33662-d383-4ba1-9d50-af0fba8d59ca</guid><dc:creator>Gerry</dc:creator><description>&lt;p&gt;Hi Einar&lt;/p&gt;
&lt;p&gt;Thanks for your support. I&amp;#39;ve attached the modified example.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/usbd_5F00_ble_5F00_uart.zip"&gt;devzone.nordicsemi.com/.../usbd_5F00_ble_5F00_uart.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/232108?ContentTypeID=1</link><pubDate>Fri, 31 Jan 2020 14:15:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04b5bc15-0ef5-41e1-ad65-e4dce4dae05b</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Gerry,&lt;/p&gt;
&lt;p&gt;It is clear that many things work since the device enumerates correctly on the PC. Can you upload your project here so that I can see what you have modified from the example? I suspect we will find an error there, though I do not have any specific ideas without knowing more.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>