FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Author Topic: Purpose of FT4222_SetClock()  (Read 54 times)

allenhuffman

  • Newbie
  • *
  • Posts: 9
    • View Profile
Purpose of FT4222_SetClock()
« on: September 10, 2019, 03:41:40 PM »

Could someone enlighten me on the purpose of the different clock speeds provided by:

Code: [Select]
FT4222_SetClock()
The manual explains:

Quote
Set the system clock rate. The FT4222H supports 4 clock rates: 80MHz, 60MHz, 48MHz, or 24MHz. By default, the FT4222H runs at 60MHz clock rate.

From the specs:

https://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT4222H.pdf

It appears this may just be for SPI to get different speeds. Is it used at all for I2C?

We have had some interesting I2C challenges lately, and one of them may have been resolved by changing from the default 60MHz to 24MHz (it ran over a million packets overnight successfully, which we haven't been able to do previously).

NOTE: We also see that when we specify 1000 (kbps) our scope measures around 750mhz.

Thanks...
« Last Edit: September 10, 2019, 04:09:09 PM by allenhuffman »
Logged

FTDI Community

  • Administrator
  • Sr. Member
  • *****
  • Posts: 307
    • View Profile
Re: Purpose of FT4222_SetClock()
« Reply #1 on: September 12, 2019, 04:33:10 PM »

Hello,

The FT4222H operates with a 12 MHz crystal (or oscillator) and generates a standard internal 480 MHz clock for the USB interface. The Clock Synthesizer takes the 480MHz clock from the embedded UTMI PHY and generates the 80MHz, 60MHz, 48MHz and 24MHz as reference clocks. The user can select one of these reference clocks via the API, FT4222_SetClock which is defined in LibFT4222, as the system operating clock. The system operating clock will be the base and used by the embedded functions to generate the required interface clock.

AN_329_User_Guide_for_LibFT4222 states the I2C master speed cat be between 60kbps and 3400kbps.

It ignores the calculation when i2c master frequency is not in this range.

Add 1K resistor on R18 and R19 for I2C external bus pull-up.

Best Regards,
FTDI Community
Logged