<?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>Enable to create a wakeup button on central multilink example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/8938/enable-to-create-a-wakeup-button-on-central-multilink-example</link><description>I&amp;#39;m trying to implement a wake-up button on central multilink example. I.e, i need to implement the app_button in order to wake up from sd_evt_wat() function. The problem is when I add this characteristic on buttons_init, 
 uint32_t err_code; 
 // </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 31 Aug 2015 15:09:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/8938/enable-to-create-a-wakeup-button-on-central-multilink-example" /><item><title>RE: Enable to create a wakeup button on central multilink example</title><link>https://devzone.nordicsemi.com/thread/32900?ContentTypeID=1</link><pubDate>Mon, 31 Aug 2015 15:09:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d543e4b-8ddc-4db0-bf13-c3e1cd256a05</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi Pedro&lt;/p&gt;
&lt;p&gt;I think there should be no difference in code for the app_button if you use it for a Central or Peripheral application. Try to move the initialization of the libraries before you initialize the softdevice with ble_stack_init(), i.e. something like&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;int main(void)
{
			leds_init();
            APP_TIMER_INIT();
			gpiote_init();
			buttons_init();
			ble_stack_init();
			client_handling_init();
			device_manager_init();

			// Star scanning
			scan_start();
				
			for (;;)
			{
					power_manage();
			}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;By the way, the main.c file you have attached is apparently from another project, as it does not reflect the code you have previously posted for your main function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enable to create a wakeup button on central multilink example</title><link>https://devzone.nordicsemi.com/thread/32899?ContentTypeID=1</link><pubDate>Fri, 28 Aug 2015 10:27:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e1b6dce-70fd-42df-9e4d-e049efbf0fc8</guid><dc:creator>PedroSilva3</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5367.main.c"&gt;main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The debugger stop on operation 0xFFFFFFFE , that means MOVS R0,R0 .&lt;/p&gt;
&lt;p&gt;I know, but I already see many of this posts, but the problem is the implementation on central device. Usually the central device is a smartphone, and in my case, i want nrf51822 works as central.
Thank in advance.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enable to create a wakeup button on central multilink example</title><link>https://devzone.nordicsemi.com/thread/32898?ContentTypeID=1</link><pubDate>Fri, 28 Aug 2015 10:11:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60a5276f-483a-408b-aa61-4bc7b73f368f</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;please add APP_TIMER_INIT in your code and if it gets stuck, start the debugger, run and stop the debugger. The debugger will tell you where the code is stuck. buttons library is used by many many customers and there are tons of information about that in this forum.
Your problem seems to be you not able to debug your code.
you can post your main.c file here and i can have a quick look into it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enable to create a wakeup button on central multilink example</title><link>https://devzone.nordicsemi.com/thread/32897?ContentTypeID=1</link><pubDate>Fri, 28 Aug 2015 09:46:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80a58bed-34c5-42c5-8b87-3c49df857328</guid><dc:creator>PedroSilva3</dc:creator><description>&lt;p&gt;Yes, I already have this. But, if i put timers_init(), it happens the same.&lt;/p&gt;
&lt;p&gt;static void timers_init(void){
// Initialize timer module, making it use the scheduler.
APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, false);
}&lt;/p&gt;
&lt;p&gt;Basically, I copy the functions from multilink_peripheral. I.e, i add gpio_init, timers_init and button_event_handler. And I add the files to libraries.
I can post my code here, if you prefer. I&amp;#39;m really stuck .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enable to create a wakeup button on central multilink example</title><link>https://devzone.nordicsemi.com/thread/32896?ContentTypeID=1</link><pubDate>Fri, 28 Aug 2015 09:36:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9b54431-6c7c-4904-8846-0f1392dd1cd5</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;you also need to initialize app_timer before buttons_init for the buttons to work. Look for button example in SDK.
Timer is used for checking button debouncing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enable to create a wakeup button on central multilink example</title><link>https://devzone.nordicsemi.com/thread/32895?ContentTypeID=1</link><pubDate>Fri, 28 Aug 2015 09:10:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb7edc81-efa1-4929-ac0d-a6975d9ea258</guid><dc:creator>PedroSilva3</dc:creator><description>&lt;p&gt;I think it is a hardfault because in debug mode, i put a breakpoint on the first call on main, in this case on &amp;quot;ble_stack_init(), and never stop there. There is some way to see what error happen? i&amp;#39;m using keil v5 .
If i comment APP_BUTTON_INIT the program works perfectly. If I uncomment, the program compiles without errors and when I run anything happen :/&lt;/p&gt;
&lt;p&gt;This is my simple main function:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;int main(void)
{
			ble_stack_init();
			leds_init();
			gpiote_init();
			buttons_init();
			client_handling_init();
			device_manager_init();

			// Star scanning
			scan_start();
				
			for (;;)
			{
					power_manage();
			}
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enable to create a wakeup button on central multilink example</title><link>https://devzone.nordicsemi.com/thread/32894?ContentTypeID=1</link><pubDate>Fri, 28 Aug 2015 06:56:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7034a1a6-c23d-41f3-aec8-98871e8b721a</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;can you show us your main() function? when you say application crash is it a hardfault or maybe APP_ERROR_CHECK failed causing a system reset?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>