<?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>Board buttons nRF52</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55406/board-buttons-nrf52</link><description>HI, 
 I&amp;#39;m trying to add some functions to my code, and the buttons interaction is one of them. I saw some posts and I think I did exactly like that but I can&amp;#39;t get interaction with buttons. 
 This is my main code. 
 So, the button functions are at line</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 13 Dec 2019 10:36:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55406/board-buttons-nrf52" /><item><title>RE: Board buttons nRF52</title><link>https://devzone.nordicsemi.com/thread/225329?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2019 10:36:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d43133bc-bb9d-41ce-96bb-f9844dd02d43</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Joao,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Your&amp;nbsp;buttons_init() does not initialize the bsp correctly and it did not initialize&amp;nbsp;&lt;span&gt;the&amp;nbsp;&lt;/span&gt;&lt;a title="BSP BLE Button Module" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/examples_bsp_btn_ble.html?cp=6_1_3_6_1"&gt;BSP BLE Button Module&lt;/a&gt;. Please refer to&amp;nbsp;buttons_leds_init() in the&amp;nbsp;&lt;a title="Template Application" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/ble_sdk_app_template.html?cp=6_1_4_2_2_23"&gt;Template Application&lt;/a&gt;&lt;span&gt;&amp;nbsp;example to see how to initial BSP (&lt;/span&gt;&lt;a title="bsp_init" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/group__bsp.html?cp=6_1_6_11_8_23#ga61f2abcbc19d294a7ab8e4a43de5a204"&gt;bsp_init&lt;/a&gt;&lt;span&gt;) and&amp;nbsp;&lt;/span&gt;&lt;span&gt;initializing the&amp;nbsp;&lt;a title="BSP BLE Button Module" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/examples_bsp_btn_ble.html?cp=6_1_3_6_1"&gt;BSP BLE Button Module&lt;/a&gt;&amp;nbsp;(&lt;a title="bsp_btn_ble_init" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/group__bsp__btn__ble.html?cp=6_1_6_11_8_1_2#ga1bcd36f9d028265b7b23ba54723048dd"&gt;bsp_btn_ble_init&lt;/a&gt;).&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@brief Function for initializing buttons and leds.
 *
 * @param[out] p_erase_bonds  Will be true if the clear bonding button was pressed to wake the application up.
 */
static void buttons_leds_init(bool * p_erase_bonds)
{
    ret_code_t err_code;
    bsp_event_t startup_event;


    err_code = bsp_init(BSP_INIT_LEDS | BSP_INIT_BUTTONS, bsp_event_handler);
    APP_ERROR_CHECK(err_code);

    err_code = bsp_btn_ble_init(NULL, &amp;amp;startup_event);
    APP_ERROR_CHECK(err_code);

    *p_erase_bonds = (startup_event == BSP_EVENT_CLEAR_BONDING_DATA);
}
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If you enable&amp;nbsp;NRF_LOG_BACKEND_UART_ENABLED in the config.h as&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// &amp;lt;e&amp;gt; NRF_LOG_BACKEND_UART_ENABLED - nrf_log_backend_uart - Log UART backend
//==========================================================
#ifndef NRF_LOG_BACKEND_UART_ENABLED
#define NRF_LOG_BACKEND_UART_ENABLED 1
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You could see the log in the terminal tool like putty. The log will indicate where is wrong.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Board buttons nRF52</title><link>https://devzone.nordicsemi.com/thread/224562?ContentTypeID=1</link><pubDate>Mon, 09 Dec 2019 22:27:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7454d90e-450e-4da7-9442-fde24c2109a3</guid><dc:creator>Joao Filipe</dc:creator><description>&lt;p&gt;Hi Amanda&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using the&amp;nbsp;nRF5_SDK_15.3.0 version.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I will study that, but for now can you tell me if my code is incorrect or what could be happening to the leds not be working?&lt;/p&gt;
&lt;p&gt;With my best&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Board buttons nRF52</title><link>https://devzone.nordicsemi.com/thread/224477?ContentTypeID=1</link><pubDate>Mon, 09 Dec 2019 13:51:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8927e162-4b82-452a-8cff-03c43e816c31</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Joao,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Which version of SDK are you using?&lt;/p&gt;
&lt;p&gt;You should study the&amp;nbsp;&lt;a title="Template Application" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/ble_sdk_app_template.html?cp=6_1_4_2_2_23"&gt;Template Application&lt;/a&gt;&amp;nbsp;example to see how to initial BSP (&lt;a title="bsp_init" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/group__bsp.html?cp=6_1_6_11_8_23#ga61f2abcbc19d294a7ab8e4a43de5a204"&gt;bsp_init&lt;/a&gt;) and&amp;nbsp;&lt;span&gt;initializing the&amp;nbsp;&lt;a title="BSP BLE Button Module" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/examples_bsp_btn_ble.html?cp=6_1_3_6_1"&gt;BSP BLE Button Module&lt;/a&gt;&amp;nbsp;(&lt;a title="bsp_btn_ble_init" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/group__bsp__btn__ble.html?cp=6_1_6_11_8_1_2#ga1bcd36f9d028265b7b23ba54723048dd"&gt;bsp_btn_ble_init&lt;/a&gt;).&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>