6 Replies Latest reply on Apr 23, 2020 5:22 AM by BeOl_4470266

    STM32L4 Wiced Low Power

    BeOl_4470266

      Hello,

       

      I am using Wiced with the STM32L4 MCU, with ThreadX, and I'm looking into the power consumption while waiting for ThreadX events or message queues.

       

      However, looking at Wiced platform files, it seems that the STM32L4 low power modes are not supported, am I understanding right? What would I need to be able to bring the MCU to low power?

       

      Thanks for your help,

      Best regards

        • 1. Re: STM32L4 Wiced Low Power
          MuraliR_36

          Hi

           

          You can refer to the WICED-Powersave-App-Note.pdf under /43xxx_Wi-Fi/doc/ to get more details about power-saving in WICED.

          WICED puts STM32 based processors to stop mode when power saving  is enabled.

           

          Thanks

          1 of 2 people found this helpful
          • 2. Re: STM32L4 Wiced Low Power
            BeOl_4470266

            Hi,

             

            Thanks for your answer.

             

            I am referring to this document which is why I came to ask for further support.

             

            From the powersave app note page 8:

            So my understanding from the documentation is that platform_power_down_hook() is in charge of putting the system into STOP mode and returning the elapsed time in ticks to the RTOS.

             

            However here is what I found in the STM32L4 platform files:

             

            Which is why I was asking if I was understanding properly that the STM32L4 power save mode isn't supported by Wiced.

             

            Can you confirm?

             

            Also, my understanding is that I should edit this function to:

            1. Stop the tick

            2. Configure the RTC to trigger an interrupt after sleep_ms.

            3. Put the system into the power saving mode wanted

            4. An interrupt occurs, either from the RTC or from another peripheral

            5. Retrieve the time elapsed from the RTC

            6. Start the tick again

            7. Return the number of ticks elapsed during sleep

             

            Is that correct?

             

            Thanks,

            Best regards

            • 3. Re: STM32L4 Wiced Low Power
              MuraliR_36

              Hi

               

              I checked internally and looks like the power save mode for stm32l4 wasn't ported completely and needs to be done. Thus power save for STM32L4 isn't supported.

              Also, yes, if you modify the functions as mentioned, you should be able to add power save support to STM32L4 based processors.

               

              Thanks

              1 of 1 people found this helpful
              • 4. Re: STM32L4 Wiced Low Power
                BeOl_4470266

                Hi,

                 

                Thanks for coming back to me.

                 

                I've started implementing the low power functions and I noticed that most of the time, the sleep_ms would be 1000ms. My application is very simple: it waits for a ThreadX event that never comes. I would expect the sleep_ms parameter given that the only thread I have running is on a wait forever.

                 

                Is there another thread in the system that would need to be woken up every 1000ms?

                 

                Best regards

                • 5. Re: STM32L4 Wiced Low Power
                  MuraliR_36

                  Hi BeOl_4470266 

                   

                  Sorry for the late response. No, there won't be any other thread that would need to be woken up periodically if its not required by the application.

                   

                  Thanks

                  • 6. Re: STM32L4 Wiced Low Power
                    BeOl_4470266

                    Hi,

                     

                    This is incorrect, here is what I've found in case somebody else needs actual support:

                     

                    The 1000ms are linked to the STDIO log outputs: the RTOS waits up to 1000ms for the DMA transfer to finish, which is why it tries to go idle for this duration.

                     

                    There is another thread configured by default by Cypress that would need to be woken up periodically: the watchdog thread.