<?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>USB CDC ACM Example is not working in interrupt mode</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34933/usb-cdc-acm-example-is-not-working-in-interrupt-mode</link><description>Hi, 
 On Nordic SDk 15.0, I have observed that USB CDC ACM Example is not working in interrupt mode on nrf52840 Evaluation kit. 
 But I have tested USB CDC ACM Example in interrupt mode on Nordic SDK 14.2 and its works fine. 
 To enable interrupt mode</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 06 Oct 2020 11:18:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34933/usb-cdc-acm-example-is-not-working-in-interrupt-mode" /><item><title>RE: USB CDC ACM Example is not working in interrupt mode</title><link>https://devzone.nordicsemi.com/thread/273193?ContentTypeID=1</link><pubDate>Tue, 06 Oct 2020 11:18:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc5cab31-3589-4b51-83ed-f10c8c2ad3f6</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Alec&lt;/p&gt;
&lt;p&gt;My apologies, I forgot to get back to you.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I discussed this with the developer but he agreed with my assessment. By design the DTR signal is controlled exclusively by the driver itself, and there is no way to access this from the application without changing the driver.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;At a minimum you would need to make the functions controlling the DTR signal present in the header file, so that you can access them from the application and simulate a line state update from the host.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB CDC ACM Example is not working in interrupt mode</title><link>https://devzone.nordicsemi.com/thread/272908?ContentTypeID=1</link><pubDate>Mon, 05 Oct 2020 09:21:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f8692a3-dab7-4cbe-a5bd-a650c6f7682d</guid><dc:creator>Alec</dc:creator><description>&lt;p&gt;&lt;span&gt;Hello Torbj&amp;oslash;rn,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Any updates?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;WBR Alec&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB CDC ACM Example is not working in interrupt mode</title><link>https://devzone.nordicsemi.com/thread/264028?ContentTypeID=1</link><pubDate>Tue, 11 Aug 2020 11:49:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcb21bc9-4fe4-4056-bfce-4ab1182e542f</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Alec&lt;/p&gt;
&lt;p&gt;The implementation of the DTR line hasn&amp;#39;t really changed much since the older SDK&amp;#39;s, so the same limitations apply.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see any way to change this behaviour without having to change the app_usbd_cdc_acm.c implementation.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I could check with the developer again if he has some pointers, but unfortunately he is out in vacation for the next couple of weeks so I will have to wait until he returns.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB CDC ACM Example is not working in interrupt mode</title><link>https://devzone.nordicsemi.com/thread/263496?ContentTypeID=1</link><pubDate>Thu, 06 Aug 2020 21:01:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9e61363-76b2-4c12-9bcc-375fbfcb4a6d</guid><dc:creator>Alec</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Torbj&amp;oslash;rn,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;m actually working on the same project, we migrated it to the SDK 16.0.0 and put it a bit separately to simplify further SDK updates.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So previously I was not too happy with the idea of patching the USB driver, but it was&amp;nbsp;acceptable (and your solution is working fine, thanks).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Now this patching is not an option - I&amp;#39;m looking for the ways to ignore the virtual DTR line without changing the driver/library source files.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can you help us with it? Maybe some SDK options or user-defined callback functions?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Alec&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB CDC ACM Example is not working in interrupt mode</title><link>https://devzone.nordicsemi.com/thread/139887?ContentTypeID=1</link><pubDate>Thu, 12 Jul 2018 12:09:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:453b0d3c-6604-40db-855b-4f579a650c54</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Unfortunately I didn&amp;#39;t get a lot of time to look into this, and now I am leaving for vacation.&lt;/p&gt;
&lt;p&gt;The changes I did make can be found in &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-9955fcef4a00437799387c4ae57962e0/app_5F00_usbd_5F00_cdc_5F00_acm_5F00_dtr_5F00_mod2.c"&gt;this attached file&lt;/a&gt;.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Essentially you would have to make some changes to the handling of the&amp;nbsp;APP_USBD_CDC_REQ_SET_CONTROL_LINE_STATE case in the&amp;nbsp;setup_req_class_out(..) function,&amp;nbsp; and also change any code that checks the dtr_state, similar to what I tried to do in the app_usbd_cdc_acm_write function.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB CDC ACM Example is not working in interrupt mode</title><link>https://devzone.nordicsemi.com/thread/138407?ContentTypeID=1</link><pubDate>Sun, 01 Jul 2018 16:28:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa70e5bd-9304-4c1c-be2b-348684155af8</guid><dc:creator>Deepa Gopinath</dc:creator><description>&lt;p&gt;Hi Torbjorn,&lt;/p&gt;
&lt;p&gt;Thanks for the update. I will be waiting for the solution from the USB CDC Driver End.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Deepa&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB CDC ACM Example is not working in interrupt mode</title><link>https://devzone.nordicsemi.com/thread/137933?ContentTypeID=1</link><pubDate>Wed, 27 Jun 2018 14:15:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72cad7dc-c69f-4f66-90c1-be967b341cd7</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I tried to make some changes to the driver to make this work.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I got it to respond without requiring DTR to be set, but the data coming in looks corrupted.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I will have to do some more testing and get back to you.&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB CDC ACM Example is not working in interrupt mode</title><link>https://devzone.nordicsemi.com/thread/137379?ContentTypeID=1</link><pubDate>Mon, 25 Jun 2018 07:07:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a6a70e0-710c-4fbb-b18e-f0d0254870a6</guid><dc:creator>Deepa Gopinath</dc:creator><description>&lt;p&gt;Hi Torbjorn,&lt;/p&gt;
&lt;p&gt;Thanks for the update. I will check this whether we can able to add this changes in QT application.&lt;/p&gt;
&lt;p&gt;As stated earlier, without above stated changes, the QT application works fine with STM USB CDC Device. So it will be good if we have a fix in Nordic Application end instead of C# application.&lt;/p&gt;
&lt;p&gt;Can you please help us to provide a fix at Nordic USB CDC application end?&lt;/p&gt;
&lt;p&gt;Thanks in Advance!!&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Deepa&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB CDC ACM Example is not working in interrupt mode</title><link>https://devzone.nordicsemi.com/thread/137240?ContentTypeID=1</link><pubDate>Fri, 22 Jun 2018 11:38:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:227b4624-d357-4641-824a-f4abc9b64841</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Deepa&lt;/p&gt;
&lt;p&gt;I found the problem on my end. If &amp;quot;DTR&amp;quot; is not enabled, the CDC example will not consider the port opened. I must assume Tera Term is doing this automatically, but if you write your own serial code it might not be set.&lt;/p&gt;
&lt;p&gt;Fixing this in my C# example was very easy:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;mSerial.DtrEnable = true;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;mSerial.Open();&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know how it works with QT, but I am sure there is a similar feature to set the DTR state.&lt;/p&gt;
&lt;p&gt;Please give this a go, and let me know if it works for you too :)&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB CDC ACM Example is not working in interrupt mode</title><link>https://devzone.nordicsemi.com/thread/137089?ContentTypeID=1</link><pubDate>Thu, 21 Jun 2018 12:01:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d60b7f21-c91c-40fb-be81-93a48994a737</guid><dc:creator>Deepa Gopinath</dc:creator><description>&lt;p&gt;Hi Torbjorn,&lt;/p&gt;
&lt;p&gt;Currently we are blocked on this issue. Can you please help us to resolve this issue ASAP?&lt;/p&gt;
&lt;p&gt;Thanks in Advance!!&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Deepa&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB CDC ACM Example is not working in interrupt mode</title><link>https://devzone.nordicsemi.com/thread/137084?ContentTypeID=1</link><pubDate>Thu, 21 Jun 2018 11:46:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0039d5e9-c627-43ee-8e37-2004e549ff10</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Deepa&lt;/p&gt;
&lt;p&gt;I set up a small C# application to see if I could spot the issue, and indeed I do see something similar. If I try to send something from the C# application it is not received on the nRF52840 until I close the port in my application and open it in Tera Term.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I will have to do some more digging to figure out what is happening.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB CDC ACM Example is not working in interrupt mode</title><link>https://devzone.nordicsemi.com/thread/136562?ContentTypeID=1</link><pubDate>Mon, 18 Jun 2018 13:04:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6838d832-e31c-4ba9-8924-638988e674ed</guid><dc:creator>Deepa Gopinath</dc:creator><description>&lt;p&gt;Hi Torbj&amp;oslash;rn,&lt;/p&gt;
&lt;p&gt;I have two issues with USB CDC of nRF52840- &lt;br /&gt;1. USB read event failure issue in interrupt mode when dummy open and close of Teraterm connecting to USB port is done&lt;br /&gt;2. USB read event fails when dummy open and close of Teraterm connecting to USB port is not done&lt;/p&gt;
&lt;p&gt;With your suggested changes, issue-1 is resolved. Now I need your help for issue 2.&lt;/p&gt;
&lt;p&gt;Case 1: when dummy open and close of Teraterm connecting to USB port is not done&lt;br /&gt;=&amp;gt; When I run the QT application, unable to receive USB port event interrupt and USB read event interrupt&lt;/p&gt;
&lt;p&gt;Case 2: when dummy open and close of Teraterm connecting to USB port is done&lt;br /&gt;=&amp;gt; When I run the QT application, able to receive USB port event interrupt and USB read event interrupt&lt;/p&gt;
&lt;p&gt;The QT application works fine when I test with STM USB CDC device. &lt;br /&gt;In case of STM USB CDC device, USB read event works fine when dummy open and close of Teraterm connecting to USB port is not done&lt;br /&gt;As the QT application is working fine with STM USB CDC device, I think the issue is not in QT application.&lt;br /&gt; &lt;br /&gt;PFA : nrf52840 USB CDC example which I have used to reproduce the issue 2 with QT Application&lt;br /&gt;Only minor changes has done in nrf52840 USB CDC example&lt;/p&gt;
&lt;p&gt;I feel some intialization is missed for USB CDC example which was able to do when dummy open and close of Teraterm connecting to USB port is done&lt;/p&gt;
&lt;p&gt;Thanks &amp;amp; Regards,&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/1401.main.zip"&gt;devzone.nordicsemi.com/.../1401.main.zip&lt;/a&gt;&lt;br /&gt;Deepa&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB CDC ACM Example is not working in interrupt mode</title><link>https://devzone.nordicsemi.com/thread/136179?ContentTypeID=1</link><pubDate>Thu, 14 Jun 2018 12:53:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:551645b4-a811-4b1f-b976-9642ef7d0ed4</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
[quote user="Deepa Gopinath"]With these suggested changes, USB CDC ACM Example is not working in interrupt mode.[/quote]
&lt;p&gt;I assume you meant to say it is &amp;quot;now working&amp;quot;? ;)&lt;/p&gt;
&lt;p&gt;Regarding the issues you see, do you have some other CDC device to test with?&lt;br /&gt;An FTDI based one for instance.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It is likely that your issue is with the QT application, since the Teraterm connection works fine.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you made many changes to the nRF52840 application, or is it similar to the SDK example?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB CDC ACM Example is not working in interrupt mode</title><link>https://devzone.nordicsemi.com/thread/135596?ContentTypeID=1</link><pubDate>Mon, 11 Jun 2018 13:09:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94f2e121-c1fc-42cd-bc15-3687aabda30a</guid><dc:creator>Deepa Gopinath</dc:creator><description>&lt;p&gt;Hi Torbjorn,&lt;/p&gt;
&lt;p&gt;With these suggested changes, USB CDC ACM Example is not working in interrupt mode.&lt;br /&gt;Thank you for timely help.&lt;/p&gt;
&lt;p&gt;I have one more issue with USB CDC read functionality.&lt;br /&gt;I was unable to get APP_USBD_CDC_ACM_USER_EVT_RX_DONE / PP_USBD_CDC_ACM_USER_EVT_PORT_OPEN events when I send commands to USB port using QT Application.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;But after running the application, If I do a dummy open and close of Teraterm connecting to USB port(Say &amp;quot;com14&amp;quot;) then I was able to get APP_USBD_CDC_ACM_USER_EVT_RX_DONE / APP_USBD_CDC_ACM_USER_EVT_PORT_OPEN events when I send commands to USB port using QT Application.&lt;/p&gt;
&lt;p&gt;Why there is a dependency on dummy open and close of Teraterm connecting to USB port(Say &amp;quot;com14&amp;quot;)?&lt;br /&gt;Can I avoid this dependency?&lt;/p&gt;
&lt;p&gt;Thanks in Advance&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Deepa&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB CDC ACM Example is not working in interrupt mode</title><link>https://devzone.nordicsemi.com/thread/134521?ContentTypeID=1</link><pubDate>Mon, 04 Jun 2018 11:11:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96032d52-cbfc-425f-af13-3fbc768490ce</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Deepa&lt;/p&gt;
&lt;p&gt;All you should have to do to make event handling interrupt driven in SDK v15 is to set&amp;nbsp;APP_USBD_CONFIG_EVENT_QUEUE_ENABLE to 0 in sdk_config.h, and comment out the call to&amp;nbsp;app_usbd_event_queue_process() in main.c&lt;/p&gt;
&lt;p&gt;Please try it out, and let me know if you have any issues with it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>