IO configuration problem

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

cross mob
Anonymous
Not applicable

Hi,

   

I find CYUSB3014 IO configuration very complicated and confusing. My firmware is stored in a Flash memory and I choose the SPI boot option. Meanwhile I use UART for logging. UART_TX and UART_RX are configured to GPIO[55] and GPIO[56] which are also SPI_MISO and SPI_MOSI. Thus, only when I unplug the UART-USB converter from the PC host can the firmware be booted from the SPI flash.

   

Here below is my configuration.

   

    /* Configure the IO matrix for the device. */

   

    io_cfg.isDQ32Bit        = CyFalse;
    io_cfg.lppMode          = CY_U3P_IO_MATRIX_LPP_UART_ONLY;
    io_cfg.gpioSimpleEn[0]  = 0;
    io_cfg.gpioSimpleEn[1]  = 0;
    io_cfg.gpioComplexEn[0] = 0;
    io_cfg.gpioComplexEn[1] = 0;
    io_cfg.useUart          = CyTrue;    /* Uart is enabled for logging. */
    io_cfg.useI2C           = CyTrue;   /* I2C is used for communication with FPGA. */
    io_cfg.useI2S           = CyFalse;
    io_cfg.useSpi           = CyFalse;   // SPI Flash

   

 

   

I find GPIO[48] and GPIO[49] can also be configured to UART bus. How can I configure the IO matrix to avoid the multi-usage of GPIO[55] and GPIO[56]? 

   

 

   

Best regards!

0 Likes
2 Replies
Anonymous
Not applicable

The UART pins in FX3 can be configured as per your requirements. If you refer to table 7 in the FX3 datasheet, if you configure for a 32 bit data bus OR if you wish to use 16 bit DATA bus + UART only , then the UART pins are from GPIO[53:56]. To configure a 32 bit data bus, you need to set io_cfg.isDQ32Bit  as TRUE and to use only UART, you need to set   io_cfg.lppMode          = CY_U3P_IO_MATRIX_LPP_UART_ONLY. In these cases, the UART lines will be on GPIO [53:56]. In this configuration, you cannot use SPI

   

If you wish to use SPI then you would need to change the UART lines to GPIO[46:49]. For this you would need to  set io_cfg.lppMode = CY_U3P_IO_MATRIX_LPP_DEFAULT  and  io_cfg.isDQ32Bit  as FALSE. This way you can use both the SPI and the UART.

0 Likes
Anonymous
Not applicable

Thanks so much for your detailed information!

0 Likes