Configuring FT4232H using the ftdi_eeprom utility







The FT4232H is a USB to UART converter IC that supports High Speed ​​mode on the USB side and has four ports on the UART side.







By connecting an EEPROM memory to this microcircuit, you can set specific operating modes or change the manufacturer's data.







Let's take an example and configure the FT4232H directly on a system running GNU / Linux. We will do this using the utility ftdi_eeprom



.







Installation ftdi_eeprom





ftdi_eeprom



open-source libFTDI



libconfuse



.







  • ftdi_eeprom



    Ubuntu Debian, :







    sudo apt-get update
    sudo apt-get install ftdi-eeprom
          
          





  • Yocto Project (thud)



    , ftdi_eeprom



    , :







    recipes-support/confuse/confuse_2.7.bb









    DESCRIPTION = "Library for parsing configuration files."
    HOMEPAGE = "http://www.nongnu.org/confuse/"
    SECTION = "libs"
    LICENSE = "ISC"
    LIC_FILES_CHKSUM = "file://NEWS;md5=18e885b42b86362019e0cab8dc2a393b"
    
    SRC_URI = "http://download.savannah.gnu.org/releases/confuse/confuse-${PV}.tar.gz"
    SRC_URI[md5sum] = "45932fdeeccbb9ef4228f1c1a25e9c8f"
    SRC_URI[sha256sum] = "e32574fd837e950778dac7ade40787dd2259ef8e28acd6ede6847ca895c88778"
    
    inherit autotools binconfig pkgconfig lib_package gettext
    
    EXTRA_OECONF = "--enable-shared"
    
    BBCLASSEXTEND = "native"
          
          





    recipes-support/libftdi/libftdi_%.bbappend









    PACKAGECONFIG += "ftdi-eeprom"
    PACKAGECONFIG[ftdi-eeprom] = "-DFTDI_EEPROM=on,-DFTDI_EEPROM=off,confuse"
    PACKAGES =+ "ftdi-eeprom"
    FILES_ftdi-eeprom += "${bindir}/ftdi_eeprom"
          
          







FT4232H



UART- FT4232H RS232



, – «FTDI»



«Quad RS232-HS»



.













«habr.com»



, «Quad RS485»



, UART- RS485



.







habr.conf









#  ,   EEPROM,   
filename=habr.bin

#  .  FT4232H   : 0x0403
vendor_id=0x0403

#  .  FT4232H   : 0x6011
product_id=0x6011

#  EEPROM . 0x46  93xx46, 0x56  93xx56  0x66  93xx66
eeprom_type=0x56

manufacturer="habr.com"
product="Quad RS485"
serial="1234"

#    
use_serial=true

#    : ( ) * 2 .  
#    0,  self_powered=true
max_power=0

#     USB,     
self_powered=true

#    RI  0     true,    USB
#       20 .
remote_wakeup=false

#    
cha_type=UART
chb_type=UART

#    com-
cha_vcp=true
chb_vcp=true
chc_vcp=true
chd_vcp=true

#   RS-485
cha_rs485=true
chb_rs485=true
chc_rs485=true
chd_rs485=true

      
      





ftdi_eeprom



eeprom-, :







ftdi_eeprom --flash-eeprom habr.conf
      
      





After restarting the device, you can observe the results of the work:














All Articles