FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  


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

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Messages - FTDI Community

Pages: 1 [2] 3 4 ... 47

As we are working from home at the moment, I do not have the required hardware to see if I can recreate your issue. However, I have sent your code to my colleague who does have access to the required hardware, so they can test it. I'll let you know what they find.

In the mean time, have you tried running the example as is? Just to see if the hardware is functioning properly?

Best Regards

FTDI Community


We have a technical note about USB data transfer efficiency that can help you: https://ftdichip.com/wp-content/uploads/2020/08/TN_103_FTDI_USB_Data_Transfer_EfficiencyFT_000097.pdf.

The main points are:

• Send as much data to the IC from the host application as possible in a single write. This will
maximize the size of the data packets being sent to the device and hence minimize the number of
packets required and time to transfer an amount of data.

• Set the latency timer to a value appropriate for the application. Note that a low latency timer
value may result in many short incoming USB packets rather than a single large packet, thus
diminishing performance.

you should also refer to section 5.3 of the FT4222 datasheet: https://ftdichip.com/wp-content/uploads/2020/07/DS_FT4222H.pdf

This section outlines the I2C bus interface.

also which example are you referring to? the one shown in the LibFT4222 user guide or the one included in the library download?

Best Regards

FTDI Community

Discussion - Software / Re: FT4222 cannot set speed. Exception raised
« on: November 05, 2021, 04:01:20 PM »

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

Discussion - Software / Re: FT4222H - Clock rate issues and pauses. Again?
« on: November 05, 2021, 01:46:57 PM »

Here is an example attached of 64 bytes transferred by a single write (to address 0x22) at 1MHz clock rate

The gap between the 0x02 and 0x03 for example is 4.6uSec

ftStatus = FT4222_I2CMaster_Write(ftHandle, 0x22, master_data, sizeof(master_data), &sizeTransferred);
master_data is a buffer with 64 bytes (0-63 in value)

Best Regards, FTDI Community


Ok that's fine then.

using the BOMS and FAT files to detect connection/removal won't work. As you say the UART2DSC doesn't do anything to detect removal or connection of USB devices. This is because it is a minimum project that is used to demonstrate how to write to a file on a flash disk. the procedure is as follows:

the USB host call to VOS_IOCTL_USBHOST_GET_CONNECT_STATE to see if there is a device connected and enumerated.
Search through the devices for the correct device.
Then open and attach the BOMS driver to the handle to the correct device.
After that attach the FAT driver to the BOMS driver.

Periodically poll the VOS_IOCTL_USBHOST_GET_CONNECT_STATE for disconnection, this checks that a device is connected to the root hub.
Also check the return value of any FAT or BOMS driver calls for FAT_NOT_FOUND or FAT_ERROR/FAT_FATAL_ERROR, MSI_NOT_FOUND or other errors. If there is an error again check VOS_IOCTL_USBHOST_GET_CONNECT_STATE to confirm or if there is a bub involved

On disconnection, detach FAT then BOMS drivers from the device.

I would recommend you use one of our other projects such as V2DAP, which has increased functionality and can be downloaded here: https://ftdichip.com/firmware/precompiled/.

Best Regards

FTDI Community


Sorry for the misunderstanding.

what version of the VNC2 toolchain are you using?

version V2.0.2-SP2 fixes a known connect/disconnect issue.

Download Vinculum II Toolchain V2.0.2-SP2

let me know if you are already using this version.

Best regards

FTDI community


please refer to the following documents:


this application note describes how to detect when a USB slave device has been disconnected from the VNC2.


this application note describes the VNC2 slave driver interface, which controls the USB slave ports on the device.

these should help you with your application.

please let us know if you have anymore questions.

Best regards,

FTDI community

Discussion - Software / Re: FT4232H -- RS232 Serial Use
« on: October 28, 2021, 05:13:05 PM »
Yes, You need to send/receive via the API

FTDI Community

Discussion - Drivers / Re: FT4222H and Windows driver 2021
« on: October 27, 2021, 04:56:35 PM »
Hi Cgtx32,
From the data sheet.  "There are 4 GPIO pins in the FT4222H that can be configured for different
purposes, such as a suspend indicator output, remote wake up input, an interrupt input or general
purpose Input/Output. These GPIOs can be easily initialized and fully controlled at the USB host side by
the application programming interface (API) defined in LibFT4222."
The link below is for the libFT4222 users guide document. 

FTDI Community


Could you advise what your key requirements are for the I2C communication. For example, is it most important to have the bytes all close together during one read or is it the interval at which reads occur which is important? Or is it just an overall throughput (even if in bursts) if the peripheral has some buffering?

One thing to note about bulk USB transfers are that they don't have guaranteed latency or guaranteed instantaneous throughput due to the USB scheduling and the other devices on the bus as well as other factors and so there can also be trade-offs depending on which requirement is most important.

Could you advise what calls do you use in your code to send the bytes?
You mentioned that there was no peripheral connected and so note that the communication may also differ as the device will not see an ACK on the bus

Best Regards, FTDI Community

