cancel
Showing results for 
Search instead for 
Did you mean: 

Wi-Fi Combo

RoDe_1773541
Contributor

I'm having issues with timing when I enable mcu powersave (wiced_platform_mcu_enable_powersave).  I've attached a small program to demonstrates the issue.

The program just prints out the timestamp once a minute.  When mcp powersave is disabled, the timing is very consistent.  When enabled, the interval and the internal time-tracking are messed up.

Example output with each line timestamped:

Thu Apr 28 14:33:18 2016:  Starting WICED

...

Thu Apr 28 14:33:42 2016:  Enable MCU powersave

Thu Apr 28 14:33:42 2016:  Create thread and timed event

Thu Apr 28 14:33:42 2016:  Running

Thu Apr 28 14:34:20 2016:  Time: 1970-01-01T00:02:19.043568 <-- Should be one minute intervals

Thu Apr 28 14:34:30 2016:  Time: 1970-01-01T00:03:49.029000 <-- Printed 10 seconds later. Module thinks one minute 30 seconds has passed

Thu Apr 28 14:35:13 2016:  Time: 1970-01-01T00:05:50.042392

Thu Apr 28 14:35:55 2016:  Time: 1970-01-01T00:07:50.030248

Thu Apr 28 14:36:36 2016:  Time: 1970-01-01T00:09:49.057640

Thu Apr 28 14:37:17 2016:  Time: 1970-01-01T00:11:48.003000

Thu Apr 28 14:38:06 2016:  Time: 1970-01-01T00:13:55.058392

Without mcu powersave enabled:

Thu Apr 28 15:02:36 2016:  Starting WICED

...

Thu Apr 28 15:03:00 2016:  Create thread and timed event

Thu Apr 28 15:03:00 2016:  Running

Thu Apr 28 15:04:00 2016:  Time: 1970-01-01T00:01:23.057712

Thu Apr 28 15:05:00 2016:  Time: 1970-01-01T00:02:23.057712

Thu Apr 28 15:06:00 2016:  Time: 1970-01-01T00:03:23.057712

Thu Apr 28 15:07:00 2016:  Time: 1970-01-01T00:04:23.057712

Thu Apr 28 15:08:00 2016:  Time: 1970-01-01T00:05:23.057712

Thu Apr 28 15:09:00 2016:  Time: 1970-01-01T00:06:23.057712

Thu Apr 28 15:10:00 2016:  Time: 1970-01-01T00:07:23.057712

Thu Apr 28 15:11:00 2016:  Time: 1970-01-01T00:08:23.057712

Thu Apr 28 15:12:00 2016:  Time: 1970-01-01T00:09:23.057712

Thu Apr 28 15:13:00 2016:  Time: 1970-01-01T00:10:23.057712

Thu Apr 28 15:14:00 2016:  Time: 1970-01-01T00:11:23.057712

I'm running WICED SDK 3.5.2 with the Avnet BCM4343W IoT module. Compiled with snip.mcu_powersave-BCM94343W_AVN download run.  Anyone have any idea what's wrong?

Thanks,

-Rob

0 Likes
12 Replies
VikramR_26
Employee

Is this similar to the question asked Time broken when mcu powersave enabled ?

0 Likes
RoDe_1773541
Contributor

This is the same problem as the other one.

0 Likes
MichaelF_56
Moderator
Moderator

Per the other discussion, we were able to reproduce the problem internally.

We have provided a resolution within SFDC  00275410. Your point of Contact at Avnet has access to the case and can share with you.

This fix will be incorporated in the next SDK release.

andrew997vik86

0 Likes
AxLi_1746341
Honored Contributor

mwf_mmfae wrote:

Per the other discussion, we were able to reproduce the problem internally.

We have provided a resolution within SFDC  00275410. You point of Contact at Avnet has access to the case and can share with you.

This fix will be incorporated in the next SDK release.

andrew997 vik86

Hi mwf_mmfae​,

