<?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>Create a 1 microsecond timer in nRF52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112228/create-a-1-microsecond-timer-in-nrf52832</link><description>Hi, 
 As well know, there have a nrf_delay_us() function can execute very short delay time, but the function can only &amp;quot;delay&amp;quot;. 
 If I want to create a 1 microsecond continuous timer, and it can change some GPIO pin status when timer-IRQ ioccur. 
 How</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Jun 2024 14:00:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112228/create-a-1-microsecond-timer-in-nrf52832" /><item><title>RE: Create a 1 microsecond timer in nRF52832</title><link>https://devzone.nordicsemi.com/thread/490335?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2024 14:00:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:554ee845-4cb3-47a2-b031-1aa2465038ed</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;There is&amp;nbsp;a delay(interrupt latency) when both entering and exiting the &lt;span&gt;&lt;span&gt;&lt;span&gt;ARM&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/00ae.svg" title="Registered"&gt;&amp;#x00ae;&lt;/span&gt; Cortex&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/00ae.svg" title="Registered"&gt;&amp;#x00ae;&lt;/span&gt; -&lt;/span&gt;M4 ISR, + the SoftDevice also adds delay ~4us when enabled, ~2 when disabled, so overall, you won&amp;#39;t be able to change the GPIO fast enough when doing it from interrupts.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sds_s132/SDS/s1xx/processor_avail_interrupt_latency/interrupt_latency_soc_framework.html"&gt;https://infocenter.nordicsemi.com/topic/sds_s132/SDS/s1xx/processor_avail_interrupt_latency/interrupt_latency_soc_framework.html&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Create a 1 microsecond timer in nRF52832</title><link>https://devzone.nordicsemi.com/thread/490063?ContentTypeID=1</link><pubDate>Sat, 22 Jun 2024 02:31:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ff83c47-4aa8-4ad8-86fe-01bf9663c716</guid><dc:creator>chianglin</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Wiould you please tell me about the minimum interrupt time of nRF52832 timer?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Create a 1 microsecond timer in nRF52832</title><link>https://devzone.nordicsemi.com/thread/489827?ContentTypeID=1</link><pubDate>Fri, 21 Jun 2024 00:39:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bbc5ccb-dc02-4b04-b6f7-d46eab41cf1e</guid><dc:creator>chianglin</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I already test the method of timer, and it&amp;#39;s&amp;nbsp;maximum execute speed is 10us.&lt;/p&gt;
&lt;p&gt;Its too slow for me.&lt;/p&gt;
&lt;p&gt;Would you please tell me how to speed-up timer execute time?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Create a 1 microsecond timer in nRF52832</title><link>https://devzone.nordicsemi.com/thread/489797?ContentTypeID=1</link><pubDate>Thu, 20 Jun 2024 15:00:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:efc65ad4-7dc1-4057-bbb2-02c003e5a82d</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;You can take a look at this sample for that:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/nrf_dev_timer_example.html"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/nrf_dev_timer_example.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;PS: I&amp;#39;m not sure&amp;nbsp;how well a bit-banged i2c at 1000 kbps on nrf52832 will work, if you are using BLE at the same time, it will likely affect the timing of the i2c.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Create a 1 microsecond timer in nRF52832</title><link>https://devzone.nordicsemi.com/thread/489782?ContentTypeID=1</link><pubDate>Thu, 20 Jun 2024 13:46:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18369b4a-c0da-40df-b1b2-0ab2a45a3688</guid><dc:creator>chianglin</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for your example code.&lt;/p&gt;
&lt;p&gt;It looks this example code can only toggle GPIO-pin?&lt;/p&gt;
&lt;p&gt;When using continus timer, it will trigger a IRQ-handler while time-out, and I can do somethings (ex.&amp;nbsp;Implement the I2C protocol)&lt;/p&gt;
&lt;p&gt;Does &amp;quot;TIMER+GPIOTE+PPI&amp;quot; can trigger an IRQ handler?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Create a 1 microsecond timer in nRF52832</title><link>https://devzone.nordicsemi.com/thread/489576?ContentTypeID=1</link><pubDate>Wed, 19 Jun 2024 14:46:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c110f24-f492-42f5-b63c-e86e873d29ba</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
[quote user="chianglin"]I want to simulate a 1MHz I2C server[/quote]
&lt;p&gt;For a 1MHz signal, I suggest using TIMER+GPIOTE+PPI.&lt;/p&gt;
&lt;p&gt;See the code in this post:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/12177/nrf52-clock-in-and-out/46076"&gt;RE: nRF52 clock in and out&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;adjust the&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;quot; NRF_TIMER1-&amp;gt;CC[0] = 1; // Adjust the output frequency by adjusting the CC.&amp;quot; , to get the desired&amp;nbsp;frequency&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote user="chianglin"]nrf52832&amp;#39;s I2C master can only support 400KHz.[/quote]
&lt;p&gt;For nRF5340 we have&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Supported baud rates: 100, 250, 400&lt;span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;and &lt;strong&gt;1000&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&amp;nbsp;kbps&lt;/strong&gt; -&amp;gt;&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/twim.html?cp=4_0_0_6_35"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf5340/twim.html?cp=4_0_0_6_35&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Create a 1 microsecond timer in nRF52832</title><link>https://devzone.nordicsemi.com/thread/489516?ContentTypeID=1</link><pubDate>Wed, 19 Jun 2024 12:49:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1590a083-aaa9-4541-a73b-0c57a7d172cd</guid><dc:creator>chianglin</dc:creator><description>&lt;p&gt;HI,&lt;/p&gt;
&lt;p&gt;Actually, I want to simulate a 1MHz I2C server, but nrf52832&amp;#39;s I2C master can only support 400KHz.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Create a 1 microsecond timer in nRF52832</title><link>https://devzone.nordicsemi.com/thread/489496?ContentTypeID=1</link><pubDate>Wed, 19 Jun 2024 11:54:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81dce194-614b-4fe0-ab43-deeb56bc1d02</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
[quote user=""]If I want to create a 1 microsecond continuous timer, and it can change some GPIO pin status when timer-IRQ ioccur.[/quote]
&lt;p&gt;Do you want to create some PWM signal or something? Then I suggest using the PWM peripheral instead.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>