Hello, I need to use both UART and SPI interface, FX3’s SPI interface and UART interface are shared, now my SPI is connected to FLASH, I need to power on through SPI FLASH, so I can not use its UART function, but FX3 has” 16- bit data bus UART SPI I2S” mode. In this mode, UART is mapped to GPIO46-49. Can I use the following settings to enable me to use both UART and SPI FLASH BOOT?
io_cfg.isDQ32Bit = CyFalse;
io_cfg.s0Mode = CY_U3P_SPORT_INACTIVE;
io_cfg.s1Mode = CY_U3P_SPORT_INACTIVE;
io_cfg.useUart = CyTrue;
io_cfg.useI2C = CyFalse;
io_cfg.useI2S = CyFalse;
io_cfg.useSpi = CyTure;
io_cfg.lppMode = CY_U3P_IO_MATRIX_LPP_DEFAULT;
/* No GPIOs are enabled. */
io_cfg.gpioSimpleEn[0] = 0;
io_cfg.gpioSimpleEn[1] = 0x08000000;
io_cfg.gpioComplexEn[0] = 0;
io_cfg.gpioComplexEn[1] = 0;
And, can I still use the virtual COM port function of the UART in this mode?
Hi, You can use the" 16- bit Data Bus UART SPI I2S" configuration to use both UART and SPI. Please refer to the available GPIOs for that mode in Table 7 of the FX3 datasheet. As mentioned in the table, you must choose the proper GPIO if you want to use some GPIOs. If you want to use I2S GPIOs you haRead more
Hi,
You can use the” 16- bit Data Bus UART SPI I2S” configuration to use both UART and SPI. Please refer to the available GPIOs for that mode in Table 7 of the FX3 datasheet. As mentioned in the table, you must choose the proper GPIO if you want to use some GPIOs. If you want to use I2S GPIOs you have to override using CyU3PDeviceGpioOverride.
Yes, the virtual COM port will work if you use the below configuration.
Thanks
See less