cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

Anonymous
Not applicable

Hi,

   

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

   

Thanks.

0 Likes
Reply
2 Replies
Anonymous
Not applicable

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.

0 Likes
Reply
Anonymous
Not applicable

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

0 Likes
Reply