Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > "CyU3PGpioSetSimpleConfig" always return error code = 66

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



"CyU3PGpioSetSimpleConfig" always return error code = 66
Moderator:
RSKV

Post Reply
Follow this topic



"CyU3PGpioSetSimpleConfig" always return error code = 66

allenpeng posted on 18 Jun 2012 11:55 PM PST
Senior Member
12 Forum 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.

 




Re: "CyU3PGpioSetSimpleConfig" always return error code = 66

RSKV posted on 18 Jun 2012 01:10 AM PST
Cypress Employee
655 Forum 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);

        CyFxAppErrorHandler(apiRetStatus);

    }

This piece of code is missing in your project.

Thanks,

sai krishna.



Re: "CyU3PGpioSetSimpleConfig" always return error code = 66

allenpeng posted on 18 Jun 2012 02:45 AM PST
Senior Member
12 Forum Posts

Yes, It's working now.

Thank you very much for your kindly support.

Best regards,

Allen






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.