4 Replies Latest reply on Feb 12, 2020 1:52 AM by AnjanaM_61

    Murata 1LD power consumption/Sleep

    DaRa_4056336

      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

        • 1. Re: Murata 1LD power consumption/Sleep
          AnjanaM_61

          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

          2 of 2 people found this helpful
          • 2. Re: Murata 1LD power consumption/Sleep
            DaRa_4056336

            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 ?

            • 3. Re: Murata 1LD power consumption/Sleep
              DaRa_4056336

              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

              2 of 2 people found this helpful
              • 4. Re: Murata 1LD power consumption/Sleep
                AnjanaM_61

                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

                1 of 1 people found this helpful