Page 1 of 1

[esp32 s3] when bluetooth modem sleep enable and try connect, did not connect

Posted: Thu Oct 27, 2022 12:56 am
by hyu7000
hellow

i have a some problem.



my device : esp32 s3 devkit(with esp32-s3-wroom-1)

using example : gatt-server

using ide : vscode with esp-idf





case 1.


using original gatt-server example.

flash and connect ble via app.

when app send any data, esp32 s3 successly receive data.




case 2.

add some code for bluetooth modem sleep to original gatt-server example

Code: Select all

...

#include "esp_err.h"
#include "esp_pm.h"

static esp_pm_config_esp32s3_t pm_config =
{
.max_freq_mhz = 80, // e.g. 80, 160, 240
.min_freq_mhz = 40, // e.g. 40
.light_sleep_enable = true, // enable light sleep
};

...

void app_main(void)
{
...

```
ESP_ERROR_CHECK( esp_pm_configure(&pm_config) );

...

```

}
and setting menuconfig refer to https://github.com/espressif/esp-idf/is ... -500312453

1. Enable Power Management
[*] Support for power management
2. Enable Tickless Idle:
[*] Tickless idle support
(3) Minimum number of ticks to enter sleep mode for (NEW)
(100) Tick rate (Hz)
3. Configure external 32.768Hz crystal as RTC clock source:
RTC clock source (External 32kHz crystal)
4. Enable Bluetooth modem sleep with external 32.768kHz crystal as low power clock:
[*] Bluetooth modem sleep
[*] Bluetooth Modem sleep Mode 1
Bluetooth low power clock (External 32kHz crystal)

and add xtal 32khz to GPIO15, 16 with 12pF capacitor, 5MΩ, 0Ω registor.

so finish setting, i flash and monitor terminal, then i confirmed modem sleep is enable(because of no err msg that xtal 32k is not exist)

but when app send msg data, in terminal, this err is show.

W (11118) BT_HCI: hcif disc complete: hdl 0x1, rsn 0x3e

at this time, app notify "disconnect".



could let me know what did i miss?

Thank you in advance.

Re: [esp32 s3] when bluetooth modem sleep enable and try connect, did not connect

Posted: Sat Oct 29, 2022 1:40 am
by chegewara
Hi,
Im not sure if its the case, or maybe i am wrong, but i believe that CPU min clock for wifi and bluetooth is 80MHz.

Re: [esp32 s3] when bluetooth modem sleep enable and try connect, did not connect

Posted: Mon Oct 31, 2022 6:47 am
by hyu7000
chegewara wrote:
Sat Oct 29, 2022 1:40 am
Hi,
Im not sure if its the case, or maybe i am wrong, but i believe that CPU min clock for wifi and bluetooth is 80MHz.
when min_freq_mhz was changed to 80, esp32 successly receive data.

Thank you sir.

Re: [esp32 s3] when bluetooth modem sleep enable and try connect, did not connect

Posted: Fri Nov 04, 2022 4:54 am
by hyu7000
althorgh it change 80mhz, now it's show me error again...