You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Linux Ubuntu (32-bit) 14.04LTS on VMware Win7 x64 host.
2. Single FT2232H Mini Module
3. Init the channel as,
channelConf.ClockRate = 1000000; // 1MHz
channelConf.LatencyTimer = latency;
channelConf.configOptions = SPI_CONFIG_OPTION_MODE0 | SPI_CONFIG_OPTION_CS_DBUS3 | SPI_CONFIG_OPTION_CS_ACTIVELOW;
channelConf.Pin = 0x00000000;/*FinalVal-FinalDir-InitVal-InitDir (for dir 0=in, 1=out)*/
4. Use SPI_ReadWrite to do 4-byte transaction.
uint8_t LCD_RegRead(uint8_t addr) {
uint32_t sizeToTransfer = 0;
uint32_t sizeTransfered=0;
FT_STATUS status;
uint8_t inBuf[4], outBuf[4];
sizeToTransfer=4;
sizeTransfered=0;
outBuf[0]=0x80;/* RS=1(cmd, status), RW=0(write) */
outBuf[1]=addr;
outBuf[2]=0x40;/* RS=0(data), RW=1(read) */
outBuf[3]=0x00;
inBuf[0] = 0x00;
inBuf[1] = 0x00;
inBuf[2] = 0x00;
inBuf[3] = 0x00;
status = SPI_ReadWrite(ftHandle, inBuf, outBuf, sizeToTransfer, &sizeTransfered,
SPI_TRANSFER_OPTIONS_SIZE_IN_BYTES|
SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE|
SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE);
APP_CHECK_STATUS(status);
printf("inBuf=%02X%02X%02X%02X\n", inBuf[0], inBuf[1], inBuf[2], inBuf[3]);
return inBuf[3];
}
What is the expected output? What do you see instead?
Scope capture shows consistent result on DI line but the inBuf readings are
random each time and never returns the right value.
What version of the product are you using? On what operating system?
Shown in step 1 above.
Please provide any additional information below.
Tried different clock speed but makes no difference.
Original issue reported on code.google.com by [email protected] on 22 May 2015 at 4:54
The text was updated successfully, but these errors were encountered:
Sample results,
inBuf=FFFFFFFF
inBuf=32603260
inBuf=FFFFFFFF
inBuf=3260FFFF
inBuf=32603260
Also attached is the connection chart on FT2232H Mini module
Original issue reported on code.google.com by
[email protected]
on 22 May 2015 at 4:54The text was updated successfully, but these errors were encountered: