<?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>Make the RTC count every 1 ms</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14017/make-the-rtc-count-every-1-ms</link><description>Hi everybody! I am here again bothering you with probably silly questions. I have, on my smart beacon kit, an application that uses an ADC and then sends the converted value; i want it convert at 1 kHz, that is to say make the RTC i am currently using</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 23 May 2016 12:01:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14017/make-the-rtc-count-every-1-ms" /><item><title>RE: Make the RTC count every 1 ms</title><link>https://devzone.nordicsemi.com/thread/53549?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 12:01:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56f0aaae-849d-42f9-8bbf-dc99f73b7dd8</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;You can check &lt;a href="https://devzone.nordicsemi.com/question/1771/high-sample-rate-with-adc-and-softdevice/"&gt;this&lt;/a&gt; topic. I don&amp;#39;t see any better solutions...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Make the RTC count every 1 ms</title><link>https://devzone.nordicsemi.com/thread/53538?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 11:56:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66400f3f-748c-4468-91ec-07b424e963bd</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;I will do it but currently i don&amp;#39;t have an oscilloscope (tomorrow i will check); but supposing that it won&amp;#39;t work, aren&amp;#39;t there other solutions?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Make the RTC count every 1 ms</title><link>https://devzone.nordicsemi.com/thread/53537?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 11:54:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22490442-f47e-4722-af1c-082077c6bd66</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;You have to check it, you can do it way i proposed in comment above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Make the RTC count every 1 ms</title><link>https://devzone.nordicsemi.com/thread/53547?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 11:36:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5bb5995-df89-42cd-9bc5-a4b980b5dd69</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;So defintely i cannot sample a signal with a nrf51822 at 1 kHz?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Make the RTC count every 1 ms</title><link>https://devzone.nordicsemi.com/thread/53546?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 11:34:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d46e8684-fbd2-4526-944f-3397f42839ee</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;If you have oscilloscope you can set some pin in app_timer handler and then clear it in ADC irq handler. you will see that way if your app_timer and adc irq interval is 1kHz or not. I bet it is not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Make the RTC count every 1 ms</title><link>https://devzone.nordicsemi.com/thread/53545?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 11:21:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb59b651-f543-40fc-b58a-9b1913facbe2</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;As you can probably see i still fill up a buffer of 20 bytes and then send it, you suggest to move it out from the IRQ handler function or what? Is really no way to reach 1kHz for sure maybe changing the clock source or what?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Make the RTC count every 1 ms</title><link>https://devzone.nordicsemi.com/thread/53548?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 10:51:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31121c34-58fb-422a-9610-ce96254c8d0b</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;Ok, i don&amp;#39;t think you are able to keep 1kHz like that. You are using app_timer with scheduler, and later update BLE characteristics from IRQ - i don&amp;#39;t think this is good idea. What I could suggest is to buffer more than one ADC sample, (ex. buffer up to 20 bytes), and then send it, and in the meantime just take samples (and nothing more, to have IRQ as short as possible). And maybe you have to get rid of app timer or at least move it out from scheduler, so it could really keep 1khZ. But still i am not sure you will have your frequency - softdevice has quite large timing overhead...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Make the RTC count every 1 ms</title><link>https://devzone.nordicsemi.com/thread/53544?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 10:42:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d3b3329-ce39-44a7-9c7c-c5f5e6596b97</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;I know, i post the main so you can see from yourself all the infos. However i take the result always in the IRQ handler!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Make the RTC count every 1 ms</title><link>https://devzone.nordicsemi.com/thread/53543?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 10:38:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1dfcbc1f-1d55-4249-a49d-89c3f523ad2b</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;and when you take the result...? It is really hard to tell something without knowing your program flow. Or if you are using SD or something...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Make the RTC count every 1 ms</title><link>https://devzone.nordicsemi.com/thread/53542?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 10:37:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c55fa7e-d3dd-4abf-867a-7aa268cf3a2f</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;Yes, i put TASK_START=1 in the timeout handler, and stop it in the IRQ of the ADC conversion complete.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Make the RTC count every 1 ms</title><link>https://devzone.nordicsemi.com/thread/53541?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 10:34:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3713279c-eca3-43f0-b4e8-5f3437442fea</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;By activate you mean task START? or task start and waiting for sample to finish?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Make the RTC count every 1 ms</title><link>https://devzone.nordicsemi.com/thread/53540?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 10:33:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71bbc522-81fb-4dde-aa8d-16a8a7db09eb</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;By IRQ, i activate the ADC in the RTC interrupt!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Make the RTC count every 1 ms</title><link>https://devzone.nordicsemi.com/thread/53539?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 10:32:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53dfd9dd-e413-4080-beb5-e2492ebcdba1</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;how do you sample ADC? blocking mode or by IRQ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>