FTDI Community

General Category => Discussion - Software => Topic started by: ffred on June 01, 2022, 12:03:37 PM

Title: LibFT260 : unclear doc for FT260_GetChipVersion or strange coincidence ?
Post by: ffred on June 01, 2022, 12:03:37 PM
Hi,
in LibFT260 library documentation, the explanations are quite limited for FT260_GetChipVersion & FT260_GetLibVersion functions.
it only says : "Version 1.0.0.0 is shows as 16777216 in decimal" for FT260_GetChipVersion.

so 16777216 is 0x01000000 in hex > 01 00 00 00 for v1.0.0.0  ok, simple !
but in my soft I made a simple code for converting the value and got : v1.1.5.0 for lib version (ok) &  v2.60.2.0 (?) for the chip version.
your sample code "getting_started" was giving me 2.0.2.0 !

so I looked into your code and saw that there's a mask with 0x0F for each byte, which explain the result.  (but should be in the doc)

but is it really a 2.0.2.0 version or maybe a 2.0 version for an FT260, because it's a really strange coincidence to have 2.60.2.0 ..  :o

thanks
ffred
Title: Re: LibFT260 : unclear doc for FT260_GetChipVersion or strange coincidence ?
Post by: FTDI Community on June 01, 2022, 03:42:23 PM
Hello,

Thanks for the information. I will check with our R&D team about this.

Best Regards,
FTDI Community
Title: Re: LibFT260 : unclear doc for FT260_GetChipVersion or strange coincidence ?
Post by: ffred on June 11, 2022, 06:41:40 AM
I found something in "AN_394_User_Guide_for_FT260.pdf" (page 16, the description for bytes 1-4) which give some information :

(https://i.ibb.co/PcXCt9Q/chip-version.jpg) (https://ibb.co/D9cKL8p)

I first thought while reading rapidly that it confirm what I was thinking, but it says 02 is the minor version and 00 the major version. so what, v0.2 ?
still not completely clear... (or maybe my english is too bad ??)
Title: Re: LibFT260 : unclear doc for FT260_GetChipVersion or strange coincidence ?
Post by: FTDI Community on June 13, 2022, 04:27:27 PM
Hello,

I had confirmation from our R&D team:

You are correct.
The correct output is 2.60.2.0

We will update the correct code on the next release which is below for your reference:

Code: [Select]
// Show version information
    DWORD dwChipVersion = 0;

    ftStatus = FT260_GetChipVersion(ft260Handle, &dwChipVersion);
    if (FT260_OK != ftStatus)
    {
        printf("Get chip version Failed, status: %d\n", ftStatus);
    }
    else
    {
        printf("Get chip version OK dwChipVersion=%ld\n",dwChipVersion);
                               
        printf("Chip version : %x.%x.%x.%x\n",
            ((dwChipVersion >> 24) & MASK_1), //  ((dwChipVersion >> 24) & MASK_1),
            ((dwChipVersion >> 16) & MASK_1), //  ((dwChipVersion >> 16) & MASK_1),
            ((dwChipVersion >> 8) & MASK_1), //   ((dwChipVersion >> 8) & MASK_1)
            (dwChipVersion & MASK_1) ); //  (dwChipVersion & MASK_1) );
    }

    DWORD dwLibVersion = 0;
   
    ftStatus =  FT260_GetLibVersion(&dwLibVersion);
    if (FT260_OK != ftStatus)
    {
        printf("FT260_GetLibVersion Failed, status: %d\n", ftStatus);
    }
    else
    {
        printf("FT260_GetLibVersion OK\n");

        printf("dllVersion:%8x\n", dwLibVersion);
    }

Best Regards,
FTDI Community
Title: Re: LibFT260 : unclear doc for FT260_GetChipVersion or strange coincidence ?
Post by: ffred on June 13, 2022, 05:53:29 PM
ok, thank you !