cyw20719b2 SDS mode for custom board

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
anje_2248446
Level 3
Level 3
25 sign-ins 10 replies posted 10 questions asked

Hello guys,

I have a custom board with cyw20719b2, with a build setup using modus toolboox 2.1 and wiced bt sdk v2.7.1 fdb3982. As this is a custom board for embedded environment, the host is not really connected.

I have sleep configuration like this:

wiced_sleep_configure(

    &(wiced_sleep_config_t) {

        .sleep_mode                   = WICED_SLEEP_MODE_TRANSPORT,

        .device_wake_gpio_num         = WICED_P28,

        .device_wake_mode             = WICED_SLEEP_WAKE_ACTIVE_HIGH,

        .device_wake_source           = WICED_SLEEP_WAKE_SOURCE_GPIO,

        .host_wake_mode               = WICED_SLEEP_WAKE_ACTIVE_HIGH,

        .sleep_permit_handler         = m_shutdown_handler,

    }

);

And sleep handler like this:

static uint32_t m_shutdown_handler(wiced_sleep_poll_type_t type)

{

    uint32_t ret = WICED_SLEEP_NOT_ALLOWED;

    switch(type) {

    case WICED_SLEEP_POLL_SLEEP_PERMISSION:

        if(module_.state == SHUTDOWN_ACTION_ID_ENABLE) {

            WICED_BT_TRACE("SP\r\n");

            ret = WICED_SLEEP_ALLOWED_WITH_SHUTDOWN;

        }

        break;

    case WICED_SLEEP_POLL_TIME_TO_SLEEP:

        ret = 0;

        if(module_.state == SHUTDOWN_ACTION_ID_ENABLE) {

            ret = WICED_SLEEP_MAX_TIME_TO_SLEEP;

            WICED_BT_TRACE("ST\r\n");

        }

        break;

    }

    return ret;

}

Once sleep permission is enabled. I can see in the logs registered sleep_permit_handler is getting called. It looks like device goes into SDS mode but immediately device gets reset. Is there anything missing here in the sleep configuration. Or there is any other way to configure SDS sleep for embedded environment where host is not really connected ?

0 Likes
1 Solution
Charles_Lai
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 sign-ins

Hi,

Could you try to update WICED BTSDK to v2.8.0 in ModusToolbox 2.1 and try again? See the instructions below:

Update wiced_btsdk to v2.8.0 in ModusToolbox

Also, please note that, the device will always be reset after waking from SDS. See the quote and the link below:

After waking from SDS, the application will start from the beginning using a fast boot. In the SDS mode, a single Bluetooth task with no data activity, such as an ACL connection, BLE connection, or BLE advertisement can be maintained. If there is data activity during these tasks, the system will undergo a fast boot and the normal BCS will be called.

https://www.cypress.com/design-guides/cyw20706-cyw20735-and-cyw20719-low-power-modes

So you might want to check the BLE activities or the wakeup source activities.

Best regards

View solution in original post

0 Likes
2 Replies
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

Is the device still advertising? If yes, it will wake up when advertising starts.

Did you pull the wake up pin to low?

0 Likes
Charles_Lai
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 sign-ins

Hi,

Could you try to update WICED BTSDK to v2.8.0 in ModusToolbox 2.1 and try again? See the instructions below:

Update wiced_btsdk to v2.8.0 in ModusToolbox

Also, please note that, the device will always be reset after waking from SDS. See the quote and the link below:

After waking from SDS, the application will start from the beginning using a fast boot. In the SDS mode, a single Bluetooth task with no data activity, such as an ACL connection, BLE connection, or BLE advertisement can be maintained. If there is data activity during these tasks, the system will undergo a fast boot and the normal BCS will be called.

https://www.cypress.com/design-guides/cyw20706-cyw20735-and-cyw20719-low-power-modes

So you might want to check the BLE activities or the wakeup source activities.

Best regards

0 Likes