Wrong setting baudrate for FTDI chip FT230X
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux-hwe-5.4 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Hello!
I have three chips FT232BL, FT232R and FT230X. I am using them as a VCP on Ubuntu 18.04. According to Application Note AN_120 from FTDI, the baud rate generators of all these chips have 8 sub-integer prescalers. Divisor = 3000000 / baudrate = n + 0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875. Where n is an integer between 2 and 16384.
So, I measured real baud rates, for n = 2 in combination with all possible sub-integer prescalers.
And it turned out that all sub-integer prescalers worked for FT232BL, FT232R chips.
And for the FT230X, only a few prescalers work correctly. The following shows exactly how prescalers behave:
0 - correct
0.125 - correct
0.25 - correct
0.375 - WRONG! (works like 0.125)
0.5 - correct
0.625 - WRONG! (works like 0.5)
0.75 - WRONG! (works like 0.25)
0.875 - WRONG! (works like 0.125)
The same for the other n.
I think it is a driver problem, it initializes the sub-integer prescaler incorrectly. Since under Windows FT230X works fine with all sub-integer prescalers.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: linux-modules-
ProcVersionSign
Uname: Linux 5.4.0-54-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.20
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Thu Nov 26 15:12:45 2020
InstallationDate: Installed on 2019-10-11 (411 days ago)
InstallationMedia: Ubuntu 18.04.3 LTS "Bionic Beaver" - Release amd64 (20190805)
SourcePackage: linux-hwe-5.4
UpgradeStatus: No upgrade log present (probably fresh install)