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

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

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

Postby hyu7000 » Wed Oct 26, 2022 5:30 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 link(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.

Who is online

Users browsing this forum: No registered users and 112 guests