We did initial work on the NRF51DK (PCA_10028). We are using SDK 12 and ARM-GCC. We were able to compile and run successfully the experimental_ble_app_blinky and connect using your android App - nRF Blinky. We developed a custom board and were able to successfully run and connect to that with the experimental_ble_app_blinky. Our custom board has 6 buttons. I changed the C-FLAG to our custom board in the MAKEFILE and that seems to be working fine. If I add the other 2 buttons in the program, the program compiles fine (no errors) but will not broadcast BLE or have any other functionality. If I comment out any of 2 of the buttons in the static app_button_cfg statement, it works again. Here is the line below where it will work - if I take the comments out, it does not work.
static void buttons_init(void){
uint32_t err_code;
//The array must be static because a pointer to it will be saved in the button handler module.
static app_button_cfg_t buttons[] =
{
{B1, false, BUTTON_PULL, button_event_handler},
{B2, false, BUTTON_PULL, button_event_handler},
{B3, false, BUTTON_PULL, button_event_handler},
{B4, false, BUTTON_PULL, button_event_handler}
//{B5, false, BUTTON_PULL, button_event_handler},
//{B6, false, BUTTON_PULL, button_event_handler}
};
err_code = app_button_init(buttons, sizeof(buttons) / sizeof(buttons[0]),
BUTTON_DETECTION_DELAY);
APP_ERROR_CHECK(err_code);}
I defined the button's pins with - "#define B1 21" as an example. The button pins are 21,22,23,24,25,28.
What am I doing wrong? Is there something that I am not setting properly in another header file? I can make any 4 buttons work so I know the I/Os are good - I just can't make all 6 work. Any help would be appreciated.