<?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>How to use multiple timers</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29277/how-to-use-multiple-timers</link><description>I have a device that I need to control, that needs 2 different square wave signals of different frequencies (although they may be multiples of each other), one at around 4 MHz and one at 10 KHz. Additionally (while the other two are running in the background</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 Jan 2018 15:07:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29277/how-to-use-multiple-timers" /><item><title>RE: How to use multiple timers</title><link>https://devzone.nordicsemi.com/thread/116448?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 15:07:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc308613-18b1-4af2-985f-1d63ab6e5780</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;The single timer approach just doesn&amp;#39;t work because the logic didn&amp;#39;t work out. Since they are different periods, you use the shorts to clear the counter, and there is only one counter you would need to advance the 4MHz clock CC register constantly so two timers was the way to go.&lt;/p&gt;
&lt;p&gt;I didn&amp;#39;t notice you were using nRF51 which doesn&amp;#39;t have the fork. As long as you start the two timers sequentially in code, they should start on the same Pclk cycle and stay in sync. Using the fork was a way to ensure this was always true.&lt;/p&gt;
&lt;p&gt;Alternatively you could use a third PPI channel tied to a duplicate event on timer 1 to drive timer 2 as a counter(ie, set cc1 on timer 1 to 2 and attach its event to drive timer 2 counter). The downside is timer2 would be delayed by one Pclk.&lt;/p&gt;
&lt;p&gt;Or, you could dig into the PWM core and make it do constant duty output.  Should be straightforward.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m glad it worked out!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use multiple timers</title><link>https://devzone.nordicsemi.com/thread/116450?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 14:44:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf6256bc-3028-4d14-9233-061a3e1ad6da</guid><dc:creator>stephbur</dc:creator><description>&lt;p&gt;Yes, I figured this much by now. But it appears that using two events (2 different values in the CC register) and two PPI channels to trigger two tasks (gpiote in this case) seems not possible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use multiple timers</title><link>https://devzone.nordicsemi.com/thread/116449?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 14:34:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7de8109-5193-4418-8356-22130b6188c8</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;@AmbystomaLabs seems to be using nRF52 which has a fork feature that allows one event to use one PPI channel to trigger two tasks. The nRF51 does not have fork and you will have to use two PPI channels to make one event trigger two tasks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use multiple timers</title><link>https://devzone.nordicsemi.com/thread/116451?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 13:47:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9591049e-477e-4272-912d-40542e2a0e1f</guid><dc:creator>stephbur</dc:creator><description>&lt;p&gt;Thanks again for your incredible help! It works now and is in sync. I don&amp;#39;t have the Fork register (don&amp;#39;t know whether that is SDK or HW related) but they still sync nicely. I still wonder why it doesn&amp;#39;t work using a single timer...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use multiple timers</title><link>https://devzone.nordicsemi.com/thread/116447?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2018 18:12:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c452f27-1cc2-48a9-81a9-547c9d243b23</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;Sadly I couldn&amp;#39;t figure out a way to do it with one timer without involving ISR&amp;#39;s.  You cannot do ISR&amp;#39;s at these frequencies so the only solution was to use two timers.&lt;/p&gt;
&lt;p&gt;But the below code gives you precisely what you wanted. The 4MHz signal was a little rounded. It could be my scope probes or you may want to try putting the gpio into high drive. It was still a pretty decent square wave.&lt;/p&gt;
&lt;p&gt;I lashed the timers together in PPI so they would always be synchronous. Since you were trying it without the SD, I assumed it was gone and started HF_EXT manually.  I just put the code in the blinky shell from the examples to have an easy project to start from.  I chose gpio that were far enough apart on the dk so that I could attach scope probes.&lt;/p&gt;
&lt;p&gt;Have fun!&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;int main(void)
{
    /* Configure board. */
    NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED = 0;
NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART    = 1;

/* Wait for the external oscillator to start up */
while (NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED == 0)
{
    // Do nothing.
}

        NRF_TIMER1-&amp;gt;TASKS_STOP        = 1;                      // Stop timer, if it was running
NRF_TIMER1-&amp;gt;TASKS_CLEAR       = 1;
NRF_TIMER1-&amp;gt;MODE              = TIMER_MODE_MODE_Timer;  // Timer mode (not counter)
NRF_TIMER1-&amp;gt;EVENTS_COMPARE[0] = 0;                      // clean up possible old events
NRF_TIMER1-&amp;gt;EVENTS_COMPARE[1] = 0;
NRF_TIMER1-&amp;gt;EVENTS_COMPARE[2] = 0;
NRF_TIMER1-&amp;gt;EVENTS_COMPARE[3] = 0;

        NRF_TIMER2-&amp;gt;TASKS_STOP        = 1;                      // Stop timer, if it was running
NRF_TIMER2-&amp;gt;TASKS_CLEAR       = 1;
NRF_TIMER2-&amp;gt;MODE              = TIMER_MODE_MODE_Counter;  // Counter mode (not Timer)
NRF_TIMER2-&amp;gt;EVENTS_COMPARE[0] = 0;                      // clean up possible old events
NRF_TIMER2-&amp;gt;EVENTS_COMPARE[1] = 0;
NRF_TIMER2-&amp;gt;EVENTS_COMPARE[2] = 0;
NRF_TIMER2-&amp;gt;EVENTS_COMPARE[3] = 0;


    NRF_GPIOTE-&amp;gt;CONFIG[0] =((GPIOTE_CONFIG_MODE_Task       &amp;lt;&amp;lt; GPIOTE_CONFIG_MODE_Pos)
                            |(4                         &amp;lt;&amp;lt; GPIOTE_CONFIG_PSEL_Pos)
                            |(GPIOTE_CONFIG_POLARITY_Toggle &amp;lt;&amp;lt; GPIOTE_CONFIG_POLARITY_Pos)
                            |(GPIOTE_CONFIG_OUTINIT_Low     &amp;lt;&amp;lt; GPIOTE_CONFIG_OUTINIT_Pos));

    NRF_GPIOTE-&amp;gt;CONFIG[1] =((GPIOTE_CONFIG_MODE_Task       &amp;lt;&amp;lt; GPIOTE_CONFIG_MODE_Pos)
                            |(7                         &amp;lt;&amp;lt; GPIOTE_CONFIG_PSEL_Pos)
                            |(GPIOTE_CONFIG_POLARITY_Toggle &amp;lt;&amp;lt; GPIOTE_CONFIG_POLARITY_Pos)
                            |(GPIOTE_CONFIG_OUTINIT_Low     &amp;lt;&amp;lt; GPIOTE_CONFIG_OUTINIT_Pos));


    NRF_PPI-&amp;gt;CH[0].EEP  = (uint32_t)&amp;amp;NRF_TIMER1-&amp;gt;EVENTS_COMPARE[0];
    NRF_PPI-&amp;gt;CH[0].TEP  = (uint32_t)&amp;amp;NRF_GPIOTE-&amp;gt;TASKS_OUT[0];
		NRF_PPI-&amp;gt;FORK[0].TEP = (uint32_t)&amp;amp;NRF_TIMER2-&amp;gt;TASKS_COUNT;
		
		NRF_PPI-&amp;gt;CH[1].EEP  = (uint32_t)&amp;amp;NRF_TIMER2-&amp;gt;EVENTS_COMPARE[0];
    NRF_PPI-&amp;gt;CH[1].TEP  = (uint32_t)&amp;amp;NRF_GPIOTE-&amp;gt;TASKS_OUT[1];


    NRF_PPI-&amp;gt;CHEN       = (PPI_CHEN_CH0_Enabled &amp;lt;&amp;lt; PPI_CHEN_CH0_Pos)|(PPI_CHEN_CH1_Enabled &amp;lt;&amp;lt; PPI_CHEN_CH1_Pos);

    NRF_TIMER1-&amp;gt;SHORTS      = (1 &amp;lt;&amp;lt; TIMER_SHORTS_COMPARE0_CLEAR_Pos); 
    NRF_TIMER1-&amp;gt;PRESCALER   = 0; 
    NRF_TIMER1-&amp;gt;CC[0]       = 2;   
		
		NRF_TIMER2-&amp;gt;SHORTS      = (1 &amp;lt;&amp;lt; TIMER_SHORTS_COMPARE0_CLEAR_Pos); 
    NRF_TIMER2-&amp;gt;PRESCALER   = 0; 
    NRF_TIMER2-&amp;gt;CC[0]       = 400;   
		
    NRF_TIMER2-&amp;gt;TASKS_START = 1;
		NRF_TIMER1-&amp;gt;TASKS_START = 1;
		
		while (1)
{
    // Do nothing.
}

}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use multiple timers</title><link>https://devzone.nordicsemi.com/thread/116446?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2018 16:40:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:972f3a47-ad4d-403a-bc12-e8bf4d6d66af</guid><dc:creator>stephbur</dc:creator><description>&lt;p&gt;I&amp;#39;m currently trying to get the second (slower) signal running. In theory, I should be able to set CC[1]=100, set PPI Channel 1 to EVENTS_COMPARE[1] and copy the GPIOTE config for a different pin to CONFIG[1], right? For some reason, it does not work :(&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use multiple timers</title><link>https://devzone.nordicsemi.com/thread/116445?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2018 16:32:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96923f98-5138-4094-a04e-e62c9d6c88bf</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;That is good news.&lt;/p&gt;
&lt;p&gt;The only difference between SD version and your version above is the PPI assignments and channel enable.  With the SD running it will write over the PPI registers so you have to use the API command.&lt;/p&gt;
&lt;p&gt;Great work! Make sure to share the knowledge next time the question comes up in the devzone.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use multiple timers</title><link>https://devzone.nordicsemi.com/thread/116444?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2018 16:21:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c26c7eb-8753-4494-8004-208acaa22045</guid><dc:creator>stephbur</dc:creator><description>&lt;p&gt;Thanks AmbystomaLabs, your comments have been incredibly helpful! I got it working with the following minimal code (not worrying about SoftDevice and the like at the moment).&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;int main(){
    sd_clock_hfclk_request();
    NRF_TIMER1-&amp;gt;SHORTS      = (1 &amp;lt;&amp;lt; TIMER_SHORTS_COMPARE0_CLEAR_Pos); 
    NRF_TIMER1-&amp;gt;PRESCALER   = 0; 
    NRF_TIMER1-&amp;gt;CC[0]       = 1;   
    NRF_TIMER1-&amp;gt;TASKS_START = 1;
    NRF_PPI-&amp;gt;CH[0].EEP  = (uint32_t)&amp;amp;NRF_TIMER1-&amp;gt;EVENTS_COMPARE[0];
    NRF_PPI-&amp;gt;CH[0].TEP  = (uint32_t)&amp;amp;NRF_GPIOTE-&amp;gt;TASKS_OUT[0];
    NRF_PPI-&amp;gt;CHEN       = (PPI_CHEN_CH0_Enabled &amp;lt;&amp;lt; PPI_CHEN_CH0_Pos);
  
    NRF_GPIOTE-&amp;gt;CONFIG[0] =((GPIOTE_CONFIG_MODE_Task       &amp;lt;&amp;lt; GPIOTE_CONFIG_MODE_Pos)
                            |(6                         &amp;lt;&amp;lt; GPIOTE_CONFIG_PSEL_Pos)
                            |(GPIOTE_CONFIG_POLARITY_Toggle &amp;lt;&amp;lt; GPIOTE_CONFIG_POLARITY_Pos)
                            |(GPIOTE_CONFIG_OUTINIT_Low     &amp;lt;&amp;lt; GPIOTE_CONFIG_OUTINIT_Pos));
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use multiple timers</title><link>https://devzone.nordicsemi.com/thread/116443?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 20:29:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abf0a98b-368c-4ac3-91c0-50ff1200dd3b</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;You should make the prescaler as big as possible.  There is a minimum number of cycles though between clear and cc.  I think it is 2 or 3 cycles. You may have to run with prescaler equal to zero.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use multiple timers</title><link>https://devzone.nordicsemi.com/thread/116442?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 20:22:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e98ff29-0ec8-47d3-ae76-bf52ad14fa64</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;Also, don&amp;#39;t forget to start the timer.  That is just: NRF_TIMER1-&amp;gt;TASKS_START       = 1;&lt;/p&gt;
&lt;p&gt;You also need to make sure the SD keeps the 32MHz clock running.  Coming out of power manage it&amp;#39;ll switch to HFINT and not HFEXT.  Just look in the devzone on how to do this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use multiple timers</title><link>https://devzone.nordicsemi.com/thread/116441?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 20:15:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f91330b4-af4f-4a70-9cd0-b2f0da4a4c97</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;I&amp;#39;ll apologize in advance for the sloppiness of this code.  Writing your actual code would take awhile. This is just copied out of bits I have done. You still have to write your own code.&lt;/p&gt;
&lt;p&gt;You have most of it already for ppi/gpiote.  Basically you point events to eep&amp;#39;s, teps, etc. All the available configs and events are in the spec.
The only trick with the SD is you have to use the API to do the channel assign so the SD knows what you are doing.&lt;/p&gt;
&lt;p&gt;Timer config stuff:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	uint32_t          m_DelayuS     		 = 2160;                          	 /**&amp;lt; some number you choose*/
			
		NRF_TIMER1-&amp;gt;TASKS_STOP        = 1;                      // Stop timer, if it was running
NRF_TIMER1-&amp;gt;TASKS_CLEAR       = 1;
NRF_TIMER1-&amp;gt;MODE              = TIMER_MODE_MODE_Timer;  // Timer mode (not counter)
NRF_TIMER1-&amp;gt;EVENTS_COMPARE[0] = 0;                      // clean up possible old events
NRF_TIMER1-&amp;gt;EVENTS_COMPARE[1] = 0;
NRF_TIMER1-&amp;gt;EVENTS_COMPARE[2] = 0;
NRF_TIMER1-&amp;gt;EVENTS_COMPARE[3] = 0;
	
	NRF_TIMER1-&amp;gt;SHORTS      = (1 &amp;lt;&amp;lt; TIMER_SHORTS_COMPARE0_CLEAR_Pos);  //Shorts can allow for reset of count after compare.  ie, like an oscillator
	NRF_TIMER1-&amp;gt;PRESCALER   = 4;                                     // Input clock is 16MHz, timer clock = 2 ^ prescale -&amp;gt; interval 1us
	NRF_TIMER1-&amp;gt;CC[0]       = m_DelayuS;                        	 // Delay for tx start for pa control
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;//***Then do same for other cc registers as needed.&lt;/p&gt;
&lt;p&gt;So config and pin assign look like (look up the options you need in the guides, this is only an example):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	NRF_GPIOTE-&amp;gt;CONFIG[2] =((GPIOTE_CONFIG_MODE_Task       &amp;lt;&amp;lt; GPIOTE_CONFIG_MODE_Pos)
           |(22                         &amp;lt;&amp;lt; GPIOTE_CONFIG_PSEL_Pos)
           |(GPIOTE_CONFIG_POLARITY_Toggle &amp;lt;&amp;lt; GPIOTE_CONFIG_POLARITY_Pos)
           |(GPIOTE_CONFIG_OUTINIT_Low     &amp;lt;&amp;lt; GPIOTE_CONFIG_OUTINIT_Pos));
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then the eep and tep are set with the API.  Again this is just an example.  Look up with functions you need.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	sd_ppi_channel_assign(2, &amp;amp;(NRF_TIMER1-&amp;gt;EVENTS_COMPARE[0]), &amp;amp;(NRF_GPIOTE-&amp;gt;TASKS_SET[2]));
	sd_ppi_channel_assign(3, &amp;amp;(NRF_TIMER1-&amp;gt;EVENTS_COMPARE[1]), &amp;amp;(NRF_GPIOTE-&amp;gt;TASKS_CLR[2]));

sd_ppi_channel_enable_set(PPI_CHEN_CH2_Msk);
sd_ppi_channel_enable_set(PPI_CHEN_CH3_Msk);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So, what did we learn here?  Well there are both gpiote channels and ppi channels.  They are different and both get assigned to something for a complete gpio solution. You have to watch out for the reserved channels in the SD guides.  And you cannot assign your ppi/gpiote channels  until after you start the SD.&lt;/p&gt;
&lt;p&gt;Then for your solution just use one of the extra cc registers for the other timer since they are related.  Hopefully the registers are big enough to accommodate the differential.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use multiple timers</title><link>https://devzone.nordicsemi.com/thread/116439?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 15:02:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a8b932c-1405-4d51-8541-58f91e9d1774</guid><dc:creator>stephbur</dc:creator><description>&lt;p&gt;My followup question would have been too long for a comment. I therefore added it as an answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use multiple timers</title><link>https://devzone.nordicsemi.com/thread/116440?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 15:02:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e0da3f3-8776-42f3-90cc-6d0f8dfbc941</guid><dc:creator>stephbur</dc:creator><description>&lt;p&gt;Thanks Martin for your answer. I will go the PPI/GPIOTE way then. Am I correct in assuming, that given the frequencies are multiples (of 2) of each other I will be able to use a single timer for both square waves?&lt;/p&gt;
&lt;p&gt;I am still not very comfortable with dealing with this syntax. I found this sample code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static void ppi_init(void) {
/* Configure PPI channel 0 to toggle PWM_OUTPUT_PIN1 on every Timer 1 COMPARE[0] match. */
NRF_PPI-&amp;gt;CH[0].EEP = (uint32_t) &amp;amp;NRF_TIMER1-&amp;gt;EVENTS_COMPARE[0];
NRF_PPI-&amp;gt;CH[0].TEP = (uint32_t) &amp;amp;NRF_GPIOTE-&amp;gt;TASKS_OUT[0];

/* Configure PPI channel 1 to toggle PWM_OUTPUT_PIN1 on every Timer 1 COMPARE[1] match. */
NRF_PPI-&amp;gt;CH[1].EEP = (uint32_t) &amp;amp;NRF_TIMER1-&amp;gt;EVENTS_COMPARE[1];
NRF_PPI-&amp;gt;CH[1].TEP = (uint32_t) &amp;amp;NRF_GPIOTE-&amp;gt;TASKS_OUT[0];
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;How can I set the compare event for TIMER1? Do I need to set the GPIOTE &amp;quot;out task&amp;quot; to &amp;quot;toggle&amp;quot; explicitly? Where do I determine the pin to be toggled? Are there any higher level libraries for what I am trying to achieve?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use multiple timers</title><link>https://devzone.nordicsemi.com/thread/116438?ContentTypeID=1</link><pubDate>Mon, 08 Jan 2018 14:56:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1cfd77d-5aab-4610-aff6-562d0f7f73e5</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, the nRF51 has 3 timers and the Softdevice needs one of them. So then you have two left for you application. The nRF51 also has two RTC timers, and once again the Softdevice seizes one of them. Maybe you can use the other one for your low frequency square wave? I suppose you can also use PPI and GPIOTE with your timers to make the square waves operate without involving interrupts and the CPU. Then it shouldn&amp;#39;t be a problem to do both SPI and BLE as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>