FTDI通用转USB芯片简述
FTDI公司的FT2232系列芯片可实现USB与异步串行口RS232/RS485、同步串行总线IIC/SPI/JTAG相互通信,市场占有率,使用普遍。
FTDI芯片有两种类型的驱动:virtual COM port driver (VCP)和D2xx。VCP就是常用的U转串COM驱动,实现USB到虚拟串口功能,应用于异步RS232/RS485与USB间通信,linux设备文件为/dev/ttyUSBx;D2XX应用于同步串行总线IIC/SPI/JTAG与USB间通信,整个驱动框架都有FTDI公司提供。
COM驱动
linux支持FTDI公司的VCP驱动需配置内核:
Device Drivers --->
[*] USB support --->
<M> USB Serial Converter support --->
<M> USB Prolific Single Port Serial Driver
<M> USB FTDI Single Port Serial Driver
Prolific和FTDI是常用的USB转串口芯片厂商。通用模块usbserial.ko,prolific公司的模块pl2303.ko,ftdi公司的模块ftdi_sio.ko
[ 1.771996] usbcore: registered new interface driver usbfs [ 1.777600] usbcore: registered new interface driver hub [ 1.782975] usbcore: registered new device driver usb [ 3.227325] usbcore: registered new interface driver usb-storage [ 3.331190] usbcore: registered new interface driver bcm203x [ 3.336872] usbcore: registered new interface driver bfusb [ 3.342381] usbcore: registered new interface driver btusb [ 3.347893] usbcore: registered new interface driver ath3k [ 3.496381] usbcore: registered new interface driver usbhid [ 3.501958] usbhid: USB HID core driver [ 58.132670] usb -: new full-speed USB device number using xhci-hcd [ 58.314580] usbcore: registered new interface driver usbserial [ 58.316675] usbcore: registered new interface driver pl2303 [ 58.316707] usbserial: USB Serial support registered for pl2303 [ 58.317386] usb -: pl2303 converter now attached to ttyUSB0 [ 289.400405] usb -: USB disconnect, device number
或
[ 1.774779] usbcore: registered new interface driver usbfs [ 1.780377] usbcore: registered new interface driver hub [ 1.785752] usbcore: registered new device driver usb [ 3.230535] usbcore: registered new interface driver usb-storage [ 3.334244] usbcore: registered new interface driver bcm203x [ 3.339930] usbcore: registered new interface driver bfusb [ 3.345439] usbcore: registered new interface driver btusb [ 3.350951] usbcore: registered new interface driver ath3k [ 3.495753] usbcore: registered new interface driver usbhid [ 3.501362] usbhid: USB HID core driver [ 3.643788] usb -: new high-speed USB device number using xhci-hcd [ 7.070296] usbcore: registered new interface driver usbserial [ 7.099899] usbcore: registered new interface driver ftdi_sio [ 7.099925] usbserial: USB Serial support registered for FTDI USB Serial Device [ 7.100046] usb -: Detected FT2232H [ 7.100439] usb -: FTDI USB Serial Device converter now attached to ttyUSB0 [ 7.100539] usb -: Detected FT2232H [ 7.100667] usb -: FTDI USB Serial Device converter now attached to ttyUSB1 [ 86.423288] usb -: USB disconnect, device number
插入USB设备会在/dev/ttyUSBx文件出现,可像操作普通的串口文件/dev/ttySx一样操作,采用通用termios编程。
D2XX驱动
在linux中VCP和D2XX驱动是不兼容的,当D2XX驱动应用前应卸载VCP驱动模块:
sudo rmmod ftdi_sio
sudo rmmod usbserial
实际测试中采用D2XX驱动时系统会自动卸载VCP驱动。
D2XX驱动协议栈如下图,D2XX驱动libftd2xx.tar.gz可在如下页面下载:https://www.ftdichip.com/Drivers/D2XX.htm,或者直接在系统下apt安装(可能需要libusb-dev):
apt install libftdi-dev
在D2XX驱动之上是libmpsse,即MPSSE库。Multi Protocol Synchronous Serial Engine(MPSSE)是一个通用的同步总线如I2C、SPI或JTAG通信库,用于FT2232D、FT2232H、FT4232H和FT232H芯片通过USB与PC或ARM通信。MPSSE基于D2XX设计。


