How to configure cybt-423028-02 module in deep sleep mode

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

cross mob
ns_4270701
Level 3
Level 3
10 replies posted 10 questions asked 5 replies posted

Development environment:

Windows 8.1 pro

Platform: CYBT-423028-02

IDE: Wiced Studio 6.2.1

Schematic-cybt-423028-02.png

Since we are not controlling bt module through any host, We had left the "Host_wake" pin unconnected.

Share step by step procedure document. Suggest what to configure for sleep parameters.

Our requirement:

We want to configure device in SDS mode.

The device should wake only on bluetooth connection request reception, once the connection breaks it should back in sleep mode until next bluetooth activity.

0 Likes
1 Solution
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi ,

CYBT-423028-02 contains CYW20719 as the base chip.

Please go through our low power guidelines doc here: https://www.cypress.com/design-guides/cyw20706-cyw20735-and-cyw20719-low-power-modes

After reading the doc , you can refer to low_power_sensor demo example available in WICED SDK ( /20719-B1_Bluetooth/apps/demo/low_power_sensor )

Thanks & Regards,

Anjana

View solution in original post

3 Replies
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi ,

CYBT-423028-02 contains CYW20719 as the base chip.

Please go through our low power guidelines doc here: https://www.cypress.com/design-guides/cyw20706-cyw20735-and-cyw20719-low-power-modes

After reading the doc , you can refer to low_power_sensor demo example available in WICED SDK ( /20719-B1_Bluetooth/apps/demo/low_power_sensor )

Thanks & Regards,

Anjana

Thank you AnjanaM_61 for your respose,

  We already try that and we observed 3mA with BT advertisement. But not sure that module goes in sleep mode or not.

What we configured is as below. And we had configured for SDS mode.

    /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

    /*++++++++++++++++++++++++++++ configure to sleep if device is idle ++++++++++++++++++++++++*/

    /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

    /*|*/BA_sleep_config.sleep_mode = WICED_SLEEP_MODE_NO_TRANSPORT;

    /*|*/

    /*|*/BA_sleep_config.sleep_permit_handler = BA_sleep_handler;

    /*|*/

    /*|*/result = wiced_sleep_configure(&BA_sleep_config);

    /*|*/

    /*|*/WICED_BT_TRACE("\n sleep config result: =  %d \n", result);

    /*|*/

    /*|*/if (wiced_sleep_get_boot_mode() == WICED_SLEEP_COLD_BOOT)

    /*|*/{

        /*|*/BA_boot_mode = WICED_SLEEP_COLD_BOOT;

        /*|*/WICED_BT_TRACE("\n Hello cold Start \n");

        /*|*/}

    /*|*/else

    /*|*/{

        /*|*/BA_boot_mode = WICED_SLEEP_FAST_BOOT;

        /*|*/WICED_BT_TRACE("\n Hello warm Start \n");

        /*|*/}

}

uint32_t BA_sleep_handler(wiced_sleep_poll_type_t type) {

    uint32_t ret = WICED_SLEEP_NOT_ALLOWED;

 

    WICED_BT_TRACE(". Sleep Handler .");

    switch (type) {

         case WICED_SLEEP_POLL_SLEEP_PERMISSION:

             if (BA_state.application_state == BA_DEVICE_IDLE) {

             #ifdef ENABLE_SDS_SLEEP

             ret = WICED_SLEEP_ALLOWED_WITH_SHUTDOWN;

             WICED_BT_TRACE("$");

             WICED_BT_TRACE(" \nWICED_SLEEP_ALLOWED_WITH_SHUTDOWN\n  ");

            #endif

           }

        break;

         case WICED_SLEEP_POLL_TIME_TO_SLEEP:

             if (BA_state.application_state != BA_DEVICE_IDLE) {

             ret = WICED_SLEEP_NOT_ALLOWED;

             WICED_BT_TRACE( " \n POLL TIME TO SLEEP ret value here is: zero \n  ");

          }

         else {

            ret = WICED_SLEEP_MAX_TIME_TO_SLEEP;

         }

         break;

     }

    return ret;

}

void testble_conn_idle_timer_handler(uint32_t data) {

    WICED_BT_TRACE("Module idle. \n");

    BA_state.application_state = BA_DEVICE_IDLE;

}

    /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/  /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

Our queries are :

1. We are not using the HOST_WAKE key, we had left the key open. so how do we config to wake the module.

2. And sleep event from call back function executed only once, even though we tried to execute it on every time out event.

0 Likes

Hi ns_4270701 ,

You can try add any other GPIO pin as wake up source.

Can you please try add GPIO as wake up source and try ?

For example -  hello_sensor_sleep_config.device_wake_gpio_num   = WICED_Pxx;

hello_sensor_sleep_config.device_wake_mode       = WICED_SLEEP_WAKE_ACTIVE_HIGH;

hello_sensor_sleep_config.device_wake_source     = WICED_SLEEP_WAKE_SOURCE_GPIO;

If you are still facing issue with entering SDS mode, please provide the app.

Regards,
Anjana

0 Likes