You are here

FX3 UART with GPIO pins 46&47 | Cypress Semiconductor

FX3 UART with GPIO pins 46&47

Summary: 2 Replies, Latest post by nia_1534961 on 19 Apr 2016 09:04 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
nia_1534961's picture
20 posts


I would like to use UART, but configure UART_RT S and UART_CT S as GPIO pins and only use UART_TX and UART_RX for my UART communication.  Is this configuration possible?

When I try to configure the io matrix using the settings below, the firmware won't load.

    CyU3PMemSet ((uint8_t *)&io_cfg, 0, sizeof(io_cfg));
    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    = CyTrue;
    io_cfg.lppMode   = CY_U3P_IO_MATRIX_LPP_DEFAULT;

    io_cfg.gpioSimpleEn[0]  = 0x0;
    io_cfg.gpioSimpleEn[1]  = 0x4000; // GPIO46 as simple
    io_cfg.gpioComplexEn[0] = 0x0;
    io_cfg.gpioComplexEn[1] = 0x8000; // GPIO47 as complex



kash's picture
Cypress Employee
112 posts

The IO cannot be selected as GPIO by CyU3PDeviceConfigureIOMatrix call  because it is part of the GPIF IOs. Try doing a GPIO Override followed by GPIOSetsimpleconfig or GPIOsetcomplexconfig based on your application.

Refer to the cyfxgpioapp example projects in the SDK (firmware -->serialif examples) to get a reference for the same.

nia_1534961's picture
20 posts

I used CyFx3DevIOSelectGpio() followed by CyU3PGpioSetSimpleConfig().  Thanks.

Log in to post new comments.