D2XX应用
lora gateway就应用了D2XX驱动,将SPI接口转化为U口与主服务器(X86或ARM)通信,开源库:https://github.com/yuxi-o/RAK833-LoRaGateway-RPi或https://github.com/Lora-net/lora_gateway.git。
参考:
1. https://www.ftdichip.com/Support/Documents/AppNotes.htm
4. FTDI Drivers Installation Guide for Linux
5. User Guide For LibMPSSE-SPI
FTDI通用转USB芯片简述的更多相关文章
- usb芯片调试经验
记录一下调试usb有关的芯片的一些经验. 1.有i2c的芯片.一般有i2c的地址选择. 检查地址选择是否正确,地址是多少.SCL和SDA上面是否有上拉电阻. 芯片的地址是几位的.I2c的时钟频率也是必 ...
- windows xp 连接USB网络打印机服务器(通用所有usb网络打印机服务器的安装)
usb网络打印机服务器是HP1101U 打印机是 hp1108 需要准备的其他东西:1.HP1108的驱动 首先,接好线,保证usb hp1101u能正常访问,这款USB一旦接入了网络,会分配一个ip ...
- CYPRESS USB芯片win10驱动
The ZIP file attached with this knowledge base article contains the CyUSB3.inf and CyUSB3.sys files ...
- USB2.0学习笔记连载(三):通用USB驱动程序解析
对于USB驱动的开发,读者可以使用Windows DDK.DriverStudio等多种开发工具来实现USB的驱动,但是驱动程序的开发过程都比较复杂,而且很容易致使USB主机内存泄露而死机.那么对于笔 ...
- USB Keyboard Recorder
catalogue . 引言 . Device Class Definition for Human Interface Devices (HID) . USB HID Report Descript ...
- USB入门
简述 USB(Universal Serial Bus)全称通用串口总线,USB为解决即插即用需求而诞生,支持热插拔.USB协议版本有USB1.0.USB1.1.USB2.0.USB3.1等,USB2 ...
- USB接口介绍
USB设备系统分为两个部分,USB Host端和USB Device端,以USB接口的U盘为例子,U盘自身是一个USB Device,PC机的USB接口以及相关的控制电路为USB Host部分 ...
- Linux usb子系统(一):子系统架构
一.USB协议基础知识 前序:USB概念概述 USB1.0版本速度1.5Mbps(低速USB) USB1.1版本速度12Mbps(全速USB) USB2.0版本速度480Mbps(高速USB). ...
- USB Mass Storage大容量存储的基本知识
http://www.crifan.com/files/doc/docbook/usb_disk_driver/release/htmls/ch02_msc_basic.html 目录 2.1. US ...
随机推荐
- SharePoint 2013 Backup Farm Automatically With a Powershell and Windows Task Schedule
In this post,I will show you SharePoint 2013 How to Backup Farm Automatically with a PowerShell and ...
- android 中 viewpager 滑动的指示器
先看下效果图: 这个需要用到1个开源的 库,这个后面也会说下的. 工程目录: 1. MainActivity.java public class MainActivity extends Fragme ...
- react-native react-navigation使用
npm install react-navigation --save 安装 代码中引入StackNavigator组件 5CF902D1-9639-494D-8775-A9A87F376734. ...
- 如何在Windows环境下安装JDK
原文链接:http://android.eoe.cn/topic/android_sdk 1. JDK 的下载 JDK有好几个类型版本,我们只需要选择Java SE类型的版本就行了. 进入网页:htt ...
- ARC指南 strong和weak指针
一.简介 ARC是自iOS 5之后增加的新特性,完全消除了手动管理内存的烦琐,编译器会自动在适当的地方插入适当的retain.release.autorelease语句.你不再需要担心内存管理,因为编 ...
- Android 7.0 出现 ”FileUriExposedException“ 和 ”解析包出现错误“ 异常的解决办法
问题1 :android.os.FileUriExposedException: file:///storage/emulated/0/Android/data/com.xxx.xxx.xxx.rel ...
- git 生成ssh keys
最近从svn转到gitlab 记录一下如何生成ssh keys 首先下载GitExtensions246SetupComplete.msi并安装,如果已经安装了git,那么安装途中就跳过就行 安装完毕 ...
- asp.net 中用easyui中的treegird的简单使用
几乎每个‘数人头’项目中都会用到的功能,这里先记下来,以后直接到这里复制代码就行了,ASP.NET MVC中的使用 数据库用户表中的除了有个parentid父级ID外,我还多加了以个字段,parent ...
- 绕过chrome的弹窗拦截机制
在chrome的安全机制里面,非用户触发的window.open方法,是会被拦截的.举个例子: var btn = $('#btn'); btn.click(function () { //不会被拦截 ...
- cc(self)是什么意思?
分别找到这2句代码: 复制代码 cc(self):addComponent("components.behavior.EventProtocol"):exportMethods ...