当前文档版本为 v0.9.1,您可以访问当前页面的 开发中 版本以获取最近可能的更新。

Subsys: USB HID Mouse

1 功能概述

usb hid mouse sample演示了Zephyr USB HID MOUSE在PAN1080 SoC上的使用方法,主要包括:

  • USB识别为鼠标设备

  • 定时单次上报鼠标数据完成移动鼠标操作

2 环境准备

  • pan108xxb5_evb (LQFP封装、1MB Flash、64 Pin)

  • Type-C USB线两条

    1. 用于供电和查看串口打印Log

    2. 用于连接usb端口与PC,输出数据模拟usb鼠标通信

  • 硬件接线:

    • 将EVB板上的P02,P03通过跳线帽与USB DM和USB DP相连

  • PC软件: 串口调试助手(UartAssist)或终端工具(SecureCRT),波特率921600

3 编译和烧录

例程位置:zephyr\samples_panchip\subsys\usb\hid_mouse

使用 ZAL 工具可以对其进行编译、烧录、打开 VS Code 调试等操作。关于 ZAL 工具的详细介绍请参考:Zephyr APP Launcher 工具介绍

4 演示说明

**步骤1:**上电初始化USB HID设备描述符

先不连接usb到PC,下载程序后复位,首先输出LOG如下

[00:00:00.000,000] <dbg> usb_hid.usb_hid_device_init: Init HID Device: dev 0x7760 (HID_0)
[00:00:00.001,000] <dbg> usb_descriptor.usb_get_device_descriptor: __usb_descriptor_start 0x200000e4
[00:00:00.003,000] <dbg> usb_descriptor.usb_get_device_descriptor: __usb_descriptor_end 0x20000180
[00:00:00.004,000] <dbg> usb_descriptor.usb_fix_descriptor: Configuration descriptor 0x200000f6
[00:00:00.005,000] <dbg> usb_descriptor.usb_fix_descriptor: Interface descriptor 0x200000ff
[00:00:00.006,000] <dbg> usb_hid.hid_interface_config:
[00:00:00.007,000] <dbg> usb_descriptor.usb_fix_descriptor: Endpoint descriptor 0x20000111
[00:00:00.009,000] <dbg> usb_dc_panchip.usb_dc_ep_check_cap: ep 81, mps 16, type 3
[00:00:00.010,000] <dbg> usb_descriptor.usb_validate_ep_cfg_data: Fixing EP address 80 -> 81
[00:00:00.011,000] <dbg> usb_descriptor.usb_validate_ep_cfg_data: endpoint 0x81
[00:00:00.013,000] <dbg> usb_descriptor.usb_fix_descriptor: Now the wTotalLength is 34
[00:00:00.014,000] <dbg> usb_descriptor.ascii7_to_utf16le: idx_max 13, ascii_idx_max 6, buf 0x2000011e
[00:00:00.015,000] <dbg> usb_descriptor.ascii7_to_utf16le: char p : 70, idx 6 -> 13
[00:00:00.016,000] <dbg> usb_descriptor.ascii7_to_utf16le: char i : 69, idx 5 -> 11
[00:00:00.018,000] <dbg> usb_descriptor.ascii7_to_utf16le: char h : 68, idx 4 -> 9
[00:00:00.019,000] <dbg> usb_descriptor.ascii7_to_utf16le: char c : 63, idx 3 -> 7
[00:00:00.020,000] <dbg> usb_descriptor.ascii7_to_utf16le: char n : 6e, idx 2 -> 5
[00:00:00.021,000] <dbg> usb_descriptor.ascii7_to_utf16le: char a : 61, idx 1 -> 3
[00:00:00.023,000] <dbg> usb_descriptor.ascii7_to_utf16le: char P : 50, idx 0 -> 1
[00:00:00.024,000] <dbg> usb_descriptor.ascii7_to_utf16le: idx_max 45, ascii_idx_max 22, buf 0x2000012e
[00:00:00.025,000] <dbg> usb_descriptor.ascii7_to_utf16le: char e : 65, idx 22 -> 45
[00:00:00.027,000] <dbg> usb_descriptor.ascii7_to_utf16le: char l : 6c, idx 21 -> 43
[00:00:00.028,000] <dbg> usb_descriptor.ascii7_to_utf16le: char p : 70, idx 20 -> 41
[00:00:00.029,000] <dbg> usb_descriptor.ascii7_to_utf16le: char m : 6d, idx 19 -> 39
[00:00:00.031,000] <dbg> usb_descriptor.ascii7_to_utf16le: char a : 61, idx 18 -> 37
[00:00:00.032,000] <dbg> usb_descriptor.ascii7_to_utf16le: char s : 73, idx 17 -> 35
[00:00:00.033,000] <dbg> usb_descriptor.ascii7_to_utf16le: char   : 20, idx 16 -> 33
[00:00:00.034,000] <dbg> usb_descriptor.ascii7_to_utf16le: char e : 65, idx 15 -> 31
[00:00:00.036,000] <dbg> usb_descriptor.ascii7_to_utf16le: char s : 73, idx 14 -> 29
[00:00:00.037,000] <dbg> usb_descriptor.ascii7_to_utf16le: char u : 75, idx 13 -> 27
[00:00:00.038,000] <dbg> usb_descriptor.ascii7_to_utf16le: char o : 6f, idx 12 -> 25
[00:00:00.040,000] <dbg> usb_descriptor.ascii7_to_utf16le: char m : 6d, idx 11 -> 23
[00:00:00.041,000] <dbg> usb_descriptor.ascii7_to_utf16le: char   : 20, idx 10 -> 21
[00:00:00.042,000] <dbg> usb_descriptor.ascii7_to_utf16le: char D : 44, idx 9 -> 19
[00:00:00.043,000] <dbg> usb_descriptor.ascii7_to_utf16le: char I : 49, idx 8 -> 17
[00:00:00.045,000] <dbg> usb_descriptor.ascii7_to_utf16le: char H : 48, idx 7 -> 15
[00:00:00.046,000] <dbg> usb_descriptor.ascii7_to_utf16le: char   : 20, idx 6 -> 13
[00:00:00.047,000] <dbg> usb_descriptor.ascii7_to_utf16le: char r : 72, idx 5 -> 11
[00:00:00.049,000] <dbg> usb_descriptor.ascii7_to_utf16le: char y : 79, idx 4 -> 9
[00:00:00.050,000] <dbg> usb_descriptor.ascii7_to_utf16le: char h : 68, idx 3 -> 7
[00:00:00.051,000] <dbg> usb_descriptor.ascii7_to_utf16le: char p : 70, idx 2 -> 5
[00:00:00.052,000] <dbg> usb_descriptor.ascii7_to_utf16le: char e : 65, idx 1 -> 3
[00:00:00.054,000] <dbg> usb_descriptor.ascii7_to_utf16le: char Z : 5a, idx 0 -> 1
[00:00:00.055,000] <dbg> usb_descriptor.ascii7_to_utf16le: idx_max 31, ascii_idx_max 15, buf 0x2000015e
[00:00:00.056,000] <dbg> usb_descriptor.ascii7_to_utf16le: char F : 46, idx 15 -> 31
[00:00:00.058,000] <dbg> usb_descriptor.ascii7_to_utf16le: char E : 45, idx 14 -> 29
[00:00:00.059,000] <dbg> usb_descriptor.ascii7_to_utf16le: char D : 44, idx 13 -> 27
[00:00:00.060,000] <dbg> usb_descriptor.ascii7_to_utf16le: char C : 43, idx 12 -> 25
[00:00:00.061,000] <dbg> usb_descriptor.ascii7_to_utf16le: char B : 42, idx 11 -> 23
[00:00:00.063,000] <dbg> usb_descriptor.ascii7_to_utf16le: char A : 41, idx 10 -> 21
[00:00:00.064,000] <dbg> usb_descriptor.ascii7_to_utf16le: char 9 : 39, idx 9 -> 19
[00:00:00.065,000] <dbg> usb_descriptor.ascii7_to_utf16le: char 8 : 38, idx 8 -> 17
[00:00:00.067,000] <dbg> usb_descriptor.ascii7_to_utf16le: char 7 : 37, idx 7 -> 15
[00:00:00.068,000] <dbg> usb_descriptor.ascii7_to_utf16le: char 6 : 36, idx 6 -> 13
[00:00:00.069,000] <dbg> usb_descriptor.ascii7_to_utf16le: char 5 : 35, idx 5 -> 11
[00:00:00.070,000] <dbg> usb_descriptor.ascii7_to_utf16le: char 4 : 34, idx 4 -> 9
[00:00:00.072,000] <dbg> usb_descriptor.ascii7_to_utf16le: char 3 : 33, idx 3 -> 7
[00:00:00.073,000] <dbg> usb_descriptor.ascii7_to_utf16le: char 2 : 32, idx 2 -> 5
[00:00:00.074,000] <dbg> usb_descriptor.ascii7_to_utf16le: char 1 : 31, idx 1 -> 3
[00:00:00.075,000] <dbg> usb_descriptor.ascii7_to_utf16le: char 0 : 30, idx 0 -> 1
*** Booting Zephyr OS build zephyr-v2.7.0-471-g07d05fd46729  ***
[00:00:00.077,000] <dbg> usb_hid.usb_hid_register_device: Added dev_data 0x20000550 dev 0x7760 to devlist 0x20000568
[00:00:00.079,000] <dbg> usb_hid.usb_hid_init: Initializing HID Device: dev 0x7760
[00:00:00.080,000] <dbg> usb_hid.usb_set_hid_report_size: if_desc 0x200000ff desc 0x200000ff size 52
[00:00:00.082,000] <dbg> usb_device.usb_enable: lock usb_enable_lock mutex
[00:00:00.083,000] <dbg> usb_dc_panchip.usb_dc_set_status_callback:
[00:00:00.084,000] <dbg> usb_dc_panchip.usb_dc_attach:
[00:00:00.085,000] <inf> usb_dc_panchip: ep_in_reg = 0x0f
[00:00:00.086,000] <inf> usb_dc_panchip: ep_out_reg = 0x0e
[00:00:00.087,000] <dbg> usb_dc_panchip.usb_dc_attach: usb_panchip_init finished

