This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Enable to create a wakeup button on central multilink example

I'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;

// @note: Array must be static because a pointer to it will be saved in the Button handler
//        module.
static app_button_cfg_t buttons[] =
{
    {SEND_NOTIFICATION_BUTTON_PIN, false, NRF_GPIO_PIN_PULLUP, button_event_handler},
    {BOND_DELETE_ALL_BUTTON_PIN  , false, NRF_GPIO_PIN_PULLUP, NULL},
};

APP_BUTTON_INIT(buttons, sizeof(buttons) / sizeof(buttons[0]), BUTTON_DETECTION_DELAY, false);

err_code = app_button_enable();
APP_ERROR_CHECK(err_code);

the project simple crash until reach the main function. Can anyone hellp me? I'm using S120 1.0.1 and SDK_v6.1.0_b2ece6.

Thansk in advance and i'm sorry about my english.

Parents
  • 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.

Reply
  • 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.

Children
No Data
Related