You are here

"CyU3PGpioSetSimpleConfig" always return error code = 66 | Cypress Semiconductor

"CyU3PGpioSetSimpleConfig" always return error code = 66

Summary: 2 Replies, Latest post by allenpeng on 18 Jun 2012 04:45 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
allenpeng's picture
12 posts

Hi,  I am a new on Cypress FX3. I got a GPIO problem, please help me to solve it.

I add the GPIO configuration in "cyfxuvcinmem" example. The configuration was copied from "cyfxgpioapp". I want to initial GPIO , but the "CyU3PGpioSetSimpleConfig" always returns error code "CY_U3P_ERROR_NOT_STARTED". After I tried many methods I got the same result.

Attachment is my project. Can you help me to check it ?

Thank you.


rskv's picture
Cypress Employee
1134 posts

 Hi Allen,

I have looked at your code. I don't see that you initializing the GPIO module. You need to do that before configuring any GPIO. Please go through the function  "CyFxGpioInit" in "GpioComplexApp" example code.

/* Init the GPIO module. The GPIO block will be running 

     * with a fast clock at SYS_CLK / 2 and slow clock is not

     * used. For the DVK, the SYS_CLK is running at 403 MHz.*/

    gpioClock.fastClkDiv = 2;

    gpioClock.slowClkDiv = 0;

    gpioClock.simpleDiv = CY_U3P_GPIO_SIMPLE_DIV_BY_2;

    gpioClock.clkSrc = CY_U3P_SYS_CLK;

    gpioClock.halfDiv = 0;


    apiRetStatus = CyU3PGpioInit(&gpioClock, NULL);

    if (apiRetStatus != 0)


        /* Error Handling */

        CyU3PDebugPrint (4, "CyU3PGpioInit failed, error code = %d\n", apiRetStatus);



This piece of code is missing in your project.


sai krishna.

allenpeng's picture
12 posts

Yes, It's working now.

Thank you very much for your kindly support.

Best regards,


Log in to post new comments.