The button does not work on the custom board?

I am testing ble_app_hid_keybpard of SDK17.1.0 using nRF52-DK board.
After running, if BLE connection is not made, it enters Sleep_Mode after slow advertise. At this time, if I press one of the 4 buttons on the DK board, it wakes up, executes main() again, and then Fast Advertises again.

Question 1.
When I press button 1, button 3, and button 4, the DK board wakes up.

And when I press button 2, it does Bond Erase! and reboots.

What I found is the following definition in bsp_btn_ble.c. Is this related?

Button 1 is BTN_ID_WAKEUP. Is that right?
Button 2 is BTN_ID_WAKEUP_BOND_DELETE. Is that right?

#define BTN_ID_WAKEUP 0 /**< ID of button used to wake up the application. */
#define BTN_ID_SLEEP 0 /**< ID of button used to put the application into sleep mode. */
#define BTN_ID_DISCONNECT 0 /**< ID of button used to gracefully terminate a connection on long press. */
#define BTN_ID_WAKEUP_BOND_DELETE 1 /**< ID of button used to wake up the application and delete all bonding information. */
#define BTN_ID_WHITELIST_OFF 1 /**< ID of button used to turn off usage of the whitelist. */

Where are button 3 and button 4 set?

Question 2.

The DK board is implemented so that pressing the button connects to Low (GND) in hardware.

However, my custom board is implemented so that pressing the button connects to High (+3.3V). So the button does not work. Where should I modify the firmware?

Best Regards,

Yim.

Related