You are here

Config of IO-Matrix : UART, SPI, GPIF and GPIO | Cypress Semiconductor

Config of IO-Matrix : UART, SPI, GPIF and GPIO

Summary: 5 Replies, Latest post by Poul-Erik on 06 Jun 2012 09:02 PM PDT
Verified Answers: 0
Last post
Log in to post new comments.
Poul-Erik's picture
14 posts

The FX3 is new for me, and I find it difficult to information about how to configure the IO matrix.

If i set 1 bit in "io_cfg.gpioComplexEn[1]" or "io_cfg.gpioSimpleEn[1]", my application don't start.


My need : 


    GPIF IO[0..7]                 (8 bit GPIF data bus)

    PCLK (GPIO[16])         (Clock for GPIF)

    GPIO[28] & GPIO[29]  (Input for GPIF)



    SPI_SCK (GPIO[53])

    SPI_SSN (GPIO[54])

    SPI_MISO (GPIO[55])

    SPI_MOSI (GPIO[56])



    UART_TX (GPIO[48])

    UART_RX (GPIO[49])



    GPIO[22]  (Output)

    GPIO[34]  (Output)

    GPIO[36]  (Output)

    GPIO[37]  (Input)

    GPIO[38]  (Input)

    GPIO[39]  (Input)

    GPIO[40]  (Output)

    GPIO[41]  (Output)

    GPIO[46]  (Output)





RobK's picture
81 posts


while configuring the IO-matrix you have to take care that the pins which are used by UART, SPI and GPIF can't be used as simple or complex GPIO anymore. In gpioComplexEn[1] and/or gpioSimple[1] you can enable the pins [32...63] for GPIO-usage BUT they must not be already occupied by UART, SPI or GPIF!

Best regards!

Poul-Erik's picture
14 posts

With this configuration where will my UART be connected ?

    io_cfg.isDQ32Bit = CyFalse;
    io_cfg.useUart   = CyTrue;
    io_cfg.useI2C    = CyTrue;
    io_cfg.useI2S    = CyFalse;
    io_cfg.useSpi    = CyTrue;
    /* This mode is for SPI, UART and I2S. I2C is still enabled. */
     io_cfg.lppMode   = CY_U3P_IO_MATRIX_LPP_DEFAULT;
    /* No GPIOs are enabled. */
    io_cfg.gpioSimpleEn[0]  = 0;
    io_cfg.gpioSimpleEn[1]  = 0;
    io_cfg.gpioComplexEn[0] = 0;
    io_cfg.gpioComplexEn[1] = 0; //!

    status = CyU3PDeviceConfigureIOMatrix (&io_cfg);

I can't get any debug out.



RobK's picture
81 posts

This you can easily find out with the pin-description in the CYUSB3014-manual!

UART will be at pins GPIO[46...49], SPI at GPIO[53...56], I2C at GPIO[58...59].



Lumpi6's picture
341 posts

Hi Paul-Erik,


you get the UART at the GPIO pins 46-49


refer to datasheet of the FX3 Document Number 52136 on page 33 "Pin Description". If GPIF II is configured to 32-bit data mode, then UART is configured to the GPIO pins 53-56.




Poul-Erik's picture
14 posts

Thank you for your input.

I found an error in my PCB, (RX and TX was swaped), and after than i works.




Log in to post new comments.