Cyw20719b2 sleep config

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
anje_2248446
Level 3
Level 3
25 sign-ins 10 replies posted 10 questions asked

Hello @DheerajPK_41 

I had posted a questions a few months back here: https://community.cypress.com/t5/ModusToolbox-Bluetooth-SDK/Device-wake-gpio-and-gpio-irq-with-the-s...

In that post you posted a answer saying if host is not in connection and want device to go to sleep we should select WICED_SLEEP_MODE_NO_TRANSPORT as sleep mode.

anje_2248446_0-1631630094783.png

So, I just wanted to clarify, We are having a standalone application and host wake pin is not connected to anything. So we have to use WICED_SLEEP_MODE_NO_TRANSPORT as sleep mode or is it possible to use WICED_SLEEP_MODE_TRANSPORT as sleep mode even though host is not in the picture ? If yes can you point out to any example with such scenario ?

anje_2248446_1-1631630191051.png

Thanks,

Aniket Jesu

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
anje_2248446
Level 3
Level 3
25 sign-ins 10 replies posted 10 questions asked

Hello @Owen_Zhang123 

I got the SDS sleep and wake with gpio button press working, also I have added the RTC configuration for coldboot and fastboot to verify the RTC time is retained after wake up from SDS sleep.

I have attached the working code here, in case if anyone needs it. As it is difficult to find working examples.

View solution in original post

0 Likes
5 Replies
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

The HOST_WAKE is an output pin to wakeup the host device. 

You need to use WICED_SLEEP_MODE_NO_TRANSPORT if don't have a host device.

0 Likes
lock attach
Attachments are accessible only for community members.

Thanks @Owen_Zhang123 for the reply. I tried the WICED_SLEEP_MODE_NO_TRANSPORT. Device seems to go to sleep mode (as sleep permit handler stops getting called once the permissions are allowed WICED_SLEEP_ALLOWED_WITH_SHUTDOWN and WICED_SLEEP_MAX_TIME_TO_SLEEP) and device seems to wake up once the gpio interrupt is called with button press.

But I did not see device reboot after wake up (not a cold boot nor a fast boot), can you please clarify after device wake up will there be a reboot for sure if it enters SDS mode? OR the device enters only in PDS mode when WICED_SLEEP_MODE_NO_TRANSPORT is configured as sleep mode  so there is no reboot observed ?

Update: Now I have added the sleep config to throughput example, with this I can see the device goes to sleep (I think SDS mode) but the device wakes up immediately from the sleep (without gpio button press) and reboots also I can see a fast boot in the logs.

Can you please help out to figure out what is happening here ?

Log:


********** BLUETOOTH LE THROUGHPUT MEASUREMENT : SERVER DEVICE **********
WICED_SLEEP_FAST_BOOT
Advertising......

Code attached here.

Thanks,

aniket

0 Likes
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

The device can come out of SDS mode due to Bluetooth activity, timer expiration, or an LHL interrupt.

In your configuration file app_bt_cfg.c, the advertising duration is set to 0 which means infinite. The device might be wake up by the adv event.

Please refer to the following AN for the sleep mode: https://www.cypress.com/file/415986/download

0 Likes
lock attach
Attachments are accessible only for community members.
anje_2248446
Level 3
Level 3
25 sign-ins 10 replies posted 10 questions asked

Hello @Owen_Zhang123 

I got the SDS sleep and wake with gpio button press working, also I have added the RTC configuration for coldboot and fastboot to verify the RTC time is retained after wake up from SDS sleep.

I have attached the working code here, in case if anyone needs it. As it is difficult to find working examples.

0 Likes
anje_2248446
Level 3
Level 3
25 sign-ins 10 replies posted 10 questions asked

Hello @Owen_Zhang123 ,

So, I'm able to put the device in SDS sleep mode with WICED_SLEEP_MODE_NO_TRANSPORT as sleep mode, also wake with gpio pin works fine.

I have thread which uses a queue, the queue is initialized using wiced_rtos_create_queue() and wiced_rtos_init_queue() apis.

When sleep permit handler allows permission to sleep, device goes to SDS sleep if thread does not create and init the queue. But when queue is created and init is done device does not go to SDS sleep.

I tried to find if any api to free / deinit / delete the queue, but could not find it here:

https://infineon.github.io/btsdk-docs/BT-SDK/20721-B2_Bluetooth/API/group__queues.html#ga5a1885df28a...

Can you please help, to fix the issue ?

thanks,

Aniket Jesu

0 Likes