pyftdi icon indicating copy to clipboard operation
pyftdi copied to clipboard

Low baudrates doesn't work with bit-banging.

Open evading opened this issue 1 year ago • 0 comments

I have a bunch of FT4232H and I'm trying to use the bit-banging feature in a HW test.

Given the following minimal example:

import argparse
import pyftdi
import pyftdi.gpio

parser = argparse.ArgumentParser()
parser.add_argument('baudrate')
args = parser.parse_args()

port_url = f"ftdi://ftdi:4232:0019-FT3/4"
tx_mask = 1
gpio = pyftdi.gpio.GpioSyncController()
gpio.configure(port_url, frequency=int(args.baudrate), direction=tx_mask, initial=tx_mask)
gpio.exchange([1, 0, 1, 0, 1, 0, 1, 0] * 10)

$> python minimal.py 3665 gives me the correct frequency when checked with logic analyzer. $> python minimal.py 3664 gives me a frequency of 6.25 MHz when checked with logic analyzer.

Any frequency below 3665 is totally bogus and the actual value seems random to me.

When checking self.frequency I get the closest to what was requested and that value does not seem to be off.

evading avatar Aug 16 '23 12:08 evading