Skip to main content
PMera.1
Associate III
January 22, 2020
Question

[STM32WB55] BLE + HID?

  • January 22, 2020
  • 14 replies
  • 3818 views

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.

14 replies

Stecklo
Senior
January 23, 2020

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

PMera.1
PMera.1Author
Associate III
January 23, 2020

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
January 23, 2020

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
January 23, 2020

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
January 23, 2020

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
January 24, 2020

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
January 24, 2020

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

Stecklo
Senior
January 29, 2020

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
February 2, 2020

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
February 18, 2020

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
April 17, 2020

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