[00:00:00.088,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00000000
[00:00:00.089,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: Plug out
[00:00:00.090,000] <dbg> usb_dc_panchip.usb_dc_ep_configure: 0x00,0x0040,0
[00:00:00.091,000] <dbg> usb_dc_panchip.usb_dc_ep_configure: reg_maxp_div = 8
[00:00:00.093,000] <dbg> usb_dc_panchip.usb_dc_ep_configure: config out ep0
[00:00:00.094,000] <dbg> usb_dc_panchip.usb_dc_ep_configure: 0x80,0x0040,0
[00:00:00.095,000] <dbg> usb_dc_panchip.usb_dc_ep_configure: reg_maxp_div = 8
[00:00:00.096,000] <dbg> usb_dc_panchip.usb_dc_ep_configure: config in ep0
[00:00:00.097,000] <dbg> usb_dc_panchip.usb_dc_ep_set_callback:
[00:00:00.098,000] <dbg> usb_dc_panchip.usb_dc_ep_set_callback:
[00:00:00.099,000] <dbg> usb_device.composite_setup_ep_cb: set cb, ep: 0x81
[00:00:00.101,000] <dbg> usb_dc_panchip.usb_dc_ep_set_callback:
[00:00:00.102,000] <dbg> usb_dc_panchip.usb_dc_ep_enable: ep = 0x00
[00:00:00.103,000] <dbg> usb_dc_panchip.usb_dc_ep_enable: ep = 0x80
[00:00:00.104,000] <dbg> usb_device.usb_enable: unlock usb_enable_lock mutex
usb enable[00:00:05.105,000] <dbg> main.tx_timeout_handler: tx_timeout handler out

5s后输出LOG,由于未插入USB,打印上报失败信息

[00:00:05.106,000] <dbg> main.main: HID write
[00:00:05.107,000] <wrn> usb_hid: Device is not configured
[00:00:05.108,000] <err> main: HID write error, -11

**步骤2:**插入USB并进行设备识别

打开设备管理器,连接usb,串口显示LOG如下,同时设备管理器/鼠标和其他指针设备出现新设备

[00:00:50.242,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00000000
[00:00:50.243,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: Plug in
[00:00:50.369,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00000000
[00:00:50.370,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: RST
[00:00:50.371,000] <dbg> usb_dc_panchip.usb_panchip_handle_reset: USB RESET event
[00:00:50.372,000] <dbg> usb_hid.hid_status_cb: cfg 0x20000180 status 1
[00:00:50.373,000] <inf> usb_hid: Device reset detected
status = 1[00:00:50.416,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00010000
[00:00:50.418,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP0 IN
[00:00:50.419,000] <dbg> usb_dc_panchip.Endpoint0: byCSR0 0x01
[00:00:50.420,000] <dbg> usb_dc_panchip.Endpoint0: ep0 out packet ready
[00:00:50.421,000] <dbg> usb_device.usb_handle_control_transfer: ep 0x00, status 0x00
[00:00:50.422,000] <dbg> usb_dc_panchip.usb_dc_ep_read:
[00:00:50.423,000] <dbg> usb_dc_panchip.usb_dc_ep_read: ep 00, data addr :, max_data_len 8
[00:00:50.425,000] <dbg> usb_dc_panchip.usb_dc_ep_read: bmRT 80 bR 06 wV 0100 wI 0000 wL 0040
[00:00:50.426,000] <dbg> usb_device.custom_handler: bRequest 0x06, wIndex 0x0000
[00:00:50.427,000] <dbg> usb_hid.hid_custom_handle_req: Standard request:bRequest 0x06, bmRequestType 0x80, len 64
[00:00:50.429,000] <dbg> usb_device.usb_get_descriptor: Get Descriptor request
[00:00:50.430,000] <dbg> usb_dc_panchip.usb_dc_ep_write:
[00:00:50.431,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep 0x80, data_len 18
[00:00:50.432,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[0] = 0x12
[00:00:50.434,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[1] = 0x01
[00:00:50.435,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[2] = 0x00
[00:00:50.436,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[3] = 0x02
[00:00:50.437,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[4] = 0x00
[00:00:50.438,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[5] = 0x00
[00:00:50.439,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[6] = 0x00
[00:00:50.440,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[7] = 0x40
[00:00:50.442,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[8] = 0xe4
[00:00:50.443,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[9] = 0x2f
[00:00:50.444,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[10] = 0x07
[00:00:50.445,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[11] = 0x00
[00:00:50.446,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[12] = 0x07
[00:00:50.447,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[13] = 0x02
[00:00:50.449,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[14] = 0x01
[00:00:50.450,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[15] = 0x02
[00:00:50.451,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[16] = 0x03
[00:00:50.452,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[17] = 0x01
[00:00:50.453,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep0 write
[00:00:50.454,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00010000
[00:00:50.456,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP0 IN
[00:00:50.457,000] <dbg> usb_dc_panchip.Endpoint0: byCSR0 0x01
[00:00:50.458,000] <dbg> usb_dc_panchip.Endpoint0: ep0 out packet ready
[00:00:50.459,000] <dbg> usb_device.usb_handle_control_transfer: ep 0x00, status 0x00
[00:00:50.460,000] <dbg> usb_dc_panchip.usb_dc_ep_read:
[00:00:50.461,000] <dbg> usb_dc_panchip.usb_dc_ep_read: ep 00, data addr :, max_data_len 8
[00:00:50.463,000] <dbg> usb_dc_panchip.usb_dc_ep_read: bmRT 12 bR 01 wV 0200 wI 0000 wL 4000
[00:00:50.464,000] <err> usb_device: Request buffer too small
[00:00:50.465,000] <dbg> usb_dc_panchip.usb_dc_ep_set_stall: ep 0x80
[00:00:50.466,000] <dbg> usb_dc_panchip.usb_dc_ep_set_stall: ep 0x00
[00:00:50.468,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00010000
[00:00:50.469,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP0 IN
[00:00:50.470,000] <dbg> usb_dc_panchip.Endpoint0: byCSR0 0x20
[00:00:50.471,000] <dbg> usb_dc_panchip.Endpoint0: ep0 out packet not ready
[00:00:50.480,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00000000
[00:00:50.481,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: RST
[00:00:50.482,000] <dbg> usb_dc_panchip.usb_panchip_handle_reset: USB RESET event
[00:00:50.484,000] <dbg> usb_hid.hid_status_cb: cfg 0x20000180 status 1
[00:00:50.485,000] <inf> usb_hid: Device reset detected
status = 1[00:00:50.529,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00010000
[00:00:50.530,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP0 IN
[00:00:50.531,000] <dbg> usb_dc_panchip.Endpoint0: byCSR0 0x01
[00:00:50.532,000] <dbg> usb_dc_panchip.Endpoint0: ep0 out packet ready
[00:00:50.534,000] <dbg> usb_device.usb_handle_control_transfer: ep 0x00, status 0x00
[00:00:50.535,000] <dbg> usb_dc_panchip.usb_dc_ep_read:
[00:00:50.536,000] <dbg> usb_dc_panchip.usb_dc_ep_read: ep 00, data addr :, max_data_len 8
[00:00:50.537,000] <dbg> usb_dc_panchip.usb_dc_ep_read: bmRT 00 bR 05 wV 0003 wI 0000 wL 0000
[00:00:50.539,000] <dbg> usb_device.custom_handler: bRequest 0x05, wIndex 0x0000
[00:00:50.540,000] <dbg> usb_hid.hid_custom_handle_req: Standard request:bRequest 0x05, bmRequestType 0x00, len 0
[00:00:50.542,000] <dbg> usb_device.usb_handle_std_device_req: Set Address 3 request
[00:00:50.543,000] <dbg> usb_dc_panchip.usb_dc_set_address:
[00:00:50.544,000] <dbg> usb_dc_panchip.usb_dc_ep_write:
[00:00:50.545,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep 0x80, data_len 0
[00:00:50.546,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep0 write
[00:00:50.547,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00010000
[00:00:50.549,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP0 IN
[00:00:50.550,000] <dbg> usb_dc_panchip.Endpoint0: byCSR0 0x00
[00:00:50.551,000] <dbg> usb_dc_panchip.Endpoint0: ep0 out packet not ready
[00:00:50.558,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00010000
[00:00:50.559,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP0 IN
[00:00:50.560,000] <dbg> usb_dc_panchip.Endpoint0: byCSR0 0x01
[00:00:50.561,000] <dbg> usb_dc_panchip.Endpoint0: ep0 out packet ready
[00:00:50.562,000] <dbg> usb_device.usb_handle_control_transfer: ep 0x00, status 0x00
[00:00:50.564,000] <dbg> usb_dc_panchip.usb_dc_ep_read:
[00:00:50.565,000] <dbg> usb_dc_panchip.usb_dc_ep_read: ep 00, data addr :, max_data_len 8
[00:00:50.566,000] <dbg> usb_dc_panchip.usb_dc_ep_read: bmRT 80 bR 06 wV 0100 wI 0000 wL 0012
[00:00:50.567,000] <dbg> usb_device.custom_handler: bRequest 0x06, wIndex 0x0000
[00:00:50.569,000] <dbg> usb_hid.hid_custom_handle_req: Standard request:bRequest 0x06, bmRequestType 0x80, len 18
[00:00:50.570,000] <dbg> usb_device.usb_get_descriptor: Get Descriptor request
[00:00:50.572,000] <dbg> usb_dc_panchip.usb_dc_ep_write:
[00:00:50.573,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep 0x80, data_len 18
[00:00:50.574,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[0] = 0x12
[00:00:50.575,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[1] = 0x01
[00:00:50.576,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[2] = 0x00
[00:00:50.577,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[3] = 0x02
[00:00:50.578,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[4] = 0x00
[00:00:50.580,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[5] = 0x00
[00:00:50.581,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[6] = 0x00
[00:00:50.582,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[7] = 0x40
[00:00:50.583,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[8] = 0xe4
[00:00:50.584,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[9] = 0x2f
[00:00:50.585,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[10] = 0x07
[00:00:50.587,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[11] = 0x00
[00:00:50.588,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[12] = 0x07
[00:00:50.589,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[13] = 0x02
[00:00:50.590,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[14] = 0x01
[00:00:50.591,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[15] = 0x02
[00:00:50.593,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[16] = 0x03
[00:00:50.594,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[17] = 0x01
[00:00:50.595,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep0 write
[00:00:50.596,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00010000
[00:00:50.598,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP0 IN
[00:00:50.599,000] <dbg> usb_dc_panchip.Endpoint0: byCSR0 0x01
[00:00:50.600,000] <dbg> usb_dc_panchip.Endpoint0: ep0 out packet ready
[00:00:50.601,000] <dbg> usb_device.usb_handle_control_transfer: ep 0x00, status 0x00
[00:00:50.602,000] <dbg> usb_dc_panchip.usb_dc_ep_read:
[00:00:50.603,000] <dbg> usb_dc_panchip.usb_dc_ep_read: ep 00, data addr :, max_data_len 8
[00:00:50.605,000] <dbg> usb_dc_panchip.usb_dc_ep_read: bmRT 80 bR 06 wV 0200 wI 0000 wL 00ff
[00:00:50.606,000] <dbg> usb_device.custom_handler: bRequest 0x06, wIndex 0x0000
[00:00:50.608,000] <dbg> usb_hid.hid_custom_handle_req: Standard request:bRequest 0x06, bmRequestType 0x80, len 255
[00:00:50.609,000] <dbg> usb_device.usb_get_descriptor: Get Descriptor request
[00:00:50.610,000] <dbg> usb_dc_panchip.usb_dc_ep_write:
[00:00:50.611,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep 0x80, data_len 34
[00:00:50.613,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[0] = 0x09
[00:00:50.614,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[1] = 0x02
[00:00:50.615,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[2] = 0x22
[00:00:50.616,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[3] = 0x00
[00:00:50.617,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[4] = 0x01
[00:00:50.618,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[5] = 0x01
[00:00:50.620,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[6] = 0x00
[00:00:50.621,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[7] = 0xc0
[00:00:50.622,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[8] = 0x32
[00:00:50.623,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[9] = 0x09
[00:00:50.624,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[10] = 0x04
[00:00:50.625,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[11] = 0x00
[00:00:50.627,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[12] = 0x00
[00:00:50.628,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[13] = 0x01
[00:00:50.629,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[14] = 0x03
[00:00:50.630,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[15] = 0x00
[00:00:50.631,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[16] = 0x00
[00:00:50.633,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[17] = 0x00
[00:00:50.634,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[18] = 0x09
[00:00:50.635,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[19] = 0x21
[00:00:50.636,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[20] = 0x10
[00:00:50.637,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[21] = 0x01
[00:00:50.638,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[22] = 0x00
[00:00:50.640,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[23] = 0x01
[00:00:50.641,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[24] = 0x22
[00:00:50.642,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[25] = 0x34
[00:00:50.643,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[26] = 0x00
[00:00:50.644,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[27] = 0x07
[00:00:50.646,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[28] = 0x05
[00:00:50.647,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[29] = 0x81
[00:00:50.648,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[30] = 0x03
[00:00:50.649,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[31] = 0x10
[00:00:50.650,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[32] = 0x00
[00:00:50.652,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[33] = 0x09
[00:00:50.653,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep0 write
[00:00:50.654,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00010000
[00:00:50.655,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP0 IN
[00:00:50.656,000] <dbg> usb_dc_panchip.Endpoint0: byCSR0 0x01
[00:00:50.657,000] <dbg> usb_dc_panchip.Endpoint0: ep0 out packet ready
[00:00:50.659,000] <dbg> usb_device.usb_handle_control_transfer: ep 0x00, status 0x00
[00:00:50.660,000] <dbg> usb_dc_panchip.usb_dc_ep_read:
[00:00:50.661,000] <dbg> usb_dc_panchip.usb_dc_ep_read: ep 00, data addr :, max_data_len 8
[00:00:50.662,000] <dbg> usb_dc_panchip.usb_dc_ep_read: bmRT 80 bR 06 wV 0303 wI 0409 wL 00ff
[00:00:50.664,000] <dbg> usb_device.custom_handler: bRequest 0x06, wIndex 0x0409
[00:00:50.665,000] <dbg> usb_device.usb_get_descriptor: Get Descriptor request
[00:00:50.666,000] <dbg> usb_dc_panchip.usb_dc_ep_write:
[00:00:50.667,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep 0x80, data_len 34
[00:00:50.668,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[0] = 0x22
[00:00:50.670,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[1] = 0x03
[00:00:50.671,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[2] = 0x30
[00:00:50.672,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[3] = 0x00
[00:00:50.673,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[4] = 0x31
[00:00:50.674,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[5] = 0x00
[00:00:50.675,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[6] = 0x32
[00:00:50.677,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[7] = 0x00
[00:00:50.678,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[8] = 0x33
[00:00:50.679,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[9] = 0x00
[00:00:50.680,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[10] = 0x34
[00:00:50.681,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[11] = 0x00
[00:00:50.683,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[12] = 0x35
[00:00:50.684,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[13] = 0x00
[00:00:50.685,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[14] = 0x36
[00:00:50.686,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[15] = 0x00
[00:00:50.687,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[16] = 0x37
[00:00:50.689,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[17] = 0x00
[00:00:50.690,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[18] = 0x38
[00:00:50.691,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[19] = 0x00
[00:00:50.692,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[20] = 0x39
[00:00:50.693,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[21] = 0x00
[00:00:50.694,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[22] = 0x41
[00:00:50.696,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[23] = 0x00
[00:00:50.697,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[24] = 0x42
[00:00:50.698,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[25] = 0x00
[00:00:50.699,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[26] = 0x43
[00:00:50.700,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[27] = 0x00
[00:00:50.702,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[28] = 0x44
[00:00:50.703,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[29] = 0x00
[00:00:50.704,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[30] = 0x45
[00:00:50.705,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[31] = 0x00
[00:00:50.706,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[32] = 0x46
[00:00:50.708,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[33] = 0x00
[00:00:50.709,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep0 write
[00:00:50.710,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00010000
[00:00:50.711,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP0 IN
[00:00:50.712,000] <dbg> usb_dc_panchip.Endpoint0: byCSR0 0x01
[00:00:50.713,000] <dbg> usb_dc_panchip.Endpoint0: ep0 out packet ready
[00:00:50.715,000] <dbg> usb_device.usb_handle_control_transfer: ep 0x00, status 0x00
[00:00:50.716,000] <dbg> usb_dc_panchip.usb_dc_ep_read:
[00:00:50.717,000] <dbg> usb_dc_panchip.usb_dc_ep_read: ep 00, data addr :, max_data_len 8
[00:00:50.718,000] <dbg> usb_dc_panchip.usb_dc_ep_read: bmRT 80 bR 06 wV 0300 wI 0000 wL 00ff
[00:00:50.720,000] <dbg> usb_device.custom_handler: bRequest 0x06, wIndex 0x0000
[00:00:50.721,000] <dbg> usb_hid.hid_custom_handle_req: Standard request:bRequest 0x06, bmRequestType 0x80, len 255
[00:00:50.723,000] <dbg> usb_device.usb_get_descriptor: Get Descriptor request
[00:00:50.724,000] <dbg> usb_dc_panchip.usb_dc_ep_write:
[00:00:50.725,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep 0x80, data_len 4
[00:00:50.726,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[0] = 0x04
[00:00:50.727,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[1] = 0x03
[00:00:50.728,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[2] = 0x09
[00:00:50.730,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[3] = 0x04
[00:00:50.731,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep0 write
[00:00:50.732,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00010000
[00:00:50.733,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP0 IN
[00:00:50.734,000] <dbg> usb_dc_panchip.Endpoint0: byCSR0 0x01
[00:00:50.735,000] <dbg> usb_dc_panchip.Endpoint0: ep0 out packet ready
[00:00:50.736,000] <dbg> usb_device.usb_handle_control_transfer: ep 0x00, status 0x00
[00:00:50.738,000] <dbg> usb_dc_panchip.usb_dc_ep_read:
[00:00:50.739,000] <dbg> usb_dc_panchip.usb_dc_ep_read: ep 00, data addr :, max_data_len 8
[00:00:50.740,000] <dbg> usb_dc_panchip.usb_dc_ep_read: bmRT 80 bR 06 wV 0302 wI 0409 wL 00ff
[00:00:50.742,000] <dbg> usb_device.custom_handler: bRequest 0x06, wIndex 0x0409
[00:00:50.743,000] <dbg> usb_device.usb_get_descriptor: Get Descriptor request
[00:00:50.744,000] <dbg> usb_dc_panchip.usb_dc_ep_write:
[00:00:50.745,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep 0x80, data_len 48
[00:00:50.746,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[0] = 0x30
[00:00:50.748,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[1] = 0x03
[00:00:50.749,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[2] = 0x5a
[00:00:50.750,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[3] = 0x00
[00:00:50.751,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[4] = 0x65
[00:00:50.752,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[5] = 0x00
[00:00:50.753,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[6] = 0x70
[00:00:50.755,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[7] = 0x00
[00:00:50.756,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[8] = 0x68
[00:00:50.757,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[9] = 0x00
[00:00:50.758,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[10] = 0x79
[00:00:50.759,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[11] = 0x00
[00:00:50.760,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[12] = 0x72
[00:00:50.762,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[13] = 0x00
[00:00:50.763,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[14] = 0x20
[00:00:50.764,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[15] = 0x00
[00:00:50.765,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[16] = 0x48
[00:00:50.766,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[17] = 0x00
[00:00:50.768,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[18] = 0x49
[00:00:50.769,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[19] = 0x00
[00:00:50.770,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[20] = 0x44
[00:00:50.771,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[21] = 0x00
[00:00:50.772,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[22] = 0x20
[00:00:50.774,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[23] = 0x00
[00:00:50.775,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[24] = 0x6d
[00:00:50.776,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[25] = 0x00
[00:00:50.777,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[26] = 0x6f
[00:00:50.778,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[27] = 0x00
[00:00:50.780,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[28] = 0x75
[00:00:50.781,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[29] = 0x00
[00:00:50.782,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[30] = 0x73
[00:00:50.783,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[31] = 0x00
[00:00:50.784,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[32] = 0x65
[00:00:50.786,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[33] = 0x00
[00:00:50.787,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[34] = 0x20
[00:00:50.788,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[35] = 0x00
[00:00:50.789,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[36] = 0x73
[00:00:50.790,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[37] = 0x00
[00:00:50.792,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[38] = 0x61
[00:00:50.793,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[39] = 0x00
[00:00:50.794,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[40] = 0x6d
[00:00:50.795,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[41] = 0x00
[00:00:50.796,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[42] = 0x70
[00:00:50.798,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[43] = 0x00
[00:00:50.799,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[44] = 0x6c
[00:00:50.800,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[45] = 0x00
[00:00:50.801,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[46] = 0x65
[00:00:50.802,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[47] = 0x00
[00:00:50.804,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep0 write
[00:00:50.805,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00010000
[00:00:50.806,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP0 IN
[00:00:50.807,000] <dbg> usb_dc_panchip.Endpoint0: byCSR0 0x01
[00:00:50.808,000] <dbg> usb_dc_panchip.Endpoint0: ep0 out packet ready
[00:00:50.809,000] <dbg> usb_device.usb_handle_control_transfer: ep 0x00, status 0x00
[00:00:50.811,000] <dbg> usb_dc_panchip.usb_dc_ep_read:
[00:00:50.812,000] <dbg> usb_dc_panchip.usb_dc_ep_read: ep 00, data addr :, max_data_len 8
[00:00:50.813,000] <dbg> usb_dc_panchip.usb_dc_ep_read: bmRT 80 bR 06 wV 0600 wI 0000 wL 000a
[00:00:50.814,000] <dbg> usb_device.custom_handler: bRequest 0x06, wIndex 0x0000
[00:00:50.816,000] <dbg> usb_hid.hid_custom_handle_req: Standard request:bRequest 0x06, bmRequestType 0x80, len 10
[00:00:50.817,000] <dbg> usb_device.usb_get_descriptor: Get Descriptor request
[00:00:50.819,000] <dbg> usb_device.usb_get_descriptor: Desc 600 not found!
[00:00:50.820,000] <dbg> usb_device.usb_handle_request: Handler Error 0
[00:00:50.821,000] <dbg> usb_device.usb_print_setup: Setup: bmRT 0x80, bR 0x06, wV 0x0600, wI 0x0000, wL 0x000a
[00:00:50.822,000] <dbg> usb_device.usb_handle_control_transfer: usb_handle_request failed
[00:00:50.824,000] <dbg> usb_dc_panchip.usb_dc_ep_set_stall: ep 0x80
[00:00:50.825,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00010000
[00:00:50.826,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP0 IN
[00:00:50.827,000] <dbg> usb_dc_panchip.Endpoint0: byCSR0 0x04
[00:00:50.828,000] <dbg> usb_dc_panchip.Endpoint0: ep0 out packet not ready
[00:00:50.830,000] <dbg> usb_dc_panchip.Endpoint0: M_CSR0_SENTSTALL
[00:00:50.831,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00010000
[00:00:50.832,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP0 IN
[00:00:50.833,000] <dbg> usb_dc_panchip.Endpoint0: byCSR0 0x05
[00:00:50.834,000] <dbg> usb_dc_panchip.Endpoint0: ep0 out packet ready
[00:00:50.835,000] <dbg> usb_dc_panchip.Endpoint0: M_CSR0_SENTSTALL
[00:00:50.836,000] <dbg> usb_device.usb_handle_control_transfer: ep 0x00, status 0x00
[00:00:50.838,000] <dbg> usb_dc_panchip.usb_dc_ep_read:
[00:00:50.839,000] <dbg> usb_dc_panchip.usb_dc_ep_read: ep 00, data addr :, max_data_len 8
[00:00:50.840,000] <dbg> usb_dc_panchip.usb_dc_ep_read: bmRT 80 bR 06 wV 0100 wI 0000 wL 0012
[00:00:50.842,000] <dbg> usb_device.custom_handler: bRequest 0x06, wIndex 0x0000
[00:00:50.843,000] <dbg> usb_hid.hid_custom_handle_req: Standard request:bRequest 0x06, bmRequestType 0x80, len 18
[00:00:50.844,000] <dbg> usb_device.usb_get_descriptor: Get Descriptor request
[00:00:50.846,000] <dbg> usb_dc_panchip.usb_dc_ep_write:
[00:00:50.847,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep 0x80, data_len 18
[00:00:50.848,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[0] = 0x12
[00:00:50.849,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[1] = 0x01
[00:00:50.850,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[2] = 0x00
[00:00:50.851,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[3] = 0x02
[00:00:50.853,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[4] = 0x00
[00:00:50.854,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[5] = 0x00
[00:00:50.855,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[6] = 0x00
[00:00:50.856,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[7] = 0x40
[00:00:50.857,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[8] = 0xe4
[00:00:50.858,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[9] = 0x2f
[00:00:50.860,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[10] = 0x07
[00:00:50.861,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[11] = 0x00
[00:00:50.862,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[12] = 0x07
[00:00:50.863,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[13] = 0x02
[00:00:50.864,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[14] = 0x01
[00:00:50.865,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[15] = 0x02
[00:00:50.867,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[16] = 0x03
[00:00:50.868,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[17] = 0x01
[00:00:50.869,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep0 write
[00:00:50.870,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00010000
[00:00:50.872,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP0 IN
[00:00:50.873,000] <dbg> usb_dc_panchip.Endpoint0: byCSR0 0x01
[00:00:50.874,000] <dbg> usb_dc_panchip.Endpoint0: ep0 out packet ready
[00:00:50.875,000] <dbg> usb_device.usb_handle_control_transfer: ep 0x00, status 0x00
[00:00:50.876,000] <dbg> usb_dc_panchip.usb_dc_ep_read:
[00:00:50.877,000] <dbg> usb_dc_panchip.usb_dc_ep_read: ep 00, data addr :, max_data_len 8
[00:00:50.879,000] <dbg> usb_dc_panchip.usb_dc_ep_read: bmRT 80 bR 06 wV 0200 wI 0000 wL 0009
[00:00:50.880,000] <dbg> usb_device.custom_handler: bRequest 0x06, wIndex 0x0000
[00:00:50.881,000] <dbg> usb_hid.hid_custom_handle_req: Standard request:bRequest 0x06, bmRequestType 0x80, len 9
[00:00:50.883,000] <dbg> usb_device.usb_get_descriptor: Get Descriptor request
[00:00:50.885,000] <dbg> usb_dc_panchip.usb_dc_ep_write:
[00:00:50.886,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep 0x80, data_len 9
[00:00:50.887,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[0] = 0x09
[00:00:50.888,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[1] = 0x02
[00:00:50.889,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[2] = 0x22
[00:00:50.890,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[3] = 0x00
[00:00:50.891,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[4] = 0x01
[00:00:50.893,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[5] = 0x01
[00:00:50.894,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[6] = 0x00
[00:00:50.895,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[7] = 0xc0
[00:00:50.896,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[8] = 0x32
[00:00:50.897,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep0 write
[00:00:50.898,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00010000
[00:00:50.900,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP0 IN
[00:00:50.901,000] <dbg> usb_dc_panchip.Endpoint0: byCSR0 0x01
[00:00:50.902,000] <dbg> usb_dc_panchip.Endpoint0: ep0 out packet ready
[00:00:50.903,000] <dbg> usb_device.usb_handle_control_transfer: ep 0x00, status 0x00
[00:00:50.904,000] <dbg> usb_dc_panchip.usb_dc_ep_read:
[00:00:50.905,000] <dbg> usb_dc_panchip.usb_dc_ep_read: ep 00, data addr :, max_data_len 8
[00:00:50.907,000] <dbg> usb_dc_panchip.usb_dc_ep_read: bmRT 80 bR 06 wV 0200 wI 0000 wL 0022
[00:00:50.908,000] <dbg> usb_device.custom_handler: bRequest 0x06, wIndex 0x0000
[00:00:50.909,000] <dbg> usb_hid.hid_custom_handle_req: Standard request:bRequest 0x06, bmRequestType 0x80, len 34
[00:00:50.911,000] <dbg> usb_device.usb_get_descriptor: Get Descriptor request
[00:00:50.912,000] <dbg> usb_dc_panchip.usb_dc_ep_write:
[00:00:50.913,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep 0x80, data_len 34
[00:00:50.915,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[0] = 0x09
[00:00:50.916,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[1] = 0x02
[00:00:50.917,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[2] = 0x22
[00:00:50.918,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[3] = 0x00
[00:00:50.919,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[4] = 0x01
[00:00:50.920,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[5] = 0x01
[00:00:50.921,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[6] = 0x00
[00:00:50.923,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[7] = 0xc0
[00:00:50.924,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[8] = 0x32
[00:00:50.925,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[9] = 0x09
[00:00:50.926,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[10] = 0x04
[00:00:50.927,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[11] = 0x00
[00:00:50.928,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[12] = 0x00
[00:00:50.930,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[13] = 0x01
[00:00:50.931,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[14] = 0x03
[00:00:50.932,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[15] = 0x00
[00:00:50.933,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[16] = 0x00
[00:00:50.934,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[17] = 0x00
[00:00:50.936,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[18] = 0x09
[00:00:50.937,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[19] = 0x21
[00:00:50.938,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[20] = 0x10
[00:00:50.939,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[21] = 0x01
[00:00:50.940,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[22] = 0x00
[00:00:50.942,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[23] = 0x01
[00:00:50.943,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[24] = 0x22
[00:00:50.944,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[25] = 0x34
[00:00:50.945,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[26] = 0x00
[00:00:50.946,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[27] = 0x07
[00:00:50.948,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[28] = 0x05
[00:00:50.949,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[29] = 0x81
[00:00:50.950,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[30] = 0x03
[00:00:50.951,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[31] = 0x10
[00:00:50.952,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[32] = 0x00
[00:00:50.954,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[33] = 0x09
[00:00:50.955,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep0 write
[00:00:50.956,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00010000
[00:00:50.957,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP0 IN
[00:00:50.958,000] <dbg> usb_dc_panchip.Endpoint0: byCSR0 0x01
[00:00:50.959,000] <dbg> usb_dc_panchip.Endpoint0: ep0 out packet ready
[00:00:50.960,000] <dbg> usb_device.usb_handle_control_transfer: ep 0x00, status 0x00
[00:00:50.962,000] <dbg> usb_dc_panchip.usb_dc_ep_read:
[00:00:50.963,000] <dbg> usb_dc_panchip.usb_dc_ep_read: ep 00, data addr :, max_data_len 8
[00:00:50.964,000] <dbg> usb_dc_panchip.usb_dc_ep_read: bmRT 00 bR 09 wV 0001 wI 0000 wL 0000
[00:00:50.966,000] <dbg> usb_device.custom_handler: bRequest 0x09, wIndex 0x0000
[00:00:50.967,000] <dbg> usb_hid.hid_custom_handle_req: Standard request:bRequest 0x09, bmRequestType 0x00, len 0
[00:00:50.968,000] <dbg> usb_device.usb_set_configuration: Set Configuration 1 request
[00:00:50.970,000] <dbg> usb_device.set_endpoint: Set endpoint 0x81 type 3 MPS 16
[00:00:50.971,000] <dbg> usb_dc_panchip.usb_dc_ep_configure: 0x81,0x0010,3
[00:00:50.972,000] <dbg> usb_dc_panchip.usb_dc_ep_configure: reg_maxp_div = 2
[00:00:50.974,000] <dbg> usb_dc_panchip.usb_dc_ep_configure: config in ep1
[00:00:50.975,000] <dbg> usb_dc_panchip.usb_dc_ep_enable: ep = 0x81
[00:00:50.976,000] <dbg> usb_hid.hid_status_cb: cfg 0x20000180 status 3
[00:00:50.977,000] <inf> usb_hid: Device configured
status = 3[00:00:50.978,000] <dbg> usb_dc_panchip.usb_dc_ep_write:
[00:00:50.979,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep 0x80, data_len 0
[00:00:50.981,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep0 write
[00:00:50.982,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00010000
[00:00:50.983,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP0 IN
[00:00:50.984,000] <dbg> usb_dc_panchip.Endpoint0: byCSR0 0x00
[00:00:50.985,000] <dbg> usb_dc_panchip.Endpoint0: ep0 out packet not ready
[00:00:50.986,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00010000
[00:00:50.988,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP0 IN
[00:00:50.989,000] <dbg> usb_dc_panchip.Endpoint0: byCSR0 0x01
[00:00:50.990,000] <dbg> usb_dc_panchip.Endpoint0: ep0 out packet ready
[00:00:50.991,000] <dbg> usb_device.usb_handle_control_transfer: ep 0x00, status 0x00
[00:00:50.992,000] <dbg> usb_dc_panchip.usb_dc_ep_read:
[00:00:50.993,000] <dbg> usb_dc_panchip.usb_dc_ep_read: ep 00, data addr :, max_data_len 8
[00:00:50.995,000] <dbg> usb_dc_panchip.usb_dc_ep_read: bmRT 21 bR 0a wV 0000 wI 0000 wL 0000
[00:00:50.996,000] <dbg> usb_device.class_handler: bRequest 0x0a, wIndex 0x0000
[00:00:50.997,000] <dbg> usb_hid.hid_class_handle_req: Class request:bRequest 0x0a, bmRequestType 0x21 len 0
[00:00:50.999,000] <dbg> usb_device.usb_handle_request: Handler Error 1
[00:00:51.000,000] <dbg> usb_device.usb_print_setup: Setup: bmRT 0x21, bR 0x0a, wV 0x0000, wI 0x0000, wL 0x0000
[00:00:51.002,000] <dbg> usb_device.usb_handle_control_transfer: usb_handle_request failed
[00:00:51.003,000] <dbg> usb_dc_panchip.usb_dc_ep_set_stall: ep 0x80
[00:00:51.004,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00010000
[00:00:51.005,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP0 IN
[00:00:51.006,000] <dbg> usb_dc_panchip.Endpoint0: byCSR0 0x15
[00:00:51.007,000] <dbg> usb_dc_panchip.Endpoint0: ep0 out packet ready
[00:00:51.008,000] <dbg> usb_dc_panchip.Endpoint0: M_CSR0_SENTSTALL
[00:00:51.010,000] <dbg> usb_dc_panchip.Endpoint0: M_CSR0_SETUPEND
[00:00:51.011,000] <dbg> usb_device.usb_handle_control_transfer: ep 0x00, status 0x00
[00:00:51.012,000] <dbg> usb_dc_panchip.usb_dc_ep_read:
[00:00:51.013,000] <dbg> usb_dc_panchip.usb_dc_ep_read: ep 00, data addr :, max_data_len 8
[00:00:51.014,000] <dbg> usb_dc_panchip.usb_dc_ep_read: bmRT 81 bR 06 wV 2200 wI 0000 wL 0074
[00:00:51.016,000] <dbg> usb_device.custom_handler: bRequest 0x06, wIndex 0x0000
[00:00:51.017,000] <dbg> usb_hid.hid_custom_handle_req: Standard request:bRequest 0x06, bmRequestType 0x81, len 116
[00:00:51.019,000] <dbg> usb_hid.hid_custom_handle_req: Return Report Descriptor
[00:00:51.020,000] <dbg> usb_dc_panchip.usb_dc_ep_write:
[00:00:51.021,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep 0x80, data_len 52
[00:00:51.022,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[0] = 0x05
[00:00:51.023,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[1] = 0x01
[00:00:51.024,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[2] = 0x09
[00:00:51.025,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[3] = 0x02
[00:00:51.026,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[4] = 0xa1
[00:00:51.028,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[5] = 0x01
[00:00:51.029,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[6] = 0x09
[00:00:51.030,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[7] = 0x01
[00:00:51.031,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[8] = 0xa1
[00:00:51.032,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[9] = 0x00
[00:00:51.033,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[10] = 0x05
[00:00:51.035,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[11] = 0x09
[00:00:51.036,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[12] = 0x19
[00:00:51.037,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[13] = 0x01
[00:00:51.038,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[14] = 0x29
[00:00:51.039,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[15] = 0x02
[00:00:51.040,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[16] = 0x15
[00:00:51.042,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[17] = 0x00
[00:00:51.043,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[18] = 0x25
[00:00:51.044,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[19] = 0x01
[00:00:51.045,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[20] = 0x75
[00:00:51.046,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[21] = 0x01
[00:00:51.048,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[22] = 0x95
[00:00:51.049,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[23] = 0x02
[00:00:51.050,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[24] = 0x81
[00:00:51.051,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[25] = 0x02
[00:00:51.052,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[26] = 0x75
[00:00:51.053,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[27] = 0x06
[00:00:51.055,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[28] = 0x95
[00:00:51.056,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[29] = 0x01
[00:00:51.057,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[30] = 0x81
[00:00:51.058,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[31] = 0x01
[00:00:51.059,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[32] = 0x05
[00:00:51.061,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[33] = 0x01
[00:00:51.062,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[34] = 0x09
[00:00:51.063,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[35] = 0x30
[00:00:51.064,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[36] = 0x09
[00:00:51.065,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[37] = 0x31
[00:00:51.066,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[38] = 0x09
[00:00:51.068,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[39] = 0x38
[00:00:51.069,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[40] = 0x15
[00:00:51.070,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[41] = 0x81
[00:00:51.071,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[42] = 0x25
[00:00:51.072,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[43] = 0x7f
[00:00:51.074,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[44] = 0x75
[00:00:51.075,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[45] = 0x08
[00:00:51.076,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[46] = 0x95
[00:00:51.077,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[47] = 0x03
[00:00:51.078,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[48] = 0x81
[00:00:51.080,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[49] = 0x06
[00:00:51.081,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[50] = 0xc0
[00:00:51.082,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[51] = 0xc0
[00:00:51.083,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep0 write
[00:00:51.084,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00010000
[00:00:51.086,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP0 IN
[00:00:51.087,000] <dbg> usb_dc_panchip.Endpoint0: byCSR0 0x01
[00:00:51.088,000] <dbg> usb_dc_panchip.Endpoint0: ep0 out packet ready
[00:00:51.089,000] <dbg> usb_device.usb_handle_control_transfer: ep 0x00, status 0x00
[00:00:51.090,000] <dbg> usb_dc_panchip.usb_dc_ep_read:
[00:00:51.091,000] <dbg> usb_dc_panchip.usb_dc_ep_read: ep 00, data addr :, max_data_len 8
[00:00:51.092,000] <dbg> usb_dc_panchip.usb_dc_ep_read: bmRT 05 bR 01 wV 0209 wI 01a1 wL 0109
[00:00:51.094,000] <err> usb_device: Request buffer too small
[00:00:51.095,000] <dbg> usb_dc_panchip.usb_dc_ep_set_stall: ep 0x80
[00:00:51.096,000] <dbg> usb_dc_panchip.usb_dc_ep_set_stall: ep 0x00
[00:00:51.097,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00010000
[00:00:51.098,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP0 IN
[00:00:51.100,000] <dbg> usb_dc_panchip.Endpoint0: byCSR0 0x20
[00:00:51.101,000] <dbg> usb_dc_panchip.Endpoint0: ep0 out packet not ready

步骤3:复位芯片,识别为鼠标并且完成数据上报

保持usb连接,reset芯片,usb成功被识别,并且5s后鼠标位置右移一段距离,5s后的log显示如下

[00:00:05.106,000] <dbg> main.main: HID write
[00:00:05.107,000] <dbg> usb_dc_panchip.usb_dc_ep_write:
[00:00:05.108,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep 0x81, data_len 4
[00:00:05.110,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[0] = 0x00
[00:00:05.111,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[1] = 0x64
[00:00:05.112,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[2] = 0x00
[00:00:05.113,000] <dbg> usb_dc_panchip.usb_dc_ep_write: data[3] = 0x00
[00:00:05.114,000] <dbg> usb_dc_panchip.usb_dc_ep_write: ep1 write
[00:00:05.120,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: IntrFlag 0x00020000
[00:00:05.121,000] <dbg> usb_dc_panchip.usb_panchip_isr_handler: EP1 IN

5 RAM/Flash资源使用情况

Memory region         Used Size  Region Size  %age Used
FLASH:      39136 B      256 KB     14.93%
SRAM:       12824 B        64 KB    19.57%