Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Config of IO-Matrix : UART, SPI, GPIF and GPIO

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



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

Post Reply
Follow this topic



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

Poul-Erik posted on 06 Jun 2012 11:32 PM PST
Senior Member
14 Forum 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:

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

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

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

 

SPI:

    SPI_SCK (GPIO[53])

    SPI_SSN (GPIO[54])

    SPI_MISO (GPIO[55])

    SPI_MOSI (GPIO[56])

 

UART:

    UART_TX (GPIO[48])

    UART_RX (GPIO[49])

 

GPIO:

    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)

 

Poul-Erik.

 

 




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

RobK posted on 06 Jun 2012 11:59 PM PST
Top Contributor
56 Forum Posts

Hi,

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!



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

Poul-Erik posted on 06 Jun 2012 12:20 AM PST
Senior Member
14 Forum 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.

 

 



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

RobK posted on 06 Jun 2012 01:17 AM PST
Top Contributor
56 Forum 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].

Regards!

 



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

Lumpi6 posted on 06 Jun 2012 01:19 AM PST
Top Contributor
183 Forum 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.

Regards,

lumpi

 



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

Poul-Erik posted on 06 Jun 2012 07:02 PM PST
Senior Member
14 Forum Posts

Thank you for your input.

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

 

Poul-Erik.

 






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.