Skip to main content
PMera.1
Associate III
Jan 22, 2020 1:02 PM UTC
Question

[STM32WB55] BLE + HID?

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!

This topic has been closed for replies.

15 replies

Stecklo
Senior
Jan 23, 2020 7:52 AM UTC

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

PMera.1
PMera.1Author
Associate III
Jan 23, 2020 9:27 AM UTC

USB hid.

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

PMera.1
PMera.1Author
Associate III
Jan 23, 2020 10:51 AM UTC

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
Jan 23, 2020 10:56 AM UTC

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

PMera.1
PMera.1Author
Associate III
Jan 23, 2020 11:52 AM UTC

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
Jan 24, 2020 3:50 PM UTC

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

PMera.1
PMera.1Author
Associate III
Jan 24, 2020 10:01 PM UTC

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

Stecklo
Senior
Jan 29, 2020 1:00 PM UTC

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
PMera.1Author
Associate III
Feb 2, 2020 1:19 PM UTC

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...

Stecklo
Senior
Feb 18, 2020 6:13 AM UTC

I'm still confused. What is this "last part of the transparent app" is? Do you mean tm.c file?

I expect to see ACI_GAP_SET_DISCOVERABLE() call, if application is entering advertising state. But I can't find it.

Shubham Trivedi
Associate III
Apr 17, 2020 3:47 PM UTC

I am also facing the same problem. My configuration is as given below.

FUS Version: 1.0.1
STM32CubeMX Version: 5.6.1
STM32Cube_FW_WB_Version: 1.5.0
stm32wb5x_BLE_Stack_full_fw.bin Version: 1.5.0

I configured Nucleo-WB55 board to scan the nearest beacons and send this information over USB port. USB port is configured in CDC mode. USB port will work only if LL_PWR_EnableBootC2( ) in hw_ippc.c is comments out. Otherwise USB device will not functional. I will be ready to share more information if required. Looking for solution for this problem. Thank you