Using current master branch with NUCLEO-F446RE (USB_STM_HAL defined manually), the device hangs with the following code once the report length reaches 61. I am guessing this board is not the only STM32 target that exhibits such behavior.
#include "mbed.h"
#include "USBHID.h"
USBHID hid(64, 64);
HID_REPORT send_report;
DigitalOut l1(LED1);
int main(void) {
int report_length = 0;
l1 = 1;
while (1) {
wait_ms(100);
send_report.length = report_length++;
if (report_length > 64) report_length = 0;
for (uint8_t i = 0; i < send_report.length; i++)
send_report.data[i] = rand() & 0xff;
hid.send(&send_report);
l1 = !l1;
}
}
Same code on LPC1768 works as intended and reaches 64.