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.
Parents
  • Hi Gavin, 
    There is some limitation with the current SDK regarding USB communication with nRF54H. 
    Could you try testing with our usb samples to see if you can reproduce the issue with the samples ? 
    It's easier for us to identify if it's the known issue with USB library for nRF54H on v2.7.x or it's something else. 

  • According to your suggestion, based on the hid-mouse example (path: v2.7.99-cs1\zephyr\samples\subsys\usb\hid-mouse), re-implement the communication with the upper layer app. Test result: passed, no data error occurred in the transmission process. I have noticed that hid-mouse uses the legacy usb library, while nrf_desktop uses the next usb library. Is there still some problems with the next usb library? How do I solve the problem of data transfer error when using the next usb library? thank you

  • Hi Gavin, 
    Thanks for the information. I checked internally but I coulnd't find any report with next usb and nRF54H. 
    We are releasing NCS v2.8.0 in a couple of day. Could you please try testing the nrf desktop again with the new SDK ? You can try with the master branch 2.8.99 now if you want. 

  • Thank you for your reply;
    1, by next usb I mean the usb library in this path \v2.7.99-cs1\zephyr\subsys\usb\device_next\
    2. I tried to test with the latest version of sdk. The latest version I can see in toolchain manager V1.5.3 is V2.8.0-rc2; The compilation is OK, but the following error is displayed when downloading, the same environment, the same operation V2.7.99-cs1 is OK

    $ west flash
    -- west flash: rebuilding
    [0/11] Performing build step for 'nrf_desktop'
    ninja: no work to do.
    [2/11] Performing build step for 'ipc_radio'
    ninja: no work to do.
    [11/11] Generating ../zephyr/dfu_suit.zip
    -- west flash: using runner nrfutil
    Using board 000036410082
    -- runners.nrfutil: Flashing file: C:\ncs\v2.8.0-rc2\nrf\applications\nrf_desktop\build\nrf_desktop\zephyr\uicr_merged.hex
    -- runners.nrfutil: Started
    Error: One or more batch tasks failed:
    - [jlink] Unable to convert json field: RESET_VIA_SECDOM to enum value, code: Argument
    FATAL ERROR: command exited with status 50: nrfutil --json device x-execute-batch --batch-path 'C:\ncs\v2.8.0-rc2\nrf\applications\nrf_desktop\build\nrf_desktop\zephyr\generated_nrfutil_batch.json' --serial-number 36410082

  • Hi Gavin, 

    I know next usb driver, what I meant was that I couldn't find a report about an issue between nRF54H and next usb driver. 


    Please try to update nrfutil. 
    You can call nrfutil.exe upgrade

    If you flash a simple application for example blinky, do you see the same error ? 

Reply Children
  • 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