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

Pages: [1]
Discussion - Software / Re: Different writing speeds
« on: February 08, 2019, 01:05:48 PM »
Thank your for answer.
I tried putting in practice all your suggestion. I think the problem is not because of using LibMPSSE library.I used the D2XX drivers direct, as you suggest, and also use the LibMPSSE_0_6_Beta and the results are the same. I also tried to verify the influence of the OS and USB Host by copying a large amount of data to several USB Sticks in the same time with writing on the memory. I tried to execute the program on others SO (Windows 7, for example). The results were the same: there are only 2 different writing (or reading) speeds s1 and s2 ~= 3,5*s1.
I have observed the SPI bus with Oscilloscope and I saw that the data were transferred with the SPI clock that was set to, but with big gaps between frames (10ms for s1 speed and 30 ms for s2 speed).
I've made some other tests like: put the USB selective suspend setting on Disable, change the clock from 1MHz to 30MHz, put pullup resistors on MISO and CS memory pins, use ResetMemory() function before writing any data and WriteDisable() function after writing data on the memory. 
In conclusion the results were the same. I don’t know what others test to perform. 
If anyone has any suggestions I will be glad to implement it.

Discussion - Software / Different writing speeds
« on: February 04, 2019, 11:31:46 AM »
I am using FT2232H mini module to write to a N25P256MB memory with an application in C on Windows 10 Professional x64 operation system. I use libMPSEE library v, 2014 and FTDI D2XX driver (version 2.12.28) downloaded from https://www.ftdichip.com/Drivers/D2XX.htm.  My problem is that I obtained different speeds for writing data in that memory. For example, for write consecutive pages (256 bytes) with “SPI_Write” function, it  took  16 ms or 60 ms in the same execution of program.

This are the parameters that I used for “SPI_InitChannel” function:
channelConf.ClockRate = 30000000; // 30 MHz;
channelConf.LatencyTimer = 2; //2ms
channelConf.Pin = 0x00000000;

This are the functions that I used to write a page (256 bytes) on memory

   sizeToTransfer = 1;
   sizeTransfered = 0;
   buffer[0] = 0x06;   /// WRITE ENABLE   
   status = SPI_Write(ftHandle, buffer, sizeToTransfer, &sizeTransfered,
       // WRITE DATA
   sizeToTransfer = 261;
   sizeTransfered = 0;
   buffer[0] = 0x02;   /// WRITE COMMAND
   //buffer[0] = 0x12;   /// WRITE COMMAND
   buffer[1] = ((address & 0xff000000) >> 24) & 0x000000ff;
   buffer[2] = ((address & 0x00ff0000) >> 16) & 0x000000ff;
   buffer[3] = ((address & 0x0000ff00) >> 8) & 0x000000ff;
   buffer[4] = (uint8)address;
   status = SPI_Write(ftHandle, buffer, sizeToTransfer, &sizeTransfered,

Any suggestion on what the problem could be or how to resolve this?

Pages: [1]