cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Studio Wi-Fi Combo

DaRa_4056336
New Contributor II

Hi,

I am using Murata 1LD and thinking what is the best way to lower power consumption during ble advertising ( also how to do that ).

I am using wiced 6.4 with murata 1LD 6.4 platform files.

My project is base serial gatt with additional 2 tasks that I created that do some stuff and go to sleep

    while(1)

    {

       expected_data_size = COMMANDS_BUFFER_SIZE;

       /* get incoming data size - if as expected - recieve data */

       wifi_bufferSize = wiced_uart_get_recieve_buffer_size(WIFI_UART);

       if(wifi_bufferSize >= expected_data_size )

       {

           .. code

       }

       wiced_rtos_delay_milliseconds(100);

    }// end while

How can I put device to sleep and still advertise and when ble connected to exit sleep mode ?

Any Ideas?

Thanks!

David

0 Likes
1 Solution
AnjanaM_61
Moderator
Moderator

Hi David,

Please refer to API wiced_bt_dev_set_low_power_mode.

You may refer to the snip/bluetooth/ble_hello_sensor/ble_hello_sensor.c for usage. This API is sufficient to let the device enter low power mode.

Please check if this will help your requirement.

Thanks,

Anjana

View solution in original post

4 Replies
AnjanaM_61
Moderator
Moderator

Hi David,

Please refer to API wiced_bt_dev_set_low_power_mode.

You may refer to the snip/bluetooth/ble_hello_sensor/ble_hello_sensor.c for usage. This API is sufficient to let the device enter low power mode.

Please check if this will help your requirement.

Thanks,

Anjana

View solution in original post

DaRa_4056336
New Contributor II

Thanks!

It really helped.

Another questions

1. What is the best way to turn off Wifi & BT chip ?

for WIfi - host_platform_power_wifi(WICED_FALSE); - it turned off the wifi power pin (WWD_PIN_POWER)

How can I turn off Bluetooth ? I tried to use WICED_BT_PIN_POWER but it is not working...

2. I tried to turn everything off by lowering rst pin but it still consume 2mA . is there a better way ?

0 Likes
DaRa_4056336
New Contributor II

If some need it - if you want to turn off 1LD withou power consumption use this code:

          wiced_bt_start_advertisements( BTM_BLE_ADVERT_OFF, 0, NULL );

          RTC_DeInit();

          __disable_irq();

          wiced_bt_stack_deinit();

          wiced_deinit();

          platform_gpio_output_low( &m_BT_PowerPin );

          platform_gpio_output_low( &m_Wifi_PowerPin );

          /* Select Standby mode */

          PWR->CR |= PWR_CR_PDDS;

          /* Set SLEEPDEEP bit of Cortex System Control Register */

          SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;

          __WFI();

Reset or wake up pins turns it ON

AnjanaM_61
Moderator
Moderator

HI David,

You are correct.

There is no direct API for turning OFF wifi & BT .

Rather you can stop advertisement or connection on BT side to ensure there is no BT activity. And deactivate other necessary components.

Regards,
Anjana