<?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>CDC ACM example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68988/cdc-acm-example</link><description>Hi everyone, 
 Regarding the CDC ACM example I have a question. In the example, every time a button is pressed there is a writing. I would like the writing to happen every second regardless of the button. I would like to remove the button and have it</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Dec 2020 15:35:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68988/cdc-acm-example" /><item><title>RE: CDC ACM example</title><link>https://devzone.nordicsemi.com/thread/284146?ContentTypeID=1</link><pubDate>Wed, 09 Dec 2020 15:35:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d830a407-8b32-4b9d-be8a-dff941a9daa8</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="LNwork"]I tried to modificate CDC ACM example as you suggest me but my code doesn&amp;#39;t work.[/quote]
&lt;p&gt;I am sorry to hear that. Could you elaborate on what you did when you attempted to modify it, and how the code did not work?&lt;br /&gt;Did the code compile without warning, or did you receive an error while the program was running?&lt;br /&gt;If you could share the code in which you tried to make these modifications I can take a look, and see if I cant spot why it is not working.&lt;/p&gt;
[quote user="LNwork"]Can you provide me an example that show how to do a write every seconds? Is there in the SDK?[/quote]
&lt;p&gt;Unfortunately we do not have such an example in our SDK - but it is really a small modification to the existing CDC ACM example. As I said in my previous comment, you can achieve this by setting the &lt;em&gt;m_send_flag&lt;/em&gt;&amp;nbsp;&lt;em&gt;&lt;/em&gt;in a TIMER&amp;#39;s event handler.&lt;br /&gt;You can see how to setup a TIMER to trigger periodically in the TIMER example that I linked in my previous reply.&lt;br /&gt;&lt;br /&gt;Looking forward to resolving this issue together,&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CDC ACM example</title><link>https://devzone.nordicsemi.com/thread/284137?ContentTypeID=1</link><pubDate>Wed, 09 Dec 2020 15:21:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0464feb9-cddf-4160-85ba-4a9f9fde9dd8</guid><dc:creator>alexl&amp;#246;ddek&amp;#246;pinge</dc:creator><description>&lt;p&gt;Hi, I tried to modificate CDC ACM example as you suggest me but my code doesn&amp;#39;t work.&lt;/p&gt;
&lt;p&gt;Can you provide me an example that show how to do a write every seconds? Is there in the SDK?&lt;/p&gt;
&lt;p&gt;Sorry for my english and thanks&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CDC ACM example</title><link>https://devzone.nordicsemi.com/thread/283035?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2020 10:36:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6eab502a-6dd6-40fc-89b8-51da525fa7f6</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/usbd_cdc_acm_example.html"&gt;The USB CDC ACM example from the SDK&lt;/a&gt; sends a test frame when button 1 is pressed.&lt;br /&gt;If you look into the source code for the example, you will see that this is done by setting and clearing the&amp;nbsp;&lt;em&gt;m_send_flag&lt;/em&gt; in the&amp;nbsp;&lt;em&gt;bsp_evt_handler&lt;/em&gt; function. The easiest way to modify the example to send the test frame periodically is to set the&amp;nbsp;&lt;em&gt;m_send_flag&lt;/em&gt; variable in a timer&amp;#39;s callback, instead of the button press event handler. For this, you could either use the TIMER peripheral directly, or the app_timer library.&lt;br /&gt;&lt;br /&gt;To see how you may go about setting up a timer with the TIMER peripheral you could take a look at&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/nrf_dev_timer_example.html"&gt;the TIMER example from the SDK&lt;/a&gt;, while if you are looking to use the app_timer library you implement it as described in &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_timer.html"&gt;the app_timer&amp;#39;s usage section&lt;/a&gt;&amp;nbsp;(usage of the app_timer is also shown in most of the BLE peripheral examples ).&lt;br /&gt;&lt;br /&gt;Please do not hesitate to ask if anything still should be unclear, or if you encounter any other issues or questions!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>