<?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>PWM Modul crash after start advertising.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/475/pwm-modul-crash-after-start-advertising</link><description>Hi all, 
 i have a problem with my pwm modul, if i use my setPWM Function before i start advertising it works fine. But if if i use PWM after starting advertising it doesn&amp;#39;t work anymore. I use Timer 2 ang gpiote chanel 0 and 1. What could be a reason</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 18 Sep 2013 06:30:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/475/pwm-modul-crash-after-start-advertising" /><item><title>RE: PWM Modul crash after start advertising.</title><link>https://devzone.nordicsemi.com/thread/2490?ContentTypeID=1</link><pubDate>Wed, 18 Sep 2013 06:30:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9b1d64c-c512-4f1b-a197-d396d6fc66c3</guid><dc:creator>Nils Minor</dc:creator><description>&lt;p&gt;Hi does no one have an idea what a reason for a crash could be?
My Problem is, if i press my off button (doesn&amp;#39;t matter if i use app_button or using gpiote) a timer is started. If the timer is finished it calls the button timeout handler which is a &amp;quot;System_off Function&amp;quot; And if i call In the Function a function which turn on the PWM (like set_pwm (128)) or if i use my wait function (using app_timer to wait some milliseconds) th processor crashes and doesn#t reset the System like i need.&lt;/p&gt;
&lt;p&gt;What reason could it have the this happens?&lt;/p&gt;
&lt;p&gt;best regards Nils Minor&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM Modul crash after start advertising.</title><link>https://devzone.nordicsemi.com/thread/2489?ContentTypeID=1</link><pubDate>Mon, 16 Sep 2013 10:52:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22f01c19-efc4-4240-82d6-1ce872766488</guid><dc:creator>Nils Minor</dc:creator><description>&lt;p&gt;Do i have to look for something special to use gpiote, becaouse i think that the gpiote makes some errors in my Code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM Modul crash after start advertising.</title><link>https://devzone.nordicsemi.com/thread/2488?ContentTypeID=1</link><pubDate>Mon, 16 Sep 2013 06:34:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28d6ba7b-c653-433e-92f3-3fe261bd7e58</guid><dc:creator>Nils Minor</dc:creator><description>&lt;p&gt;Hi,
i just checked my code again and found, It its maybe not beacouse of the softdevice, maybe its becaouse of me gpiote handle. If i call the Gpiote interrupthandler the pressing the button no pwm and no delay (delay with the apptimer) works.here is my code&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
void gpiote_init									(void)											// Initialisierung des GPIOTE Moduls
{
		uint32_t err_code;
	
    uint32_t pin_mask1 = (1 &amp;lt;&amp;lt; BUTTON_EIN);
		uint32_t pin_mask2 = (1 &amp;lt;&amp;lt; BUTTON_AUS);
	
	  APP_GPIOTE_INIT(APP_GPIOTE_MAX_USERS);
    NVIC_SetPriority(GPIOTE_IRQn, APP_IRQ_PRIORITY_HIGH);

    // We want to be notified both on rising and falling edge. 
    err_code = app_gpiote_user_register(&amp;amp;m_gpiote_user_id_ein, pin_mask1, pin_mask1, gpiote_event_handler_ein);
    APP_ERROR_CHECK(err_code);
    
		err_code = app_gpiote_user_register(&amp;amp;m_gpiote_user_id_aus, pin_mask2, pin_mask2, gpiote_event_handler_aus);
    APP_ERROR_CHECK(err_code);
	
    err_code = app_gpiote_user_enable(m_gpiote_user_id_ein);
    APP_ERROR_CHECK(err_code);
	
	  err_code = app_gpiote_user_enable(m_gpiote_user_id_aus);
    APP_ERROR_CHECK(err_code);	
	
		uartStr(&amp;quot;\n** GPIO Task Events erstellt                **&amp;quot;);

		// NRF_GPIOTE-&amp;gt;INTENSET = GPIOTE_INTENSET_PORT_Msk;
    // NVIC_EnableIRQ(GPIOTE_IRQn);
}

// The button eventhandler for shortpress 
void button_ein_short_pressed			(void * p_context)					// Timeouthandler für createTimerforGPIO
{ 	
	if (device_status == true &amp;amp;&amp;amp; bt_ein_enable == true) 		// Ist das Gerät an?
	{	
		app_timer_stop 	(m_timer_id_ein_long_push);			// Timer wird angehalten 
	
		if (bt_count != bom_config_stat.TherapieIntensiSchritte)
		{
			bt_count++;
			uartStr(&amp;quot;\n** Taster |Ein +| wurde gedrueckt           **&amp;quot;);
		}
		else
		{
			uartStr(&amp;quot;\n** Maximaler Tasterwert erreicht            **&amp;quot;);
		}
	}
	else													// Ansonsten muss 2 Skeunden lang gedrückt werden
	{
		uint32_t err_code;
			
		err_code = app_timer_start(m_timer_id_ein_long_push, BUTTON_LONG_PRESSED, NULL);
		APP_ERROR_CHECK(err_code);
	}
}

&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM Modul crash after start advertising.</title><link>https://devzone.nordicsemi.com/thread/2487?ContentTypeID=1</link><pubDate>Mon, 16 Sep 2013 06:09:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dffdf195-6746-4daf-8bb3-f60a7b2d4722</guid><dc:creator>Nils Minor</dc:creator><description>&lt;p&gt;Maybe a reason for crashing could also bee, that i use 2 giote members for handl my two buttons.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>