10 Replies Latest reply on Oct 8, 2019 7:36 PM by AxLi_1746341 Branched to a new discussion.

    Time issues with mcu powersave enabled

    RoDe_1773541

      I'm running SDK 3.7.0 with the BCM94343WWCD1 platform and when I enable mcu powersaving through wiced_platform_mcu_enable_powersave the system will not keep track of the current time correctly.  Also, wiced_rtos_delay_milliseconds does not work correctly either.  I've attached a small sample application that connects to an AP, sets the time through sntp and just loops printing the current time every 10 seconds.

       

      Some output of the application.  The timestamp on the left is from the computer, and the other time is what the wiced platform is reporting it is.

       

      09:36:58 Obtaining IPv4 address via DHCP

      09:36:58 DHCP CLIENT hostname WICED IP

      09:37:06 IPv4 network ready IP: 192.168.0.140

      09:37:06 Setting IPv6 link-local address

      09:37:09 IPv6 network ready IP: FE80:0000:0000:0000:000A:F7FF:FEF4:D780

      09:38:22 Getting NTP time... Sending global request ... success

      09:38:22 Current time is: 2016-07-26T13:38:22.048248

      09:38:22 Time is: 2016-07-26T13:38:22.052248Z

      09:38:33 Time is: 2016-07-26T13:38:32.055248Z

      09:38:43 Time is: 2016-07-26T13:38:42.060248Z

      09:38:50 Time is: 2016-07-26T13:39:26.036464Z <- 7 seconds passed, time skipped 44 seconds forward

      09:39:00 Time is: 2016-07-26T13:39:36.039464Z

      09:39:10 Time is: 2016-07-26T13:39:46.043464Z

      09:39:20 Time is: 2016-07-26T13:39:56.047464Z

      09:39:30 Time is: 2016-07-26T13:40:06.049464Z

      09:39:41 Time is: 2016-07-26T13:40:16.051464Z

      09:39:51 Time is: 2016-07-26T13:40:26.049464Z

      09:40:01 Time is: 2016-07-26T13:40:36.050464Z

      09:40:04 Time is: 2016-07-26T13:41:16.056928Z <-- 3 seconds passed, time skipped 40 seconds

      09:40:14 Time is: 2016-07-26T13:41:26.058928Z

      09:40:19 Time is: 2016-07-26T13:42:07.001392Z <-- 5 seconds passed, time skipped 41 seconds

      09:40:29 Time is: 2016-07-26T13:42:17.006392Z

      09:40:35 Time is: 2016-07-26T13:43:00.048464Z

       

       

      Thanks,

      -Rob

        • 1. Re: Time issues with mcu powersave enabled
          VikramR_26

          Yes we were able to reproduce, thanks for pointing at this

          We have provided a resolution on SFDC  00275410

          This fix will be incorporated in the next SDK release.

          • 2. Re: Time issues with mcu powersave enabled
            RoDe_1773541

            What is SFDC 00275410?

             

            -Rob

             

            • 3. Re: Time issues with mcu powersave enabled
              MichaelF_56

              Internal case for engineering.

               

              VikramR_26 ankr_1205151

              • 4. Re: Time issues with mcu powersave enabled
                RoDe_1773541

                I'm not sure if I should be working with my Avnet contact directly, but the patch that was provided doesn't work.

                The system *thinks* that 10 seconds has passed, but it hasn't and that causes the clock to drift several seconds per minute.

                 

                 

                2:00:40 Getting NTP time... Sending global request ... success

                12:00:40 Current time is: 2016-07-27T16:00:40.029712

                12:00:40 Time is set

                12:00:40 Time is: 2016-07-27T16:00:40.034712Z <-- Time is accurate

                12:00:50 Time is: 2016-07-27T16:00:50.039712Z

                12:00:59 Time is: 2016-07-27T16:01:00.043712Z <-- Off by 1 second

                12:01:08 Time is: 2016-07-27T16:01:10.046712Z <-- Off by 2 seconds

                12:01:18 Time is: 2016-07-27T16:01:20.051712Z <-- Off by 2 seconds

                12:01:27 Time is: 2016-07-27T16:01:30.056712Z <-- Off by 3 seconds

                12:01:37 Time is: 2016-07-27T16:01:40.061712Z <-- Off by 3 seconds

                12:01:46 Time is: 2016-07-27T16:01:50.001176Z <-- Off by 4 seconds

                12:01:56 Time is: 2016-07-27T16:02:00.005176Z <-- Off by 4 seconds

                12:02:05 Time is: 2016-07-27T16:02:10.006176Z <-- Off by 5 seconds

                 

                -Rob

                • 5. Re: Time issues with mcu powersave enabled
                  VikramR_26

                  Which serial port application you are using ? WicedSerial ?

                  As per my observation using BCM94343WWCD1 hardware

                   

                  [Wed Jul 27 06:56:55.888 2016]

                  [Wed Jul 27 06:56:55.888 2016] Starting WICED v3.7.0

                  [Wed Jul 27 06:56:55.888 2016] Platform BCM94343WWCD1 initialised

                  [Wed Jul 27 06:56:55.888 2016] Started ThreadX v5.6

                  [Wed Jul 27 06:56:55.888 2016] Initialising NetX_Duo v5.7_sp2

                  [Wed Jul 27 06:56:55.902 2016] Creating Packet pools

                  [Wed Jul 27 06:56:57.598 2016] WWD SDIO interface initialised

                  [Wed Jul 27 06:56:57.614 2016] WLAN MAC Address : 02:0A:F7:46:2F:31

                  [Wed Jul 27 06:56:57.630 2016] WLAN Firmware : wl0: Jun 19 2016 22:40:09 version 7.45.45.17 (r644353) FWID 01-dbaba83

                  [Wed Jul 27 06:56:57.645 2016] Joining : Ninja

                  [Wed Jul 27 06:57:00.396 2016] Successfully joined : Ninja

                  [Wed Jul 27 06:57:00.412 2016] Obtaining IPv4 address via DHCP

                  [Wed Jul 27 06:57:00.428 2016] DHCP CLIENT hostname WICED IP

                  [Wed Jul 27 06:57:02.236 2016] IPv4 network ready IP: 192.168.1.29

                  [Wed Jul 27 06:57:02.252 2016] Setting IPv6 link-local address

                  [Wed Jul 27 06:57:04.763 2016] IPv6 network ready IP: FE80:0000:0000:0000:000A:F7FF:FE46:2F31

                  [Wed Jul 27 06:57:57.597 2016] Getting NTP time... Sending global request ... success

                  [Wed Jul 27 06:57:57.613 2016] Current time is: 2016-07-27T13:58:00.035464

                  [Wed Jul 27 06:58:07.049 2016] Time is: 2016-07-27T13:58:10.040464Z

                  [Wed Jul 27 06:58:15.959 2016] Time is: 2016-07-27T13:58:20.045464Z

                  [Wed Jul 27 06:58:24.996 2016] Time is: 2016-07-27T13:58:30.050464Z

                  [Wed Jul 27 06:58:34.306 2016] Time is: 2016-07-27T13:58:40.055464Z

                  [Wed Jul 27 06:58:43.697 2016] Time is: 2016-07-27T13:58:50.060464Z

                  [Wed Jul 27 06:58:52.689 2016] Time is: 2016-07-27T13:59:00.065464Z

                  [Wed Jul 27 06:59:02.128 2016] Time is: 2016-07-27T13:59:10.002928Z

                  [Wed Jul 27 06:59:11.037 2016] Time is: 2016-07-27T13:59:20.005928Z

                  [Wed Jul 27 06:59:19.946 2016] Time is: 2016-07-27T13:59:30.009928Z

                  [Wed Jul 27 06:59:28.952 2016] Time is: 2016-07-27T13:59:40.014928Z

                  [Wed Jul 27 06:59:38.518 2016] Time is: 2016-07-27T13:59:50.019928Z

                  [Wed Jul 27 06:59:48.179 2016] Time is: 2016-07-27T14:00:00.023928Z

                  [Wed Jul 27 06:59:57.951 2016] Time is: 2016-07-27T14:00:10.028928Z

                  [Wed Jul 27 07:00:07.022 2016] Time is: 2016-07-27T14:00:20.033928Z

                  [Wed Jul 27 07:00:15.836 2016] Time is: 2016-07-27T14:00:30.037928Z

                  [Wed Jul 27 07:00:24.970 2016] Time is: 2016-07-27T14:00:40.041928Z

                  [Wed Jul 27 07:00:34.167 2016] Time is: 2016-07-27T14:00:50.046928Z

                  [Wed Jul 27 07:00:44.003 2016] Time is: 2016-07-27T14:01:00.051928Z

                  [Wed Jul 27 07:00:53.379 2016] Time is: 2016-07-27T14:01:10.056928Z

                  [Wed Jul 27 07:01:03.102 2016] Time is: 2016-07-27T14:01:20.061928Z

                  [Wed Jul 27 07:01:12.141 2016] Time is: 2016-07-27T14:01:30.001392Z

                  [Wed Jul 27 07:01:20.957 2016] Time is: 2016-07-27T14:01:40.004392Z

                  [Wed Jul 27 07:01:29.882 2016] Time is: 2016-07-27T14:01:50.007392Z

                  [Wed Jul 27 07:01:39.416 2016] Time is: 2016-07-27T14:02:00.012392Z

                  [Wed Jul 27 07:01:48.949 2016] Time is: 2016-07-27T14:02:10.017392Z

                  [Wed Jul 27 07:01:58.689 2016] Time is: 2016-07-27T14:02:20.022392Z

                  [Wed Jul 27 07:02:07.922 2016] Time is: 2016-07-27T14:02:30.027392Z

                  [Wed Jul 27 07:02:16.639 2016] Time is: 2016-07-27T14:02:40.032392Z

                  [Wed Jul 27 07:02:25.567 2016] Time is: 2016-07-27T14:02:50.036392Z

                  [Wed Jul 27 07:02:34.586 2016] Time is: 2016-07-27T14:03:00.040392Z

                  [Wed Jul 27 07:02:44.314 2016] Time is: 2016-07-27T14:03:10.043392Z

                  [Wed Jul 27 07:02:54.153 2016] Time is: 2016-07-27T14:03:20.047392Z

                  [Wed Jul 27 07:03:03.572 2016] Time is: 2016-07-27T14:03:30.052392Z

                  [Wed Jul 27 07:03:12.611 2016] Time is: 2016-07-27T14:03:40.057392Z

                  [Wed Jul 27 07:03:21.634 2016] Time is: 2016-07-27T14:03:50.062392Z

                  [Wed Jul 27 07:03:30.464 2016] Time is: 2016-07-27T14:04:00.000856Z

                  [Wed Jul 27 07:03:40.097 2016] Time is: 2016-07-27T14:04:10.004856Z

                  [Wed Jul 27 07:03:49.806 2016] Time is: 2016-07-27T14:04:20.008856Z

                  [Wed Jul 27 07:03:59.740 2016] Time is: 2016-07-27T14:04:30.013856Z

                  [Wed Jul 27 07:04:08.925 2016] Time is: 2016-07-27T14:04:40.018856Z

                  [Wed Jul 27 07:04:17.851 2016] Time is: 2016-07-27T14:04:50.023856Z

                  [Wed Jul 27 07:04:26.472 2016] Time is: 2016-07-27T14:05:00.028856Z

                  [Wed Jul 27 07:04:35.978 2016] Time is: 2016-07-27T14:05:10.031856Z

                  [Wed Jul 27 07:04:45.753 2016] Time is: 2016-07-27T14:05:20.035856Z

                  [Wed Jul 27 07:04:55.172 2016] Time is: 2016-07-27T14:05:30.036856Z

                  [Wed Jul 27 07:05:04.711 2016] Time is: 2016-07-27T14:05:40.041856Z

                  [Wed Jul 27 07:05:13.381 2016] Time is: 2016-07-27T14:05:50.045856Z

                  [Wed Jul 27 07:05:22.260 2016] Time is: 2016-07-27T14:06:00.050856Z

                  [Wed Jul 27 07:05:31.377 2016] Time is: 2016-07-27T14:06:10.055856Z

                  [Wed Jul 27 07:05:40.992 2016] Time is: 2016-07-27T14:06:20.060856Z

                  [Wed Jul 27 07:05:50.751 2016] Time is: 2016-07-27T14:06:30.064856Z

                  [Wed Jul 27 07:06:00.572 2016] Time is: 2016-07-27T14:06:40.002320Z

                  [Wed Jul 27 07:06:09.610 2016] Time is: 2016-07-27T14:06:50.007320Z

                  [Wed Jul 27 07:06:18.635 2016] Time is: 2016-07-27T14:07:00.012320Z

                  [Wed Jul 27 07:06:27.578 2016] Time is: 2016-07-27T14:07:10.017320Z

                  [Wed Jul 27 07:06:37.095 2016] Time is: 2016-07-27T14:07:20.022320Z

                  [Wed Jul 27 07:06:46.742 2016] Time is: 2016-07-27T14:07:30.027320Z

                  [Wed Jul 27 07:06:56.547 2016] Time is: 2016-07-27T14:07:40.031320Z

                  [Wed Jul 27 07:07:05.828 2016] Time is: 2016-07-27T14:07:50.035320Z

                  [Wed Jul 27 07:07:14.851 2016] Time is: 2016-07-27T14:08:00.040320Z

                  [Wed Jul 27 07:07:24.082 2016] Time is: 2016-07-27T14:08:10.045320Z

                  [Wed Jul 27 07:07:33.186 2016] Time is: 2016-07-27T14:08:20.050320Z

                  [Wed Jul 27 07:07:42.847 2016] Time is: 2016-07-27T14:08:30.055320Z

                  [Wed Jul 27 07:07:52.495 2016] Time is: 2016-07-27T14:08:40.059320Z

                  [Wed Jul 27 07:08:01.916 2016] Time is: 2016-07-27T14:08:50.062320Z

                  [Wed Jul 27 07:08:10.939 2016] Time is: 2016-07-27T14:09:00.062320Z

                  [Wed Jul 27 07:08:19.800 2016] Time is: 2016-07-27T14:09:10.001784Z

                  [Wed Jul 27 07:08:28.824 2016] Time is: 2016-07-27T14:09:20.006784Z

                  [Wed Jul 27 07:08:38.567 2016] Time is: 2016-07-27T14:09:30.010784Z

                  [Wed Jul 27 07:08:47.973 2016] Time is: 2016-07-27T14:09:40.015784Z

                  [Wed Jul 27 07:08:57.836 2016] Time is: 2016-07-27T14:09:50.020784Z

                  [Wed Jul 27 07:09:07.025 2016] Time is: 2016-07-27T14:10:00.025784Z

                  [Wed Jul 27 07:09:16.273 2016] Time is: 2016-07-27T14:10:10.029784Z

                  [Wed Jul 27 07:09:25.201 2016] Time is: 2016-07-27T14:10:20.034784Z

                  [Wed Jul 27 07:09:34.319 2016] Time is: 2016-07-27T14:10:30.039784Z

                  [Wed Jul 27 07:09:43.855 2016] Time is: 2016-07-27T14:10:40.044784Z

                  [Wed Jul 27 07:09:53.580 2016] Time is: 2016-07-27T14:10:50.048784Z

                  [Wed Jul 27 07:10:03.339 2016] Time is: 2016-07-27T14:11:00.053784Z

                  [Wed Jul 27 07:10:12.378 2016] Time is: 2016-07-27T14:11:10.057784Z

                  [Wed Jul 27 07:10:21.224 2016] Time is: 2016-07-27T14:11:20.061784Z

                  [Wed Jul 27 07:10:30.183 2016] Time is: 2016-07-27T14:11:30.001248Z

                  [Wed Jul 27 07:10:39.637 2016] Time is: 2016-07-27T14:11:40.006248Z

                  [Wed Jul 27 07:10:49.346 2016] Time is: 2016-07-27T14:11:50.011248Z

                  [Wed Jul 27 07:10:59.011 2016] Time is: 2016-07-27T14:12:00.016248Z

                  [Wed Jul 27 07:11:08.240 2016] Time is: 2016-07-27T14:12:10.021248Z

                  [Wed Jul 27 07:11:17.184 2016] Time is: 2016-07-27T14:12:20.025248Z

                  [Wed Jul 27 07:11:26.127 2016] Time is: 2016-07-27T14:12:30.029248Z

                  [Wed Jul 27 07:11:35.390 2016] Time is: 2016-07-27T14:12:40.034248Z

                  [Wed Jul 27 07:11:45.227 2016] Time is: 2016-07-27T14:12:50.039248Z

                  [Wed Jul 27 07:11:54.715 2016] Time is: 2016-07-27T14:13:00.044248Z

                  [Wed Jul 27 07:12:04.440 2016] Time is: 2016-07-27T14:13:10.049248Z

                  [Wed Jul 27 07:12:13.577 2016] Time is: 2016-07-27T14:13:20.053248Z

                  [Wed Jul 27 07:12:22.470 2016] Time is: 2016-07-27T14:13:30.055248Z

                  [Wed Jul 27 07:12:31.447 2016] Time is: 2016-07-27T14:13:40.058248Z

                  [Wed Jul 27 07:12:41.174 2016] Time is: 2016-07-27T14:13:50.062248Z

                  [Wed Jul 27 07:12:50.997 2016] Time is: 2016-07-27T14:14:00.000712Z

                  [Wed Jul 27 07:13:00.630 2016] Time is: 2016-07-27T14:14:10.004712Z

                  • 6. Re: Time issues with mcu powersave enabled
                    RoDe_1773541

                    I'm using miniterm.py and piping the output through readline and prepending the time to each line

                     

                    But I see the same issue in your output

                     

                    [Wed Jul 27 06:57:57.613 2016] Current time is: 2016-07-27T13:58:00.035464

                    [Wed Jul 27 06:58:07.049 2016] Time is: 2016-07-27T13:58:10.040464Z <-- three seconds fast

                    ...

                    [Wed Jul 27 07:13:00.630 2016] Time is: 2016-07-27T14:14:10.004712Z <-- 1 minute 10 seconds fast

                     

                    -Rob

                    • 7. Re: Time issues with mcu powersave enabled
                      VikramR_26

                      I mis understood for the timer to be not being accurate during sleep. But you are comparing the present system time with the UTC time ?

                      Well then the UART printing out the logs is not a good example to verify

                      Since if you see between successive log there is a 10 sec gap , thats what I looked for

                      Wed Jul 27 06:58:07.049 2016] Time is: 2016-07-27T13:58:10.040464Z

                      [Wed Jul 27 06:58:15.959 2016] Time is: 2016-07-27T13:58:20.045464Z

                      [Wed Jul 27 06:58:24.996 2016] Time is: 2016-07-27T13:58:30.050464Z

                      [Wed Jul 27 06:58:34.306 2016] Time is: 2016-07-27T13:58:40.055464Z

                      [Wed Jul 27 06:58:43.697 2016] Time is: 2016-07-27T13:58:50.060464Z

                      [Wed Jul 27 06:58:52.689 2016] Time is: 2016-07-27T13:59:00.065464Z

                      [Wed Jul 27 06:59:02.128 2016] Time is: 2016-07-27T13:59:10.002928Z

                      [Wed Jul 27 06:59:11.037 2016] Time is: 2016-07-27T13:59:20.005928Z

                      [Wed Jul 27 06:59:19.946 2016] Time is: 2016-07-27T13:59:30.009928Z

                      [Wed Jul 27 06:59:28.952 2016] Time is: 2016-07-27T13:59:40.014928Z

                      [Wed Jul 27 06:59:38.518 2016] Time is: 2016-07-27T13:59:50.019928Z

                      [Wed Jul 27 06:59:48.179 2016] Time is: 2016-07-27T14:00:00.023928Z

                      [Wed Jul 27 06:59:57.951 2016] Time is: 2016-07-27T14:00:10.028928Z

                      [Wed Jul 27 07:00:07.022 2016] Time is: 2016-07-27T14:00:20.033928Z

                      [Wed Jul 27 07:00:15.836 2016] Time is: 2016-07-27T14:00:30.037928Z

                      [Wed Jul 27 07:00:24.970 2016] Time is: 2016-07-27T14:00:40.041928Z

                      [Wed Jul 27 07:00:34.167 2016] Time is: 2016-07-27T14:00:50.046928Z

                      [Wed Jul 27 07:00:44.003 2016] Time is: 2016-07-27T14:01:00.051928Z

                      [Wed Jul 27 07:00:53.379 2016] Time is: 2016-07-27T14:01:10.056928Z

                      [Wed Jul 27 07:01:03.102 2016] Time is: 2016-07-27T14:01:20.061928Z

                      [Wed Jul 27 07:01:12.141 2016] Time is: 2016-07-27T14:01:30.001392Z

                      [Wed Jul 27 07:01:20.957 2016] Time is: 2016-07-27T14:01:40.004392Z

                      [Wed Jul 27 07:01:29.882 2016] Time is: 2016-07-27T14:01:50.007392Z

                      [Wed Jul 27 07:01:39.416 2016] Time is: 2016-07-27T14:02:00.012392Z

                      [Wed Jul 27 07:01:48.949 2016] Time is: 2016-07-27T14:02:10.017392Z

                      [Wed Jul 27 07:01:58.689 2016] Time is: 2016-07-27T14:02:20.022392Z

                      [Wed Jul 27 07:02:07.922 2016] Time is: 2016-07-27T14:02:30.027392Z

                      [Wed Jul 27 07:02:16.639 2016] Time is: 2016-07-27T14:02:40.032392Z

                      [Wed Jul 27 07:02:25.567 2016] Time is: 2016-07-27T14:02:50.036392Z

                      [Wed Jul 27 07:02:34.586 2016] Time is: 2016-07-27T14:03:00.040392Z

                      [Wed Jul 27 07:02:44.314 2016] Time is: 2016-07-27T14:03:10.043392Z

                      [Wed Jul 27 07:02:54.153 2016] Time is: 2016-07-27T14:03:20.047392Z

                       

                      But if you compare the Time being printed by UART applications

                      Wed Jul 27 06:58:07.049 2016] Time is: 2016-07-27T13:58:10.040464Z

                      [Wed Jul 27 06:58:15.959 2016] Time is: 2016-07-27T13:58:20.045464Z

                      [Wed Jul 27 06:58:24.996 2016] Time is: 2016-07-27T13:58:30.050464Z

                      [Wed Jul 27 06:58:34.306 2016] Time is: 2016-07-27T13:58:40.055464Z

                      [Wed Jul 27 06:58:43.697 2016] Time is: 2016-07-27T13:58:50.060464Z

                      [Wed Jul 27 06:58:52.689 2016] Time is: 2016-07-27T13:59:00.065464Z

                      [Wed Jul 27 06:59:02.128 2016] Time is: 2016-07-27T13:59:10.002928Z

                      [Wed Jul 27 06:59:11.037 2016] Time is: 2016-07-27T13:59:20.005928Z

                      [Wed Jul 27 06:59:19.946 2016] Time is: 2016-07-27T13:59:30.009928Z

                      [Wed Jul 27 06:59:28.952 2016] Time is: 2016-07-27T13:59:40.014928Z

                      [Wed Jul 27 06:59:38.518 2016] Time is: 2016-07-27T13:59:50.019928Z

                      [Wed Jul 27 06:59:48.179 2016] Time is: 2016-07-27T14:00:00.023928Z

                      [Wed Jul 27 06:59:57.951 2016] Time is: 2016-07-27T14:00:10.028928Z

                      [Wed Jul 27 07:00:07.022 2016] Time is: 2016-07-27T14:00:20.033928Z

                      [Wed Jul 27 07:00:15.836 2016] Time is: 2016-07-27T14:00:30.037928Z

                      [Wed Jul 27 07:00:24.970 2016] Time is: 2016-07-27T14:00:40.041928Z

                      [Wed Jul 27 07:00:34.167 2016] Time is: 2016-07-27T14:00:50.046928Z

                      [Wed Jul 27 07:00:44.003 2016] Time is: 2016-07-27T14:01:00.051928Z

                      [Wed Jul 27 07:00:53.379 2016] Time is: 2016-07-27T14:01:10.056928Z

                      [Wed Jul 27 07:01:03.102 2016] Time is: 2016-07-27T14:01:20.061928Z

                      [Wed Jul 27 07:01:12.141 2016] Time is: 2016-07-27T14:01:30.001392Z

                      [Wed Jul 27 07:01:20.957 2016] Time is: 2016-07-27T14:01:40.004392Z

                      [Wed Jul 27 07:01:29.882 2016] Time is: 2016-07-27T14:01:50.007392Z

                      [Wed Jul 27 07:01:39.416 2016] Time is: 2016-07-27T14:02:00.012392Z

                      [Wed Jul 27 07:01:48.949 2016] Time is: 2016-07-27T14:02:10.017392Z

                      [Wed Jul 27 07:01:58.689 2016] Time is: 2016-07-27T14:02:20.022392Z

                      [Wed Jul 27 07:02:07.922 2016] Time is: 2016-07-27T14:02:30.027392Z

                      [Wed Jul 27 07:02:16.639 2016] Time is: 2016-07-27T14:02:40.032392Z

                      [Wed Jul 27 07:02:25.567 2016] Time is: 2016-07-27T14:02:50.036392Z

                       

                      So you really cannot compare the two in this fashion, we will need an efficient way in order to perform this experiment.

                      1 of 1 people found this helpful
                      • 8. Re: Time issues with mcu powersave enabled
                        RoDe_1773541

                        I was comparing the time printed by the uart application against the time reported by the module.  They should track accurately and they do if you don't enable the mcu power saving.

                         

                        The wiced_rtos_delay_milliseconds doesn't sleep the correct amount of time accurately.

                         

                        I wrote a program to toggle a gpio line every 1000ms.  With power saving enabled the system usually toggles it around 900ms, occasionally it'll be much less.  Here's an example at 840ms.

                        NewFile1.bmp

                         

                        When I disable mcu power saving, the timing is rock solid.

                         

                        NewFile2.bmp

                         

                        And the module time tracks the uart applications time very accurately. You can see the times still match up after around 6 minutes.

                         

                        15:22:59 Time is: 2016-07-27T19:22:59.027000Z

                        15:23:09 Time is: 2016-07-27T19:23:09.030000Z

                        15:23:19 Time is: 2016-07-27T19:23:19.033000Z

                        15:23:29 Time is: 2016-07-27T19:23:29.036000Z

                        15:23:39 Time is: 2016-07-27T19:23:39.039000Z

                        ...

                        15:28:39 Time is: 2016-07-27T19:28:39.064464Z

                        15:28:49 Time is: 2016-07-27T19:28:49.001928Z

                        15:28:59 Time is: 2016-07-27T19:28:59.004928Z

                        15:29:09 Time is: 2016-07-27T19:29:09.007928Z

                         

                        But when powersave is enabled, the clock drift apart by 19 seconds after about 4 minutes...

                         

                        15:31:56 Time is: 2016-07-27T19:31:56.007392Z <-- Times match up

                        15:32:05 Time is: 2016-07-27T19:32:06.011392Z

                        ...

                        15:36:28 Time is: 2016-07-27T19:36:46.009320Z

                        15:36:37 Time is: 2016-07-27T19:36:56.013320Z <-- Time is off by 19 seconds

                         

                        That amount of drift means that my clock will be off by more than 90 minutes every 24 hours...

                         

                        -Rob

                         

                        • 9. Re: Time issues with mcu powersave enabled
                          RoDe_1773541

                          I updated the test application to add wiced_network_suspend.  Now wiced_rtos_delay_milliseconds(10000) returns randomly...

                           

                          15:42:08 Time is set

                          15:42:08 Time is: 2016-07-27T19:42:08.016928Z

                          15:42:08 Time is: 2016-07-27T19:42:18.020928Z

                          15:42:09 Time is: 2016-07-27T19:42:28.025928Z

                          15:42:11 Time is: 2016-07-27T19:42:38.030928Z

                          15:42:14 Time is: 2016-07-27T19:42:48.035928Z

                          15:42:16 Time is: 2016-07-27T19:42:58.039928Z

                          15:42:17 Time is: 2016-07-27T19:43:08.044928Z

                          15:42:19 Time is: 2016-07-27T19:43:18.048928Z

                          15:42:19 Time is: 2016-07-27T19:43:28.053928Z

                          15:42:20 Time is: 2016-07-27T19:43:38.057928Z

                          15:42:20 Time is: 2016-07-27T19:43:48.062928Z

                          15:42:22 Time is: 2016-07-27T19:43:58.002392Z

                          15:42:23 Time is: 2016-07-27T19:44:08.007392Z

                           

                          -Rob

                          • 10. Re: Time issues with mcu powersave enabled
                            AxLi_1746341

                            RoDe_1773541 wrote:

                             

                            I updated the test application to add wiced_network_suspend.  Now wiced_rtos_delay_milliseconds(10000) returns randomly...

                             

                            Hi RoDe_1773541

                            I'm wondering if this issue is fixed or not? which sdk version fixes the issue?