<?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>GPIO not working with SD</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/6867/gpio-not-working-with-sd</link><description>Hello, 
 I have configured a 1 ms timer (Timer 2) interrupt. I am just updating some static variables for reference in the 1 ms interrupt. Everything seems to be working fine here (SD enabled).
However I tried to toggle one of the GPIO pins in the 1</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 Jul 2015 09:07:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/6867/gpio-not-working-with-sd" /><item><title>RE: GPIO not working with SD</title><link>https://devzone.nordicsemi.com/thread/24202?ContentTypeID=1</link><pubDate>Fri, 17 Jul 2015 09:07:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a798180-3aaf-4f3d-808d-137911f026f5</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Gautham,
Please update this thread with more information. If the info here already helped, then please accept it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO not working with SD</title><link>https://devzone.nordicsemi.com/thread/24201?ContentTypeID=1</link><pubDate>Mon, 11 May 2015 07:16:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:badf1ee0-ed66-4bd1-8c35-03158a72d026</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I am sorry for the late answer. When I try to check something, I update some example code verify and move on, I did not save that configuration. Sorry for that. I could help you if you could give me your project and I will look into it to see why the GPIO (in your case buzzer ) is not working as it should.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO not working with SD</title><link>https://devzone.nordicsemi.com/thread/24200?ContentTypeID=1</link><pubDate>Wed, 06 May 2015 13:12:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb60d2eb-8f6e-4ad5-a9ab-0d25abc8db02</guid><dc:creator>Gautham</dc:creator><description>&lt;p&gt;Hey Aryan,&lt;/p&gt;
&lt;p&gt;Thanks for your time and inputs.
I have updated your code as per your suggestion.
The port I am toggling is basically connected to a Piezo buzzer. As stated the buzzer starts beeping upon starting the device. Upon BLE connection or disconnection the buzzer stops and then the device stops broadcasting too. I have kinda reached a dead end here.
Is it possible to share your project? I would like to flash your s/w and check the behavior with my device.
Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO not working with SD</title><link>https://devzone.nordicsemi.com/thread/24199?ContentTypeID=1</link><pubDate>Tue, 05 May 2015 09:38:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73555460-ee7c-48ee-ad40-488c181b2096</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I copied your timer logic into my test and it worked just fine even with 7.1.
There must be something else that you must be doing wrong with advertiser (not related to Timer initialization and not related to timer interrupt handler)&lt;/p&gt;
&lt;p&gt;I would however suggest you to set your timer interrupt priority to lower&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	NVIC_SetPriority(TIMER2_IRQn, APP_PRIORITY_LOW);
	NVIC_ClearPendingIRQ(TIMER2_IRQn);
	NVIC_EnableIRQ(TIMER2_IRQn);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Please note that on Cortex-M0&lt;/p&gt;
&lt;p&gt;Out of reset, all interrupts and exceptions with configurable priority have the same default priority of zero. This priority number represents the highest-possible interrupt urgency.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO not working with SD</title><link>https://devzone.nordicsemi.com/thread/24198?ContentTypeID=1</link><pubDate>Tue, 05 May 2015 08:02:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abbb376d-3bb5-48fc-a035-a3df651b8217</guid><dc:creator>Gautham</dc:creator><description>&lt;p&gt;Hey Thanks for your response!
Here is the code:&lt;/p&gt;
&lt;p&gt;1 ms timer configuration:
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_Timer;   // Timer mode (not counter)
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;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Timer is polled, but enable the compare0 interrupt in order to wakeup from CPU sleep
NRF_TIMER2-&amp;gt;INTENSET    = TIMER_INTENSET_COMPARE0_Msk;
	NRF_TIMER2-&amp;gt;SHORTS      = 1 &amp;lt;&amp;lt; TIMER_SHORTS_COMPARE0_CLEAR_Pos;    // Clear the count every time timer reaches the CCREG0 count
NRF_TIMER2-&amp;gt;PRESCALER   = 9;                                       // Input clock is 16MHz, timer clock = 2 ^ prescale -&amp;gt; interval 1us 9
NRF_TIMER2-&amp;gt;CC[0]       = 32;                          
	NVIC_EnableIRQ(TIMER2_IRQn);
	NRF_TIMER2-&amp;gt;TASKS_START = 1;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;1 ms Timer IRQ:&lt;/p&gt;
&lt;p&gt;void TIMER2_IRQHandler(void)
{
if ((NRF_TIMER2-&amp;gt;EVENTS_COMPARE[0] != 0) &amp;amp;&amp;amp; ((NRF_TIMER2-&amp;gt;INTENSET &amp;amp; TIMER_INTENSET_COMPARE0_Msk) != 0))
{
NRF_TIMER2-&amp;gt;EVENTS_COMPARE[0] = 0;	       //Clear compare register 0 event	
ms_update_timer();
h++;
if((h&amp;lt;6) &amp;amp;&amp;amp; (BuzzerTimer != 0))
{
nrf_gpio_pin_set(BUZZER_0);
}
else
{
nrf_gpio_pin_clear(BUZZER_0);
h=0;
}&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Is it possible to check with SD 7.1?
Thanks for your time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO not working with SD</title><link>https://devzone.nordicsemi.com/thread/24197?ContentTypeID=1</link><pubDate>Tue, 05 May 2015 07:38:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ef70272-1c22-4caa-97e8-8de76266f5ea</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;What you are trying to achieve is basic and that should work otherwise there would have been a lot of reports here regarding that.
I have verified this on SDK 7.2 with just one advertiser and there were no problems with the gpio. I verified even with 0.1ms timer interrupt and it just worked fine.&lt;/p&gt;
&lt;p&gt;post your code here and I can check for you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>