The Python BLE IRQ handler will most likely run on the NimBLE task, so its C stack must be large enough to accommodate reasonably complicated Python code (eg a few call depths). So increase this stack size. Also increase the headroom from 1024 to 2048 bytes. This is needed because (1) the esp32 architecture uses a fair amount of stack in general; and (2) by the time execution gets to setting the Python stack top via `mp_stack_set_top()` in this interlock code, about 600 bytes of stack are already used, which reduces the amount available for Python. Fixes issue #12349. Signed-off-by: Damien George <damien@micropython.org>
21 lines
703 B
Plaintext
21 lines
703 B
Plaintext
CONFIG_BT_NIMBLE_LOG_LEVEL_ERROR=y
|
|
CONFIG_BT_ENABLED=y
|
|
CONFIG_BT_NIMBLE_ENABLED=y
|
|
CONFIG_BT_CONTROLLER_ENABLED=y
|
|
|
|
CONFIG_BT_NIMBLE_SVC_GAP_DEVICE_NAME="MPY ESP32"
|
|
|
|
CONFIG_BT_NIMBLE_MAX_CONNECTIONS=4
|
|
|
|
# Put NimBLE on core 1, and for synchronisation
|
|
# with the ringbuffer and scheduler MP needs to be on the same core.
|
|
# MP on core 1 prevents interference with WiFi for time sensitive operations.
|
|
# Only on: ESP32, ESP32S2, ESP32S3
|
|
CONFIG_BT_NIMBLE_PINNED_TO_CORE_0=n
|
|
CONFIG_BT_NIMBLE_PINNED_TO_CORE_1=y
|
|
CONFIG_BT_NIMBLE_PINNED_TO_CORE=1
|
|
|
|
# Increase NimBLE task stack size from the default, because Python code
|
|
# (BLE IRQ handlers) will most likely run on this task.
|
|
CONFIG_BT_NIMBLE_TASK_STACK_SIZE=6144
|