cancel
Showing results for 
Search instead for 
Did you mean: 

ModusToolbox Bluetooth SDK

Contributor II

I am trying to implement sleep to reduce battery usages and I have written the below lines. But there is no effect on the current consumption on multimeter (7.1mA). Could you please guide me where I am wrong?

APPLICATION_START()

{

    wiced_transport_init( &transport_cfg );

    wiced_set_debug_uart( WICED_ROUTE_DEBUG_TO_PUART );

     wiced_hal_puart_select_uart_pads( WICED_PUART_RXD, WICED_PUART_TXD, 0, 0);

        wiced_hal_puart_set_baudrate(115200);

        logd("**** App Start **** \n\r");

    wiced_result_t state = wiced_hal_i2c_init(1);

              wiced_hal_i2c_set_speed(I2CM_SPEED_100KHZ);

              wiced_bt_app_start_timer(0,1, app_timeout, NULL);

            logd("****After timer. **** \n\r");

wiced_sleep_config( WICED_TRUE, NULL, NULL ); I have tried to pass NULL here but I am getting error message "incompatible type for argument 2 & 3 of 'wiced_sleep_config'"

          wiced_sleep_config( WICED_TRUE, WICED_WAKE_GPIO_ACTIVE_LOW, WICED_WAKE_GPIO_ACTIVE_LOW );

          wiced_power_save_start(WICED_WAKE_SOURCE_ALL,10000);

}

Thanks and regards,

Neeraj

0 Likes
Reply
1 Solution
Moderator
Moderator

Hi,

I only tested wiced_sleep_config() working on v2.1.0 before. It seems that wiced_power_save_register_approve_cback() remains unavailable on v2.1.0.

Then I think all you can do for now is switching to WICED Studio 6.2. The two functions are both tested available on WICED Studio 6.2. But please keep in mind that the APIs can still be malfunctioning, though available.

Best regards

View solution in original post

6 Replies
Contributor II

Hello

I found this google translated link. I am having the same problem, which indicates that there is some version problem.

I have followed this link for low power.

Also why wiced_power_save_register_approve_cback(LPB_power_save_approve_callback); is undefined reference. In example code itself?

Please do let me know where I am wrong?

Thanks in advance.

Regards,

Neeraj

0 Likes
Reply
Moderator
Moderator

Hi,

I guest you are using WICED Studio 6.4?

If it's true, please consider rolling back to use WICED Studio 6.2, or ModusToolbox.

Best regards

0 Likes
Reply
Contributor II

Hello,

I am using Modustoolbox Version:  2.1.0. Is there any alternate option for Modustoolbox? or shall try only on WICED Studio 6.2?

Is there any option by rolling back to wiced_btsdk? If yes, which version?

Thanks and regards,

Neeraj

0 Likes
Reply
Moderator
Moderator

Hi,

This solution could be useful to you, and it doesn't require you to switch back to WICED Studio.

I found that rolling back 20706A2's baselib to v2.1.0 may solve this issue. To do this, follow the steps below:

  1. Right-click on "wiced_btsdk\dev-kit\baselib\20706A2", and choose "Team >> Reset..." in the pop-up menu.
    pastedImage_1.png
  2. Choose "release-v2.1.0" in Tags, and change Reset Type to "Hard". Then click "Reset" button to reset.
    pastedImage_2.png

Now you have version v2.1.0 of 20706A2. And it will allow you to use function wiced_sleep_config() and wiced_power_save_register_approve_cback().

Kindly note that:

  1. This solution only solves the "undefined reference" issue.
  2. Only v2.1.0 is tested. You may try other versions that are older than v2.7.1.
  3. Though the document tells that the 2nd and 3rd params of wiced_sleep_config() should be NULL, It still requires you to use type wiced_wake_gpio_mode_t in this solution.
  4. The version of baselib and the whole wiced_btsdk can mismatch. So you don't have to rollback the entire directory of wiced_btsdk. But be cautious of doing so.
  5. Rolling back the baselib only is minimum. If it can't fix the problem, try to rollback "wiced_btsdk\dev-kit\\bsp\TARGET_CYBT-343026-EVAL" also.
  6. The application framework of CYW20706 is changing, in order to be better merged to ModusToolbox. So some APIs can be edited or deprecated during this period. And this issue may be related to it.

Best regards

0 Likes
Reply
Contributor II

Hi ChunleiL_51​,

Thanks for your reply.

I have tried the solution given by you but it is not working.

pastedImage_0.png

Is there any other solution?

Thanks and regards,

Neeraj

0 Likes
Reply
Moderator
Moderator

Hi,

I only tested wiced_sleep_config() working on v2.1.0 before. It seems that wiced_power_save_register_approve_cback() remains unavailable on v2.1.0.

Then I think all you can do for now is switching to WICED Studio 6.2. The two functions are both tested available on WICED Studio 6.2. But please keep in mind that the APIs can still be malfunctioning, though available.

Best regards

View solution in original post