1 of 1 people found this helpful
For the question 1, well, it seems to be a "literal contradiction". In fact, I2C interace is always available so that io_cfg.useI2C doesn't make sense. We don't need I2S port in this application so that io_cfg_useI2S= CyFalse.
However, for FX3, if you configure it to works as 32-bit mode, only one of SPI/UART/I2S is available. In this case, you must set io.cfg_lppMode to CY_U3P_IO_MATRIX_LPP_DEFAULT. Then set one of io_cfg.useUART/useI2S/useSPI to CyTrue and others CyFalse.
This is the feature of FX3. It is not totally the same to human intuition but you need to use it in this way.
For question 2, Figure 4 of AN84868 illustrates the procedure. Please refer to it.
The first question is nicely solved. However I still have not got the answer for the second question. I think I should state the second question more clearly: When do the SCK pin and MOSI pin of SPI interface leave the tri-state and start to output signals in AN84868.
Does it happen when I just finish IO matrix configuration by the function of CyU3PDeviceConfigureIOMatrix?
Or does it happen when I just finish the initialization of SPI interface by the function of CyU3PSpiInit?
Or does it happen when I just finish the configuration of SPI interface by the function of CyU3PSpiSetConfig?
2 of 2 people found this helpful
The configuration will not happen untill the host send vendor command to FX3. We define vendor command 0xB1 and 0xB2 for implement this. The firmware sets the event CY_FX_CONFIGFPGAAPP_START_EVENT for starting the FPGA configuration after it receives the
vendor command 0xB2 (VND_CMD_SLAVESER_CFGLOAD) along with the length of the configuration bit file. The firmware also sets the event CY_FX_CONFIGFPGAAPP_SW_TO_SLFIFO_EVENT for switching to the Slave FIFO interface after it receives the vendor command 0xB1 (VND_CMD_SLAVESER_CFGSTAT) and only if the FPGA configuration is successful. After CY_FX_CONFIGFPGAAPP_SW_TO_SLFIFO_EVENT is set, the firmware will switch to slave FIFO and the I/O matrix will be reconfigured if necessary.
Section 3.3 and 3.4 makes a very detailed explanation on this part.
So the answer for your question is none of the time you have mentioned.
Although I understand when will the FX3 start configuration, I still do not know when the spi interface start to leave the float state in this application note. Does SPI interface begin to leave the float state once FX3 receives the configuration command?
Yes, it is.