cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Smart Bluetooth

ShawnA_01
Employee

If your application is considering the use of bleprofile_PrepareHidOff() to enter deep-sleep (HIDOFF) mode, there are some considerations you should be aware of, or the request may fail.


For example, make sure there are no outstanding (un-cleared) GPIO interrupts pending, or in the middle of being processed.


Note:  GPIO:P0 should be pulled high (via 10k), or the key-scan feature of the device may think a key on a keyboard is pressed and it will stay awake to perform further scanning.


You may also want to consider registering for a call-back in the event your request is denied, as follows:


void application_abort_hidoff_cb(void)

{

// hid-off aborted.

ble_trace0(“hid-off aborted”);   // print a message or toggle a GPIO


// Call the profile level function

bleprofile_abortHidoff();

}

void application_create(void)

{

bleprofile_regAppEvtHandler(BLECM_APP_EVT_ABORTING_HIDOFF,(BLECM_NO_PARAM_FUNC)application_abort_hidoff_cb);

}

0 Replies