54H20 A random transmission error occurs when sending usb data

Hello, there is a problem with 54H20 usb communication;
sdk version: v2.7.99-cs1
Background description: Based on nrf_desktop(path: v2.7.99-cs1\nrf\applications\nrf_desktop), modify the report descriptor to user-defined (path: v2.7.99-cs1\nrf\applications\nrf_desktop\configuration\common\hid_report_desc.c)
const uint8_t hid_report_desc[] = { 
0x06, 0x00, 0xFF,/* Usage Page (Vendor Defined 0xFF00)*/\ 
0x09, 0x01,/* Usage (0x01)*/\ 
0xA1, 0x01,/* Collection (Application)*/\ 
0x09, 0x02,/* Usage (0x02)*/\ 
0x15, 0x00,/* Logical Minimum (0)*/\ 
0x26, 0xFF, 0x00,/* Logical Maximum (255)*/\ 
0x75, 0x08,/* Report Size (8)*/\ 
0x95, 0x40,/* Report Count (64)*/\ 
0x81, 0x02,/* Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)*/\ 
0x09, 0x03,/* Usage (0x03)*/\ 
0x15, 0x00,/* Logical Minimum (0)*/\
0x26, 0xFF, 0x00,/* Logical Maximum (255)*/\ 
0x75, 0x08,/* Report Size (8)*/\ 
0x95, 0x40,/* Report Count (64)*/\ 
0x91, 0x02,/* Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)*/\ 
0xC0,/* End Collection*/ 
};
54H20 Receiving usb data interface:
void (*output_report)(const struct device *dev, const uint16_t len,
                  const uint8_t *const buf);
54H20 Send usb data port:
int hid_device_submit_report(const struct device *dev,
                 const uint16_t size, const uint8_t *const report)
Description: 54H20 When sending usb data, a data transfer error similar to the following occurs at random. I checked that the data is correct before calling the hid_device_submit_report sending function.
54H20 Indicates the data packet sent(bushound captured):
06 00 01 00  1d 02 03 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  ................................   87us    102663.1.0
00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00  00 00 54 c7  ..............................T.           102663.1.32
Error packet detected by busHound on pc(bushound captured):
11 00 01 00 00 02 02 00 36 00 00 dc 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........6....................... 524us 102664.1.0
00 00 00 00 28 48 01 2f 00 00 00 00 d5 a0 0a 0e 14 98 01 2f 0b b0 0d 0e f8 c4 0a 0e 00 92 00 41 ....(H./.........../...........A 102664.1.32
Thanks.
  • Hi Hung :
    Recently I downloaded the sdk v2.8.0 compilation and download are OK, based on v2.8.0 test usb communication:
    1, the nrf desktop and the application usb communication error, error message: "usbd hid: Failed to allocate net_buf", locate the code location is: v2.8.0\zephyr\subsys\usb\device_next\class\usbd_hid.c
    Error calling “hid_buf_alloc_ext” in the “hid_dev_submit_report” function ;
    2,hid-mouse (path:\v2.8.0\zephyr\samples\subsys\usb\hid-mouse) and application communication OK。
    3, we have noticed that the nrf desktop uses the usb next library by default, but hid-mouse uses the usb legacy library; So we wanted to switch usb from next to legacy in the nrf desktop: (C:\ncs\v2.8.0\nrf\applications\nrf_desktop\configuration\nrf54h20dk_nrf54h20_cpuapp\prj.conf)
    CONFIG_DESKTOP_USB_STACK_NEXT=n;
    Why does the compilation fail after modification?
Related