How to set GPIO's default's value.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Peya_4162826
Level 2
Level 2
First like received

I use api "CyU3PDeviceConfigureIOMatrix" to enable some GPIOs, while enable it, Is it high or low for these GPIO's? how to set to high while is enabling?

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello Peter,

You can configure the GPIO:

    CyU3PGpioSimpleConfig_t gpioConfig;

    /* Configure GPIO 21 as output */

    gpioConfig.outValue = CyFalse;      //This will set the initial value of the GPIO to Low. You can set initial value of GPIO using this field

    gpioConfig.driveLowEn = CyFalse;

    gpioConfig.driveHighEn = CyFalse;

    gpioConfig.inputEn = CyTrue;

    gpioConfig.intrMode = CY_U3P_GPIO_NO_INTR;

    apiRetStatus = CyU3PGpioSetSimpleConfig(21, &gpioConfig);

You can also refer to the GPIOAPP example of the SDK   Path : \Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples\cyfxgpioapp

Regards,

Rashi

Regards,
Rashi

View solution in original post

0 Likes
2 Replies