- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would like to allow the Host to sleep, then wake it up when there is a Bluetooth event. I have tried a number of different things, but the HOST_WAKE is always high and never changes. Some things I have tried:
1. wiced_sleep_config(WICED_TRUE,WICED_WAKE_GPIO_ACTIVE_HIGH,WICED_WAKE_GPIO_ACTIVE_HIGH); Then toggling BT_WAKE pin.
2. Also have tried accessing that pin directly with wiced_hal_gpio.h functions.
I feel like I am missing something. I don't think I want to put it into deep sleep mode otherwise it won't advertise. I am not concerned whether or not CYW20706 can go to sleep or not. I would just like to allow my Host to go to sleep and be able to wake it back up when there is a Bluetooth event. Any code examples or tips?
Thanks,
John
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can drive the HOST_WAKE pin manually from the application on whichever BT events you want the host to wake up for (connection up/down, GATT events, pairing, other profile events, etc). The toggling of the GPIO will need to be done from every event handler individually and you must first register for each respective event (registering for relevant event callbacks is done in all sample apps and depends on which profiles you're using).
This is assuming that you're not running a true hosted mode device (in which case you wouldn't be loading WICED code to the chip).
Jacob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can drive the HOST_WAKE pin manually from the application on whichever BT events you want the host to wake up for (connection up/down, GATT events, pairing, other profile events, etc). The toggling of the GPIO will need to be done from every event handler individually and you must first register for each respective event (registering for relevant event callbacks is done in all sample apps and depends on which profiles you're using).
This is assuming that you're not running a true hosted mode device (in which case you wouldn't be loading WICED code to the chip).
Jacob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
jact
That's what I would like to do and have tried that but haven't been successful. Is this the right assignment for the BT_HOST_WAKE pin, it is not clear what pin number this should be?
#define BT_HOST_WAKE WICED_GPIO_01
//initialize
wiced_hal_gpio_init();
// to configure pin
wiced_hal_gpio_configure_pin(BT_HOST_WAKE, GPIO_OUTPUT_ENABLE, GPIO_PIN_OUTPUT_LOW);
// to set pin
wiced_hal_gpio_set_pin_output( BT_HOST_WAKE, GPIO_PIN_OUTPUT_HIGH);
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This will depend on your hardware, you'll have to check your schematic to see which is connected to the host MCU. If you're using the CYW920706WCDEVAL board, the HOST_WAKE pin is designated as P25 and P32, but this designation is only relevant for HCI devices to my knowledge (you can use any pin you want).
Jacob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using CYBT-013033.
wiced_hal_gpio_set_pin_output(WICED_P25, GPIO_PIN_OUTPUT_HIGH);
or
wiced_hal_gpio_set_pin_output(WICED_P32, GPIO_PIN_OUTPUT_HIGH);
or
wiced_hal_gpio_set_pin_output(WICED_GPIO_01, GPIO_PIN_OUTPUT_HIGH);
Any of these should be able to toggle that pin?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content