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: FT4222 cannot set speed. Exception raised  (Read 286 times)

snarkysparky

  • Newbie
  • *
  • Posts: 1
    • View Profile
FT4222 cannot set speed. Exception raised
« on: November 05, 2021, 01:48:35 PM »

Using the FT4222 to communicate with MCU over SPI.

Same hardware and software has worked flawlessly in many instances.

However we are trying out a touchscreen integrated with PC.  Touchwu TD101E.
When FT4222_SetClock is executed it throws exception.

Code: [Select]
            ftStatus = FT_OpenEx(devInfo.LocId, FT_OPEN_BY_LOCATION, ref ftHandle);

            if (ftStatus != FTDI.FT_STATUS.FT_OK)               //  not true.   Status is OK
            {
                SetState(MessageList.MessageSystemError);
                StringAppendRTB("Open NG: {0}" + ftStatus);
                return;
            }



            // Set FT4222 clock
            FT4222_ClockRate ft4222_Clock = FT4222_ClockRate.SYS_CLK_24;



            if (ftHandle == null) MessageBox.Show("NULL");

            Thread.Sleep(200);

            try
            {
                ft42Status = FT4222_SetClock(ftHandle, ft4222_Clock);   // here throws exception


            }
            catch
            {

                MessageBox.Show(" cannot set USB clock " + ft42Status.ToString());    // status here is OK
                SetState(MessageList.MessageSystemError);



I am sure this is related to the new touchscreen PC but I don't know where to look in the specs to prove it.

We have updated all the chip drivers per the manufactures supported drivers.

Why would set clock throw an exception?

Thanks



Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 692
    • View Profile
Re: FT4222 cannot set speed. Exception raised
« Reply #1 on: November 05, 2021, 04:01:20 PM »

Hi,

You should try running our FT4222H code examples to see if it really is the PC. LibFT4222 Windows Library (v1.4.4) and Examples.

Also, i will need to know more about the exception. feel free to email with the details: support4@ftdichip.com

Best Regards

FTDI community
Logged