Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inversion of RxD TxD via eeprom conf #323

Open
schaechtelchen opened this issue Oct 11, 2022 · 1 comment
Open

inversion of RxD TxD via eeprom conf #323

schaechtelchen opened this issue Oct 11, 2022 · 1 comment

Comments

@schaechtelchen
Copy link

FTDI datasheets (e.g. FT232R) tells us : "Additionally, the UART signals can each be individually inverted and have a configurable high drive strength capability. Both these features are configurable in the EEPROM."

pyftdi EEPROM management should allow configuration of UARTs signal polarity

@enkiusz
Copy link

enkiusz commented Oct 27, 2022

You should be able to do this with the ftconf.py tool by following these steps:

  1. Read the EEPROM contents from the FTDI device and store it in a file:
davinci:~# python3 ftconf.py -v ftdi://ftdi:232:4/1 -o eeprom
vendor_id: 0x0403
product_id: 0x6001
type: 0x0600
self_powered: False
remote_wakeup: True
power_max: 100
has_serial: True
suspend_pull_down: True
out_isochronous: False
in_isochronous: False
manufacturer: SIBIT
product: SIBIT USB<>RS232 TTL CONVERTER
serial: 4
channel_a_driver: VCP
high_current: True
external_oscillator: 0
invert_TXD: False
invert_RXD: False
invert_RTS: False
invert_CTS: False
invert_DTR: False
invert_DSR: False
invert_DCD: False
invert_RI: False
cbus_func_0: TXLED
cbus_func_1: RXLED
cbus_func_2: GPIO
cbus_func_3: GPIO
cbus_func_4: SLEEP
davinci:~#
  1. Edit the eeprom file to set the invert_txd or invert_rxd to "true":
davinci:~# cat eeprom-txd-inverted
[values]
vendor_id = 0x0403
product_id = 0x6001
type = 0x0600
self_powered = false
remote_wakeup = true
power_max = 100
has_serial = true
suspend_pull_down = true
out_isochronous = false
in_isochronous = false
manufacturer = SIBIT
product = SIBIT USB<>RS232 TTL CONVERTER
serial = 4
channel_a_driver = VCP
high_current = true
external_oscillator = 0
invert_txd = true
invert_rxd = false
invert_rts = false
invert_cts = false
invert_dtr = false
invert_dsr = false
invert_dcd = false
invert_ri = false
cbus_func_0 = TXLED
cbus_func_1 = RXLED
cbus_func_2 = GPIO
cbus_func_3 = GPIO
cbus_func_4 = SLEEP

You do not need to touch the raw EEPROM data in "[raw]".

  1. Program the EEPROM to the FTDI device:
davinci:~# python3 ftconf.py -v ftdi://ftdi:232:4/1 -u -i eeprom-txd-inverted
vendor_id: 0x0403
product_id: 0x6001
type: 0x0600
self_powered: False
remote_wakeup: True
power_max: 100
has_serial: True
suspend_pull_down: True
out_isochronous: False
in_isochronous: False
manufacturer: SIBIT
product: SIBIT USB<>RS232 TTL CONVERTER
serial: 4
channel_a_driver: VCP
high_current: True
external_oscillator: 0
invert_TXD: True
invert_RXD: False
invert_RTS: False
invert_CTS: False
invert_DTR: False
invert_DSR: False
invert_DCD: False
invert_RI: False
cbus_func_0: TXLED
cbus_func_1: RXLED
cbus_func_2: GPIO
cbus_func_3: GPIO
cbus_func_4: SLEEP
davinci:~#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants