If you configure GPIF data bus width to be 32 bit wide, then you can use only UART and not SPI. To use UART in 32 bit GPIF mode you need to set io_cfg.isDQ32Bit = CyTrue; io_cfg.lppMode = CY_U3P_IO_MATRIX_LPP_DEFAULT; and io_cfg.useUart = CyTrue;
To use both UART and SPI you need to configure GPIF bus width to be 16 bit wide and
io_cfg.isDQ32Bit = CyFalse; io_cfg.lppMode = CY_U3P_IO_MATRIX_LPP_DEFAULT; io_cfg.useUart = CyTrue; and io_cfg.useSpi = CyTrue;
As suggested by Hemanth, you could not use SPI port when the IO matrix is configured as 32-bit(but you can still start FX3 from SPI interface).
You need to choose one configuration from the twos above.