zoukankan      html  css  js  c++  java
  • USB眼图

    /**********************************************************************
     *                            USB眼图
     * 说明:
     *     对于USB眼图,并不是很清楚这种硬件特性,USB控制器一般本身自带测试
     * 模式,所以只需要修改寄存器来发送对应的测试包就行了。USB Hub可以用usb-tools。
     *
     *                                2018-7-11 深圳 宝安西乡 曾剑锋
     *********************************************************************/
    
    一、参考文档:
        1. USB 眼图测试
            https://community.nxp.com/thread/357113
        2. The solution for the USB test
            https://community.nxp.com/thread/321605
        3. i.MX6Q/eye pattern of USB HS1 setup
            https://community.nxp.com/thread/383925
        4. I.MX6 series USB Certification Guides
            https://community.nxp.com/docs/DOC-105609
        5. 65.6 USB Core Memory Map/Register Definition
    6. https://github.com/felipebalbi/usb-tools
    7. USB HOST TEST MODE
    http://eagerhsu.blogspot.com/2012/07/usb-host-test-mode.html
    8. USB High Speed Electrical Test
    https://github.com/MicrochipTech/USB-Hub-Linux-Examples/tree/master/General%20USB%20Examples/USB%20High%20Speed%20Electrical%20Test
    二、原理说明: The USB controller is compliant with the EHCI specification. The test modes are set by the PTC bits in the PORTSC register (bits 19-16). 三、USB_nPORTSC1 field descriptions

    四、测试示例:
        memtool 0x2184184 1               //read the register settings, address of the other USB port is 0x2184384
        memtool 0x2184184=0x18441205      // Force to output Test Packet for Eye Diagram Test  
        memtool 0x2184184=0x18411205      //Force to output J_STATE
        memtool 0x2184184=0x18421205      // Force to output K_STATE
        memtool 0x2184184=0x18431205      // Force to output SE0 (host) / NAK (device)
        memtool 0x2184384=0x18001305      // Force to output Reset
        memtool 0x2184384=0x18001285      //Ho Force to output Suspend
        memtool 0x2184384=0x18001245      // Force to output Resume
    
    五、PORTSCn地址信息:
        | Absolute |
        | address  |                                         | Width     |
        | (hex)    | Register name                           | (in bits) | Access Reset value
        +----------+-----------------------------------------+-----------+-------------------
        | 218_4184 | Port Status & Control (USB_UOG_PORTSC1) |  32       | R/W    1000_0000h
        +----------+-----------------------------------------+-----------+-------------------
        | 218_4384 | Port Status & Control (USB_UH1_PORTSC1) |  32       | R/W    1000_0000h
        +----------+-----------------------------------------+-----------+-------------------
        | 218_4584 | Port Status & Control (USB_UH2_PORTSC1) |  32       | R/W    1000_0000h
        +----------+-----------------------------------------+-----------+-------------------
        | 218_4784 | Port Status & Control (USB_UH3_PORTSC1) |  32       | R/W    1000_0000h
  • 相关阅读:
    http返回码
    JAVA获取当前系统时间System.currentTimeMillis()以及获取运行时间
    【Jsoup】Jsoup解析Html标签(Java后台解析)
    字节、字、位、比特,这四者之间的关系
    Java中字符编码和字符串所占字节数 .
    判断一个字符串是否为全英文的工具
    汉语转拼音(全转与只转首个字母)工具类
    Page的生命周期及相关事件苛
    PHP设计模式——策略模式
    java生产者消费者问题代码分析
  • 原文地址:https://www.cnblogs.com/zengjfgit/p/9294616.html
Copyright © 2011-2022 走看看