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

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 - alexeiko

Pages: [1]
1
Hi!

Found a solution by reading the buffer in loop until expected number of bytes is received.


Code: [Select]
while (totbytesread < 1024 * 9) {
do {
ftStatus |= FT_GetQueueStatus(ftHandle_A, &dwNumOfBytestoRead); // get the number of bytes in the device input buffer
} while ((dwNumOfBytestoRead == 0) && (ftStatus == FT_OK));

ftStatus |= FT_Read(ftHandle_A, mf_buff, dwNumOfBytestoRead, &dwNumOfBytesRead);
mf_buff += dwNumOfBytesRead;
totbytesread += dwNumOfBytesRead;
}

2
Hi, all!

I'm using FT4232 for JTAG. I'm using opcodes 0x39 and 0x3B for data in.
I'm expecting 9216 bytes (9KB) of data but the number of bytes in receive queue FT_GetQueueStatus gives me varies each time.
Once it's 9100, other time it's 9180 etc. Rarely I get the expected value.

What may be the issue? I tried to use smaller chunks, but still get incorrect values...

Would be glad for any help!

Thanks,
Alexei

3
Hi Alexei,

I'm afraid that each individual port on the device can only be opened once / with one handle. As you mentioned any further attempts whilst already open will fail.

One thing you could consider is to have a 'routing' process open which talks to the port and then pass any data to this from any other processes and it can send to the device, and vice versa for reading. That way there is only one process opening the port.

Best Regards, FTDI Community

Hi!

Thanks for the answer. I thought about that option but wanted to check that perhaps there is something simpler that can be done...

Alexei

4
Hi, All!

I'm using FT4232 for JTAG and I2C protocols. I want to ask how is it possible to access same device from a couple of different processes in windows?
I initialize channel A to MPSSE and obtain a handle for it. In another process I want to have the ability to work with this channel (already initialized). The problem is that I can't FT_Open a device which is already opened. Is there any way to obtain a handle in the new process (without first closing the device in the other process) ?

Thanks a lot!

Alexei

Pages: [1]