-
1. Re: IO matrix configuration problems in AN84868
YangyangC_06 Nov 18, 2018 6:24 PM (in response to maxic_1246331)1 of 1 people found this helpfulHi Maverick,
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.
-
2. Re: IO matrix configuration problems in AN84868
maxic_1246331 Nov 19, 2018 6:21 AM (in response to YangyangC_06)Thank you.
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?
-
3. Re: IO matrix configuration problems in AN84868
YangyangC_06 Nov 19, 2018 8:58 PM (in response to maxic_1246331)2 of 2 people found this helpfulHi Maverick,
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.
-
4. Re: IO matrix configuration problems in AN84868
YangyangC_06 Nov 19, 2018 9:01 PM (in response to maxic_1246331)So the answer for your question is none of the time you have mentioned.
-
5. Re: IO matrix configuration problems in AN84868
maxic_1246331 Nov 20, 2018 12:01 AM (in response to YangyangC_06)Thank you.
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?
-
6. Re: IO matrix configuration problems in AN84868
YangyangC_06 Nov 20, 2018 12:10 AM (in response to maxic_1246331)Yes, it is.