Did you try hitting “Pause” in the debug ribbon?
Calculating the peak stack is transfer intensive so I’d bet it would only be performed when it’s stopped running the actual code on the device. 

FTDI Community


In reply to your previous questions:

Please try swapping the first two lines of the function around.

Code: [Select]
static size_t strcspn(const char * s1, const char * s2){
    char *c;
    char *s = s1; 

The readme file mentions that this might be a problem:

- At optimisation levels of 2 and above, if the first variable declaration in a function also initialises the variable then the initialisation may not occur. Separate the declaration and initialisation of the variable to workaround.

We only put the most basic implementation of the standard libraries that we could.

“A minimal set of C runtime library functions are provided” in the help file.
Further “NOTE: Not all the standard library functions have been included.”

We didn’t know fputc is there as it is not in the help file.

We will not be adding it into the standard libraries as it takes up space and reduces the amount of program space for other code.

We don’t claim to be compliant to any particular implementation of C.

Best Regards,
FTDI Community

Test and Review Area / Vinculum II Toolchain Patch V2.0.2-SP3
« on: October 25, 2021, 04:37:54 PM »
Hello All,

We have an update for some VNC2 drivers which include some improvements.

Please contact support1@ftdichip.com and we can send you the installer via SFTP.

Note that you must have V2.0.2-SP2 already installed which can be found here:


Vinculum II Installer V2.0.2-SP3.exe will be supplied which is a patch to update all the drivers and libraries (stdio, stdlib etc).

The changes are listed here in the patch readme:


This is patch Version 2.0.2-SP3 release of the Vinculum II Toolchain, comprising updated device drivers and libraries.

All ReadMe file information applies to the updates provided in V2.0.2-SP3.

*** This patch installer must be applied to an installation of V2.0.2-SP2 only. ***

There are no updates to compile, debug, or other build and configuration tools; sample code; VOS kernel; Vinco libraries; IDE; or documentation.

We welcome suggestions for new features or improvements to existing features.

The ReadMe files for previous releases are also available in the installation directory.
Drivers Readme

Fixed Issues:
- USBSlaveFT232.a fix enumeration issue;
    Add in latency timer get and set IOCTL functions,FTDI_SET_LATENCY_TIMER and FTDI_GET_LATENCY_TIMER were present but not implemented;
    Improve data flow so data is passed faster and more reliably to and from the host;
    Implement a dummy EEPROM to enable applications that require EEPROM checks to work.
- USBSlave.a correct remote wakeup behaviour when acting as a USB device and ensure correct ZLP generation for USB verification tests.
- BOMS.a implement changes for 64kB clusters on FAT16.
- FAT.a fix available cluster count.
- USBHostFT232.a correct baud rate settings for High-Speed devices. Added support for new FTDI devices.
- USBHost.a fix VOS_IOCTL_USBHOST_DEVICE_SET_CONFIGURATION to change the configuration of devices on USB host. Note: this will re-enumerate with the new configuration value.
- USBHostCDC code fix bitmaps for notifications.

- FAT library will not support ATAPI disks.
- FAT library does not support FAT12 format disks. Please use FAT16 or FAT32 format.
- FAT fat_fileCopy function will only copy files to a different disk from the source disk.
- USBHostFT232 driver does not assert RTS or DTR automatically when flow control is enabled.
    This must be done with an VOS_IOCTL_USBHOSTFT232_SET_RTS/DTR before data can be received.

Known Issues:
- N/A

Runtime Libraries Readme

Fixed Issues:
- Corrected return value of printf(), sprintf(), fprintf().

- N/A

Known Issues:
- N/A

Best Regards,
FTDI Community

Can you provide some screen shots of the issue you are seeing? 
Build settings (Debug/Release) ?   
How big are the stacks for each thread?
Maybe the scheduler has not started? That would need to be running to get the thread manager to show information.
Does it have the current stack size listed?

FTDI Community

Unfortunately the compiler doesn't do all constant initialisation which you might expect on other compilers.

If the values are expressed as constants without typecasting then it will compile.

Code: [Select]
enum {
        g0 = 0x82F63B78,
        g1 = (g0 >> 1) & 0x7fffffff,
        g2 = (g0 >> 2) & 0x3fffffff,
        g3 = (g0 >> 3) & 0x1fffffff,
    static const int table[16] =
        0,                  g3,           g2,          (g2^g3),
     g1,       (g1^g3),      (g1^g2),      (g1^g2^g3),
        g0,       (g0^g3),      (g0^g2),      (g0^g2^g3),
        (g0^g1),  (g0^g1^g3),   (g0^g1^g2),   (g0^g1^g2^g3),

I’ve not checked the values in the code though. They are precompiled (in decimal) to the following values according to the ASM output file:

0, 274646895, 549293790, 820201905, 1098587580, 1361435347, 1640403810, 1905808397, -2097792136, -1834419177, -1572096602, -1307217207, -1014159676, -741088853, -483350502, -210866315

Best Regards,
FTDI Community

Pages: 1 [2] 3 4 ... 47