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
  • 相关阅读:
    奇 arch/i386/kernel/head.o(.text+0x3e): undefined reference to `stack_start'
    惊爆:当Python代码遇到zip解压炸弹,未做防护的你后悔莫及!
    肝了1个月,做了10个Python可视化动图,有需要的自己拿
    抖音超火的九宫格视频是如何生成的,Python 告诉你答案
    找出文件夹中的相同文件,并移动到指定文件夹中
    8行Python代码绘制疫情地图
    怎么将python项目打包成exe程序?
    利用Pycharm + Django搭建一个简单Python Web项目
    转行Python会经历的几个学习阶段!未来有哪些就业方向?
    一个python脚本就可以B站查找弹幕发送者!
  • 原文地址:https://www.cnblogs.com/zengjfgit/p/9294616.html
Copyright © 2011-2022 走看看