<?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>using timer with usbd  ble uart example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76616/using-timer-with-usbd-ble-uart-example</link><description>Hello, 
 
 
 I&amp;#39;m using the &amp;quot;usbd ble uart &amp;quot; with twi scanner example to send a sensor value through an arduino 33 ble sense using nrf52832 and it works very well . but when I want to send the data to android application she stops immediately because the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 24 Jun 2021 09:07:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76616/using-timer-with-usbd-ble-uart-example" /><item><title>RE: using timer with usbd  ble uart example</title><link>https://devzone.nordicsemi.com/thread/316907?ContentTypeID=1</link><pubDate>Thu, 24 Jun 2021 09:07:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:208b24b6-6108-4458-8e48-4b252c3b2a8f</guid><dc:creator>nikola </dc:creator><description>&lt;p&gt;thank you very much&amp;nbsp;&lt;br /&gt;I solved my problem by removing my function sendcom in the handler function&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using timer with usbd  ble uart example</title><link>https://devzone.nordicsemi.com/thread/316507?ContentTypeID=1</link><pubDate>Tue, 22 Jun 2021 13:48:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b9ffb2f-d420-4d3d-8a24-4dfb7a284756</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Isn&amp;#39;t that what you want to use the timer for? Then you call it from your (app_timer) timeout handler instead.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using timer with usbd  ble uart example</title><link>https://devzone.nordicsemi.com/thread/316496?ContentTypeID=1</link><pubDate>Tue, 22 Jun 2021 13:17:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a8824aa-fd70-4a42-b033-ccb77f1d243d</guid><dc:creator>nikola </dc:creator><description>&lt;p&gt;Okay&lt;br /&gt;how i can implement app_timer in my example&lt;br /&gt;will the app_timer_start call be in while loop where do I call my sendcom function or in the main function?&lt;br /&gt;Do I want to use RTC0 which is already used for bluetooth or else I have to use another RTC because the creation of timer is already done for bluetooth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using timer with usbd  ble uart example</title><link>https://devzone.nordicsemi.com/thread/316491?ContentTypeID=1</link><pubDate>Tue, 22 Jun 2021 13:06:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bff0eeef-fe26-49bc-8e6b-e35dd50c2ed2</guid><dc:creator>nikola </dc:creator><description>&lt;p&gt;Yes that&amp;#39;s it&lt;br /&gt;if I want to remove the while loop function call&lt;br /&gt;where do I want to do it then?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using timer with usbd  ble uart example</title><link>https://devzone.nordicsemi.com/thread/316479?ContentTypeID=1</link><pubDate>Tue, 22 Jun 2021 12:49:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5a97cd3-97e5-4161-b540-003bd11dd1a1</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Please enable logging and select &amp;quot;Debug&amp;quot; from the build target drop down. Then test again, and the log should give a good indication about what the problem is.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using timer with usbd  ble uart example</title><link>https://devzone.nordicsemi.com/thread/316478?ContentTypeID=1</link><pubDate>Tue, 22 Jun 2021 12:48:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b6a21b8-e5f9-4077-ac51-c014948a0bc0</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Good, then you know it. It is much better to use this here as well. Having more app_timers is no problem (there is no practical limitation to how many you can have)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using timer with usbd  ble uart example</title><link>https://devzone.nordicsemi.com/thread/316477?ContentTypeID=1</link><pubDate>Tue, 22 Jun 2021 12:47:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbac9162-d247-4924-a75c-383de18c7695</guid><dc:creator>Einar Thorsrud</dc:creator><description>[quote user="nikola "]why am I removing this function[/quote]
&lt;p&gt;&amp;nbsp;I thought the point of all this was to send only every second, is it not? If you continue calling this in your main loop there is not much help in&amp;nbsp; continuing to do so while also doing it every second. Or did I misunderstand something?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using timer with usbd  ble uart example</title><link>https://devzone.nordicsemi.com/thread/316467?ContentTypeID=1</link><pubDate>Tue, 22 Jun 2021 12:14:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6644c02-19fd-4cad-981c-c06fd60a2fbc</guid><dc:creator>nikola </dc:creator><description>&lt;p&gt;when I want to test the app_timer function the debugger stops in the lfclk_request function&lt;/p&gt;
&lt;p&gt;I have got this error&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1624364109238v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using timer with usbd  ble uart example</title><link>https://devzone.nordicsemi.com/thread/316464?ContentTypeID=1</link><pubDate>Tue, 22 Jun 2021 11:57:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f4791a0-9164-4492-9dc2-5890fecaa0eb</guid><dc:creator>nikola </dc:creator><description>&lt;p&gt;already app_timer is used to send data through the uart or bleutooth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using timer with usbd  ble uart example</title><link>https://devzone.nordicsemi.com/thread/316463?ContentTypeID=1</link><pubDate>Tue, 22 Jun 2021 11:50:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6cef871-f5e5-4787-bdf0-374f576ae2ae</guid><dc:creator>nikola </dc:creator><description>&lt;p&gt;why am I removing this function&lt;/p&gt;
[quote userid="7377" url="~/f/nordic-q-a/76616/using-timer-with-usbd-ble-uart-example/316458#316458"]Did you remember to remove the vall to&amp;nbsp;sendcom() in your main loop?[/quote]
&lt;p&gt;I firstly try with this example and it doesn&amp;#39;t work&amp;nbsp;&lt;/p&gt;
[quote userid="7377" url="~/f/nordic-q-a/76616/using-timer-with-usbd-ble-uart-example/316458#316458"]Using a TIMER peripheral should work, but you would be much better off using the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_timer.html"&gt;timer library (app_timer)&lt;/a&gt;. This use an RTC so it is low power, and intended for this exact use case. See &lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/application-timer-tutorial"&gt;nRF5 SDK Application Timer Tutorial&lt;/a&gt;.[/quote]&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: using timer with usbd  ble uart example</title><link>https://devzone.nordicsemi.com/thread/316458?ContentTypeID=1</link><pubDate>Tue, 22 Jun 2021 11:43:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7075a801-9080-4598-a3c1-501bcfd850fb</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]the&amp;nbsp;&amp;quot;sdk_config.h&amp;quot; content accordingly using the timer &amp;quot;1&amp;quot; and the data still send quickly[/quote]
&lt;p&gt;Did you remember to remove the vall to&amp;nbsp;sendcom() in your main loop?&lt;/p&gt;
[quote user=""]For this purpose, I copied the content of the &amp;quot;&lt;span&gt;peripheral_timer&amp;quot; example into&amp;nbsp;&amp;quot;usbd ble uart &amp;quot; example.&lt;/span&gt;[/quote]
&lt;p&gt;Using a TIMER peripheral should work, but you would be much better off using the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_timer.html"&gt;timer library (app_timer)&lt;/a&gt;. This use an RTC so it is low power, and intended for this exact use case. See &lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/application-timer-tutorial"&gt;nRF5 SDK Application Timer Tutorial&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>