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

Pages: [1]
1
I2C_OpenChannel() returns FT_DEVICE_NOT_OPENED (FT_STATUS==3), and a handle==0, when called after SPI channel deinit. Then all calls to I2C_DeviceRead, I2C_DeviceWrite, FT_WriteGPIO return FT_INVALID_HANDLE. I2C_GetNumChannels() returns the same number (2) as when all is working, so the MPSSE channel is seemingly properly deinitialised.
SPI MPSSE does initialise and deinitialise on the same channel B even when I2C stops initialising.

Note I did not use SPI_CloseChannel(), rather only Cleanup_libMPSSE(), because only in this way does my 1.SPI init, 2.SPI work, 3.SPI deinit sequence work more than once. But I did use I2C_CloseChannel() because for I2C not using it impeded functionality (did not work).

2
I found there are problems with libMPSSE.dll v0.6 (win) channel init and deinit (I used it with FTDI2232H), as it seemed in my initial tests.

When using a MPSSE channel for SPI twice (SPI_InitChannel and SPI_OpenChannel), the MPSSE channel will not initialise to SPI the second time if SPI_CloseChannel(handle) is used (followed with a Cleanup_libMPSSE). Using the returned handle, FT_WriteGPIO returns Invalid Handle status.

When using only Cleanup_libMPSSE to deinitialise SPI channel, not using SPI_CloseChannel, SPI works fine after multiple init deinit sequences. But then the I2C does not initialise after using SPI. And my task requires combined SPI/I2C usage for the channel.

Any ideas?
At the moment, rewriting the I2C part to use FTD2XX.dll seems like the only solution for this problem. Do you know of a way the libMPSSE.dll can be used to access SPI and I2C devices on the same MPSSE channel?

3
I have been reading all the ANs about FTDI libMPSSE and FTD2XX library, and can not find any explicit description of the proper procedure to use a single MPSSE channel for both I2C and SPI, initialisation and deinitialisation. We are using FTDI2232H. Should we use FT_Purge, FT_Close and FT_Open (with FT_CyclePort if there are any errors), or is just a simple FtdiDevice.SetBitMode(0x00, 0x00); enough to reset the MPSSE interface (and libMPSSE library) to enable initialisation of other protocol?

Pages: [1]