<?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 event is not triggered every time a data array is being received</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/69242/usb-event-is-not-triggered-every-time-a-data-array-is-being-received</link><description>Hi, 
 I am testing the USB CDC with nrf52840 and I want to receive a predefined array of bytes over USB serial every time I send a specific array of bytes. 
 Just a simple data transmission from PC to nrf52840 and back. Nothing special 
 
 For instance</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 11 Dec 2020 09:49:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/69242/usb-event-is-not-triggered-every-time-a-data-array-is-being-received" /><item><title>RE: USB event is not triggered every time a data array is being received</title><link>https://devzone.nordicsemi.com/thread/284461?ContentTypeID=1</link><pubDate>Fri, 11 Dec 2020 09:49:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89727fee-dbf9-4811-a5ee-599a50513487</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am happy to hear you figured it out&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If you have more questions just let me know.&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 event is not triggered every time a data array is being received</title><link>https://devzone.nordicsemi.com/thread/284285?ContentTypeID=1</link><pubDate>Thu, 10 Dec 2020 10:33:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22de7eec-ee21-4ac2-890c-7831d96d162c</guid><dc:creator>masterLee</dc:creator><description>&lt;p&gt;Hi, I changed READ_SIZE parameter from 4 to 3 and it works fine. The program was waiting&amp;nbsp; for four bytes and I was sending 3 every time so&amp;nbsp; 1 in 4 didn&amp;#39;t send back nothing.&lt;/p&gt;
&lt;p&gt;Thank you for your support!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB event is not triggered every time a data array is being received</title><link>https://devzone.nordicsemi.com/thread/284262?ContentTypeID=1</link><pubDate>Thu, 10 Dec 2020 09:21:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9e7acdc-1c94-41ba-80c2-8d25c16cc89a</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;1. Have you changed the READ_SIZE parameter?&lt;/p&gt;
&lt;p&gt;You say you send your command continuously, how often do you send it?&lt;/p&gt;
&lt;p&gt;2. The app_usbd_event_queue_process() function should be called once every time you go through the main while loop, before you go to sleep normally. You shouldn&amp;#39;t have to call it after issuing a write, or anywhere else in the code.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The reason this is called from the main loop is to avoid running higher level USB processing in interrupt context, which would block other interrupts from being executed.&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB event is not triggered every time a data array is being received</title><link>https://devzone.nordicsemi.com/thread/284120?ContentTypeID=1</link><pubDate>Wed, 09 Dec 2020 14:41:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f63e295-2c4b-4761-b978-c1a7eaeaef59</guid><dc:creator>masterLee</dc:creator><description>&lt;p&gt;Hi, yes I explicitly set the DTR signal in both terminal applications including docklight. &lt;/p&gt;
&lt;p&gt;1. Is there something in the code I have posted that may result in this behavior? Because otherwise it doesn&amp;#39;t make sense to me...&lt;/p&gt;
&lt;p&gt;2. Also, could you please explain me when should I use while (app_usbd_event_queue_process());&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t understand why events from the queue are not processed automaticaly and a function must trigger it&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB event is not triggered every time a data array is being received</title><link>https://devzone.nordicsemi.com/thread/284087?ContentTypeID=1</link><pubDate>Wed, 09 Dec 2020 13:52:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9e51102-fafd-495e-b6cd-168a056a086a</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Most likely the problem here is that your non working terminal is not setting the DTR signal, which is needed by the CDC class to open the serial port.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In some terminals this is done automatically, while in others it is not. Some terminals require you to set it manually, as described in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/10877/the-terminal-used-must-send-a-dtr-signal-in-order-to-configure-the-uart-interface-mcu-pins/40690#40690"&gt;this case&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Do you know if the docklight terminal allows you to set this signal?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>