cancel
Showing results for 
Search instead for 
Did you mean: 

[STM32WB55] BLE + HID?

PMera.1
Associate II

When generating a new project (cubemx 5.5.0) that includes HID and BLE.

I rebuilt the sample apps provided by STM for each of these features and they work OK. However I have no clue as to how to combine the two (most probably because I'm setting the clocks wrong).

I'd appreciate any kind of assistance regarding Clock configuration (I'm transitioning from Arduino, so I'm somewhat overwhelmed by the complexity).

Thank you!

15 REPLIES 15
Stecklo
Senior

Do you mean USB-HID or BLE-HID? Because I have problems combining USB and BLE now

PMera.1
Associate II

USB hid.

I'm trying to configure the dongle to work as a hid device, with a separate BLE layer.

PMera.1
Associate II

Thing is... usb works just fine, until APPE_Init.

I've tracked the issue down to

LL_PWR_EnableBootC2( ) in hw_ippc.c

As soon as that's called, the hid device is broken and I receive a 43 error code from windows.

Code is generated with Cube MX 5.5.0 (untouched).

Stecklo
Senior

Same thing. I've noticed also that USB driver keeps thowing "ESOF" error interrupt (Expected Start Of Frame). So I think the problem is timing concurrency between BLE and USB

Should you happen upon a fortuitous solution, kindly let me reap the benefits of said serendipity, m'lord.

If I happen to find a workaround, will post here.

Stecklo
Senior

I think I'll actually end up disabling BLE upon USB connection. This should work fine for my design

PMera.1
Associate II

A good starting point would be the transparent mode app... it opens a com port and advertises at the same time.

Stecklo
Senior

I've just had a look at this transparent mode app. This application does not advertise and support USB simultaneously, if I'm getting it right. USB is working as it supposed to do. But BLE commands are sent one by one, as they are received via USB. So there are no timing issues causing ESOF and other problems

PMera.1
Associate II

Not so. I replaced the VCP part with HID and it works perfectly.

If you look at the last part of the transparent app, you can begin advertise while the COM port is active so...