Skip to content

BLE HOGP host stack overflow #2268

@Slion

Description

@Slion

SDK 2.1.0 + develop branch
Boards: Pico 2 W and Pico W
btstack mode: I mostly use poll but I could also repro the issue with background mode

When trying to pair with HOGP from my app to a BLE TrackPoint Keyboard II I get a driver crash.
Though it works fine when pairing to that same device from the hog_host_demo.
My app can pair, connect and use a BLE HOGP Logitech LIFT mouse just fine.

It hits that line from crt0.S:

decl_isr_bkpt isr_hardfault

Here is the callstack:

isr_hardfault@0x10000114 (s:\Dev\Project\lib\pico-sdk\src\rp2_common\pico_crt0\crt0.S:170)
<signal handler called>@0xffffffe9 (Unknown Source:0)
??@0x00000000 (Unknown Source:0)
cyw43_write_reg_u8@0x1002e288 (s:\Dev\Project\lib\pico-sdk\src\rp2_common\pico_cyw43_driver\cyw43_bus_pio_spi.c:485)
??@0x00000000 (Unknown Source:0)

Here is a btstack-dev mailing list thread about it:
https://groups.google.com/g/btstack-dev/c/F-59UnNlvGE

Steps to reproduce

Use that hog_host_demo and enable stack guards by adding add_compile_definitions(PICO_USE_STACK_GUARDS=1) to cmake and try pairing to a Lenovo TrackPoint Keyboard II.
Not sure if other devices are affected. Not sure if the issue lies with the stack guards feature or is it that the cyw43 driver have some stack overflow issue when pairing with that specific device.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions