Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > EZ-DTECT (charger detect output)

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



EZ-DTECT (charger detect output)
Moderator:
RSKV

Post Reply
Follow this topic



EZ-DTECT (charger detect output)

Nazila posted on 13 Jan 2012 3:36 PM PST
Top Contributor
55 Forum Posts

Based on the video on the cypress website, the pin EZ-DTECT can be used as a general purpose pin.

1. What code should I write to configure it? In specific, I need to know what to write instead of ****XXXX****

    /* Configure EZ-DTECT as output */
    gpioConfig.outValue = CyFalse;
    gpioConfig.driveLowEn = CyTrue;
    gpioConfig.driveHighEn = CyTrue;
    gpioConfig.inputEn = CyFalse;
    gpioConfig.intrMode = CY_U3P_GPIO_NO_INTR;

    apiRetStatus = CyU3PGpioSetSimpleConfig( ****XXXX****, &gpioConfig);
    if (apiRetStatus != CY_U3P_SUCCESS)
    {
        /* Error handling */
        CyU3PDebugPrint (4, "EZ-DTECT Set Config Error, Error Code = %d\n",apiRetStatus);
        CyFxAppErrorHandler(apiRetStatus);
    }
 

2. Also, do I need to use override function or not?

    apiRetStatus = CyU3PDeviceGpioOverride (****XXXX****, CyTrue);
    if (apiRetStatus != 0)
    {
        /* Error Handling */
        CyU3PDebugPrint (4, "EZ-DTECT Override failed, Error Code = %d\n",apiRetStatus);
        CyFxAppErrorHandler(apiRetStatus);
    }

Thanks,

Nazila




Re: EZ-DTECT (charger detect output)

Lumpi6 posted on 16 Jan 2012 11:35 PM PST
Top Contributor
183 Forum Posts

Hi Nazila,

 

refer to the data sheet the pin is the number 60 so use instead of ****XXXX**** the value 60. This pin can just used as an output pin.

The way you described to initialize the pin with CyU3PDeviceGpioOverride (60, CyTrue); has to work but may be you can ran in issues if you use the GPIO in the bitmap of the matrix configure function.

Regards

Lumpi



Re: EZ-DTECT (charger detect output)

Nazila posted on 16 Jan 2012 04:28 PM PST
Top Contributor
55 Forum Posts

Hi Lumpi,

Thanks! then please correct the posted video: http://www.cypress.com/?rID=51181

At 37:46, it is talking about the Charge detect pin and it says that it can be use as either an input or output!

Nazila



Re: EZ-DTECT (charger detect output)

Lumpi6 posted on 17 Jan 2012 11:37 PM PST
Top Contributor
183 Forum Posts

Hi Nazila,

I never tried it to use this pin as an input, may be it works, try it! The pin works for sure as an output pin.

 

The data sheet (52136) says on page 34 tabele 16. Pin List that it is an I/O (there you're right) but the name is not the same as other GPIO's. There it says O[60] and others are e. g. GPIO[23].

Lumpi







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.