FTDI Community

General Category => Discussion - Software => Topic started by: sagar on April 17, 2024, 05:22:09 AM

Title: FT2232H JTAG TCK Clock Speed
Post by: sagar on April 17, 2024, 05:22:09 AM
Hi

I was trying to use FT2232H Channel A as JTAG and configured it. I have enabled JTAGHiSpeed API's from driver and disabled divide_by_5, to get 30MHz as TCK. But when I probe, I see 6MHz at TCK Pin.

1. Does FT2232H support 30MHz at JTAG-TCK?
2. Is it required for platform to provide 60MHz clock to FTDI or 12MHz crystal is sufficient? Or any other hardware change required?
3. Any reference driver/test to enable FT2232H JTAG TCK operating at 30MHz?
Title: Re: FT2232H JTAG TCK Clock Speed
Post by: cioma on April 19, 2024, 11:49:21 AM
I've been working with FT2232H a lot but I don't use FTDI drivers, instead I work directly through libusb.

Quote
1. Does FT2232H support 30MHz at JTAG-TCK?

IIRC, yes, I think I measured it at some point.


Quote
2. Is it required for platform to provide 60MHz clock to FTDI or 12MHz crystal is sufficient? Or any other hardware change required?

12 MHz crystal is sufficient, nothing else is needed in HW.


Quote
3. Any reference driver/test to enable FT2232H JTAG TCK operating at 30MHz?

These are notes from my code:

Master clock is 60 MHz after /5 clock divider is disabled
required_clock = master_clock / (2 * (divider + 1))
divider = master_clock / required_clock / 2 - 1

If you set it to 30 MHz but actually measure 6 MHz then the /5 clock divider is enabled.