<?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>Is there possible to get timer period shorter than 12us with nRF51 and SDK 14?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/31986/is-there-possible-to-get-timer-period-shorter-than-12us-with-nrf51-and-sdk-14</link><description>Is there possible to get timer period shorter than 12us with nRF51 and SDK 14? &amp;quot;timer&amp;quot; example with PCA10040 works correct, but with PCA10028 not. When set timer period lower than 12us it not corresponds to settings any more. 
 My code to start timer</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 16 Mar 2018 12:56:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/31986/is-there-possible-to-get-timer-period-shorter-than-12us-with-nrf51-and-sdk-14" /><item><title>RE: Is there possible to get timer period shorter than 12us with nRF51 and SDK 14?</title><link>https://devzone.nordicsemi.com/thread/124771?ContentTypeID=1</link><pubDate>Fri, 16 Mar 2018 12:56:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:570103cc-9a5d-41c6-bacc-674afc957ddd</guid><dc:creator>jokii</dc:creator><description>&lt;p&gt;that works!&lt;br /&gt;thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there possible to get timer period shorter than 12us with nRF51 and SDK 14?</title><link>https://devzone.nordicsemi.com/thread/124337?ContentTypeID=1</link><pubDate>Wed, 14 Mar 2018 10:18:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3424d5d-1fe8-4677-9ccd-885400513aea</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;If you are looking for this short intervals, I would suggest that you use the PPI directly, and not through the timer module. You can also use this to toggle the pin without using the CPU, so it will not be affected by delays from this.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-f3125f89bf8a4f73baf6530fb72c4d1a/main.c"&gt;devzone.nordicsemi.com/.../main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Attached is a main file using the&amp;nbsp;PPI directly. I modified from a PWM example for the nRF52, but it works with the nRF51 now. If you replace the main.c file in the SDK\examples\peripheral\timer example from SDK12.3.0, it should work just fine.&lt;/p&gt;
&lt;p&gt;Note that some of the comments might be from the original project, but I tried to change them to fit to the nRF51.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The setup in this example toggles the LED1 every 0.5µs, as you can see here:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-f3125f89bf8a4f73baf6530fb72c4d1a/pastedimage1521022315312v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;If you need a &lt;strong&gt;period&lt;/strong&gt; of 5µs, you should change:&lt;/p&gt;
&lt;p&gt;TIMER_RELOAD = 80&lt;/p&gt;
&lt;p&gt;TIMER_TOGGLE_VALUE = 40&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Alternatively, you can change the TIMER_RELOAD to be 40, and remove the PIN0_PPI_CH_B channel from PIN0_init();&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Play around with the example, and let me know if you have any issues with it.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there possible to get timer period shorter than 12us with nRF51 and SDK 14?</title><link>https://devzone.nordicsemi.com/thread/124271?ContentTypeID=1</link><pubDate>Wed, 14 Mar 2018 06:14:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e20cdbe-eafe-408e-9639-697df3b3f375</guid><dc:creator>jokii</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;br /&gt;downloaded SDK 12.3.0, compared examples and they are identical. Going forward, compiled example for pca10028:&lt;br /&gt;nRF5_SDK_12.3.0_d7731ad\examples\peripheral\timer\pca10028\blank\armgcc&lt;br /&gt;Changed only nrf_drv_timer_ms_to_ticks -&amp;gt; nrf_drv_timer_us_to_ticks and timer handler to toggle single GPIO.&lt;br /&gt;Minimum period to achieve is 8.5us, even if set:&lt;br /&gt;time_ticks = nrf_drv_timer_us_to_ticks(&amp;amp;TIMER_LED, 1);&lt;br /&gt;&lt;br /&gt;Is possible to achieve higher frequency (I need period 5us)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there possible to get timer period shorter than 12us with nRF51 and SDK 14?</title><link>https://devzone.nordicsemi.com/thread/124223?ContentTypeID=1</link><pubDate>Tue, 13 Mar 2018 16:50:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:291b8417-5e61-4ce4-8280-c936be6006be</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;There are no examples for the pca10028 in SDK14. The latest SDK that supports the nRF52 DK is SDK 12.3.0. Can you try to download the SDK12.3.0 (&lt;a href="http://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v12.x.x/" target="_blank" rel="noopener noreferrer"&gt;here&lt;/a&gt;) , and try one of the examples marked with &amp;quot;pca10028&amp;quot;?&lt;/p&gt;
&lt;p&gt;e.g. the example:&lt;/p&gt;
&lt;p&gt;SDK12.3.0\examples\peripheral\timer\pca10028\blank\...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>