Skip to content

Commit 3ce7f47

Browse files
committed
Merge branch 'bugfix/fix_ble_recorrect_enable_bug_v5.0' into 'release/v5.0'
fix(ble/controller): Fixed BLE recorrect enable bug and fixed BLE bb isr enable by default (backport v5.0) See merge request espressif/esp-idf!28109
2 parents bdfbb2f + d09adbc commit 3ce7f47

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

components/bt/include/esp32c3/include/esp_bt.h

+14-1
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,21 @@ typedef void (* esp_bt_hci_tl_callback_t) (void *arg, uint8_t status);
144144

145145
#ifdef CONFIG_BT_CTRL_AGC_RECORRECT_EN
146146
#define BT_CTRL_AGC_RECORRECT_EN CONFIG_BT_CTRL_AGC_RECORRECT_EN
147+
// ESP32-S3
148+
#if CONFIG_IDF_TARGET_ESP32S3
149+
#define BT_CTRL_AGC_RECORRECT_NEW 1
150+
#else
151+
//Check if chip target is ESP32-C3 101
152+
#if CONFIG_ESP32C3_REV_MIN_101
153+
#define BT_CTRL_AGC_RECORRECT_NEW 1
154+
#else
155+
#define BT_CTRL_AGC_RECORRECT_NEW 0
156+
#endif // CONFIG_ESP32C3_REV_MIN_101
157+
#endif // CONFIG_IDF_TARGET_ESP32S3
158+
147159
#else
148160
#define BT_CTRL_AGC_RECORRECT_EN 0
161+
#define BT_CTRL_AGC_RECORRECT_NEW 0
149162
#endif
150163

151164
#ifdef CONFIG_BT_CTRL_CODED_AGC_RECORRECT_EN
@@ -175,7 +188,7 @@ typedef void (* esp_bt_hci_tl_callback_t) (void *arg, uint8_t status);
175188
#define BT_BLE_CCA_MODE (0)
176189
#endif
177190

178-
#define AGC_RECORRECT_EN ((BT_CTRL_AGC_RECORRECT_EN << 0) | (BT_CTRL_CODED_AGC_RECORRECT <<1))
191+
#define AGC_RECORRECT_EN ((BT_CTRL_AGC_RECORRECT_EN << 0) | (BT_CTRL_CODED_AGC_RECORRECT <<1) | (BT_CTRL_AGC_RECORRECT_NEW << 2))
179192

180193
#define CFG_MASK_BIT_SCAN_DUPLICATE_OPTION (1<<0)
181194

0 commit comments

Comments
 (0)