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

When I use buttons_init in 6310 ble_app_hids_mouse it lose interrupt some, any body meet this before?

static void buttons_init(void) { static app_button_cfg_t buttons[] = { {MOTION_DETECT_PIN_NO, false, NRF_GPIO_PIN_PULLUP, button_event_handler}, {LEFT_BUTTON_PIN_NO, false, NRF_GPIO_PIN_PULLUP, button_event_handler}, {RIGHT_BUTTON_PIN_NO, false, NRF_GPIO_PIN_PULLUP, button_event_handler}, // Note: This pin is also BONDMNGR_DELETE_BUTTON_PIN_NO {UP_WHEEL_PIN_NO, false, NRF_GPIO_PIN_PULLUP, button_event_handler}, {DOWN_WHEEL_PIN_NO, false, NRF_GPIO_PIN_PULLUP, button_event_handler}, {MIDDLE_BUTTON_PIN_NO, false, NRF_GPIO_PIN_PULLUP, button_event_handler}, };

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

I want to read sensor date by I2C read, motion event detected by MOTION_DETECT_PIN_NO, it would change to low by sensor when motion happen. I can get all things trigger except MOTION_DETECT_PIN_NO(pin 0.24)

May be sensor data shoud be get by other way?

  • :D May I ask you question that after I download the "ble_app_hids_mouse.hex" into the kit ,but my computer can't find such device ,I mean that my computer can't find the mouse.Could you tell me something about.Thanks! And my e-mail :zkl1097129@csu.edu.cn.

  • Please don't hijack questions like this. When you have an unrelated question, post it separately.

  • Your setup looks reasonable, if the pin is kept low when motion is detected. You won't get a button event before the button detection delay timeout has passed, so just a pulse will not be sufficient. If you need to detect a pulse, you should instead use app_gpiote directly.

    Could it be that you're seeing the same as this person? Could you please try to look at all your pins with a logic analyzer and post a trace?