For the issues reported on the forum you should post the fix on the forum rather

than provide the SFDC code. So people can test you fix.

e.g. I also want to verify this issue but I cannot find SFDC 00275410.

People can test it before next release.

There is no good reason to wait until next SDK release if you already have the

fix available. If you don't post the fix and there is other issue with your fix,

people need to wait another round of next release which is not good.

Axel

RoDe_1773541
Contributor

I tested the fix they posted and it still doesn't work correctly.  I have a simple test case.  All it does it flash the led at one second intervals.  You'll notice that the interval isn't even close to correct... 

void application_start(void) {

  wiced_init();

  wiced_network_up(WICED_STA_INTERFACE, WICED_USE_EXTERNAL_DHCP_SERVER, NULL);

  wiced_network_suspend();

  wiced_platform_mcu_enable_powersave();

  wiced_gpio_init(WICED_LED1, OUTPUT_PUSH_PULL);

  while (1) {

    wiced_rtos_delay_milliseconds(1000);

    wiced_gpio_output_high(WICED_LED1);

    wiced_rtos_delay_milliseconds(1000);

    wiced_gpio_output_low(WICED_LED1);

  }

}

It's important that the device be connected to a wifi network for to test to fail.  Also, if the ping the interface the flashing becomes more erratic. 

-Rob

0 Likes
AxLi_1746341
Honored Contributor

mwf_mmfae wrote:

Per the other discussion, we were able to reproduce the problem internally.

We have provided a resolution within SFDC  00275410. Your point of Contact at Avnet has access to the case and can share with you.

This fix will be incorporated in the next SDK release.

andrew997 vik86

Which SDK version fixes this issue?

0 Likes
AxLi_1746341
Honored Contributor

mifo wrote:

Per the other discussion, we were able to reproduce the problem internally.

We have provided a resolution within SFDC  00275410. Your point of Contact at Avnet has access to the case and can share with you.

This fix will be incorporated in the next SDK release.

user_305201620 vikr

mifo

Can you elaborate a bit about this issue?

What is the root cause and what the fix does?

According to the feedback by rderr_1773541 in this thread, the issue is *not* fixed.

Actually, I try to verify this on sdk-6.2, but it's even worsen.

The uart output garbage so I even cannot verify it.

0 Likes
MichaelF_56
Moderator
Moderator

This was two years ago, so I'm not sure.  If you are affected by this issue, please create a new thread and we will have someone on the applications team take a look

0 Likes
AxLi_1746341
Honored Contributor

I don't see the point of creating a new thread as it will be exactly the same as this one.

You can download the mcp_powersave.zip in first post of this thread to snip folder.

Then e.g. build with ./make snip.mcu_powersave-FreeRTOS-LwIP-BCM94343WWCD2 download download_apps run

It's easy to see the problem.

0 Likes
PeFe_666001
New Contributor II

This was addressed in the forum posting on the Avnet site::
http://cloudconnectkits.org/forum/topic/wiced-studio-50-support-ble-powersave

Two issues required correction:

1) Use the latest platform files, located at:

https://github.com/CloudConnectKits/WICED-STUDIO-6.x_Platform_Files 

2) Add the following to your application .mk file:

#ENABLE_APP_POWERSAVE macro is also enabled for BCM94343_AVN platform (Avnet BCM4343W IoT Starter Kit)

ifeq ($(PLATFORM), BCM94343W_AVN)

ENABLE_APP_POWERSAVE := 1

GLOBAL_DEFINES += ENABLE_APP_POWERSAVE

endif

MichaelF_56
Moderator
Moderator

Thanks Peter.

0 Likes
AxLi_1746341
Honored Contributor

mifo

I don't get further response, any update?

I'm sure Peter's reply is nothing to do with this issue because it's related to ble powersave.

Anyone from cypress can test the mcp_powersave.zip in first post of this thread and report if you can reproduce the issue?

0 Likes