FX3 How to use both UART and SPI FLASH boot

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
zhansun
Level 1
Level 1
5 sign-ins First like received First solution authored

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't 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?

0 Likes
1 Solution
Ajeethkumar_P
Moderator
Moderator
Moderator
50 likes received 500 replies posted 100 solutions authored

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 above configuration.

Thanks,
Ajeeth

View solution in original post

1 Reply
Ajeethkumar_P
Moderator
Moderator
Moderator
50 likes received 500 replies posted 100 solutions authored

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 above configuration.

Thanks,
Ajeeth