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

Low baudrates doesn't work with bit-banging. #353

Open
evading opened this issue Aug 16, 2023 · 0 comments
Open

Low baudrates doesn't work with bit-banging. #353

evading opened this issue Aug 16, 2023 · 0 comments

Comments

@evading
Copy link

evading commented Aug 16, 2023

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.

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

1 participant