diff options
| author | Jim Mussared | 2019-10-14 23:40:04 +1100 |
|---|---|---|
| committer | Damien George | 2019-10-15 17:22:15 +1100 |
| commit | 4b2b05718a5b07a4cdf678fbe1005162b1e043ca (patch) | |
| tree | f370a556374c85435b45a2df7b2bb187e2080b54 | |
| parent | 423e67d0a000bb2379f0c2f2a93989bfa17157e0 (diff) | |
esp32: Run NimBLE on the app core.
This prevents issues with concurrent access to the ringbuf.
MICROPY_BEGIN_ATOMIC_SECTION is only atomic to the same core. We could
address this with a mutex, but it's also not safe to call mp_sched_schedule
across cores.
| -rw-r--r-- | ports/esp32/boards/sdkconfig.ble | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ports/esp32/boards/sdkconfig.ble b/ports/esp32/boards/sdkconfig.ble index 2c7c97b61..15422903c 100644 --- a/ports/esp32/boards/sdkconfig.ble +++ b/ports/esp32/boards/sdkconfig.ble @@ -3,5 +3,12 @@ CONFIG_BT_ENABLED=y CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY= CONFIG_BTDM_CTRL_MODE_BTDM= + CONFIG_BT_NIMBLE_ENABLED=y + CONFIG_BT_NIMBLE_MAX_CONNECTIONS=4 + +# Pin to the same core as MP. +CONFIG_BT_NIMBLE_PINNED_TO_CORE_0=n +CONFIG_BT_NIMBLE_PINNED_TO_CORE_1=y +CONFIG_BT_NIMBLE_PINNED_TO_CORE=1 |
