Tool/software:
Hello!
I am trying to use the FTDI UMFT4222EV (https://ftdichip.com/products/umft4222ev/) to communicate to the TDC 7200EVM and am a little confused by the documentation and forum comments. I have the SPI lines connected directly from the UMFT4222EV to the TDC 7200EVM
If I interpret Figure 21 of the TDC 7200 documentation correctly, I should use single IO mode SPI_IO_SINGLE to communicate. When I try this, i am not able to read back the default registers and see all zero values
API calls:
ftStatus = FT4222_SPIMaster_Init(ftHandle, SPI_IO_SINGLE, CLK_DIV_32, CLK_IDLE_LOW, CLK_TRAILING, 0x01);
ftStatus = FT4222_SetClock(ftHandle, SYS_CLK_24);
uint8 SPI_WriteBuff[4] = { 0x80,0x00,0x00,0x00 }; //read reg
ftStatus = FT4222_SPIMaster_SingleReadWrite(ftHandle, SPI_ReadBuffer, SPI_WriteBuff, sizeof(SPI_WriteBuff), &sizeTransferred, true);
if I try dual mode, I see non zero but incorrect values and some glitches.
ftStatus = FT4222_SPIMaster_Init(ftHandle, SPI_IO_DUAL, CLK_DIV_32, CLK_IDLE_LOW, CLK_TRAILING, 0x01);
ftStatus = FT4222_SetClock(ftHandle, SYS_CLK_24);
uint8 SPI_WriteBuff[4] = { 0x80,0x00,0x00,0x00 }; //read reg
ftStatus = FT4222_SPIMaster_MultiReadWrite(ftHandle, SPI_ReadBuffer, SPI_WriteBuff, 1, sizeof(SPI_WriteBuff), 3, &sizeOfRead);