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

hyu7000
Posts: 12
Joined: Fri Oct 07, 2022 6:20 am

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

Postby hyu7000 » Thu Oct 27, 2022 12:56 am

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.

chegewara
Posts: 2306
Joined: Wed Jun 14, 2017 9:00 pm

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

Postby chegewara » 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.

hyu7000
Posts: 12
Joined: Fri Oct 07, 2022 6:20 am

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

Postby hyu7000 » Mon Oct 31, 2022 6:47 am

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.

hyu7000
Posts: 12
Joined: Fri Oct 07, 2022 6:20 am

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

Postby hyu7000 » Fri Nov 04, 2022 4:54 am

althorgh it change 80mhz, now it's show me error again...

Who is online

Users browsing this forum: No registered users and 61 guests