cancel
Showing results for 
Search instead for 
Did you mean: 

USB Low-Full-High Speed Peripherals

TeMa_2997106
Contributor II

I want to use GPIO as a wired OR, so it want to control Hi-z or Low. But I couldn't figure out how to use it by looking at the API Guide. Where is it described?

Thanks,
Tetsuo

0 Likes
1 Solution
MallikaK_22
Moderator
Moderator

Hello Tetsuo,

The API can only change the GPIO mode from Drive 1 --> 0 & vice-versa. It cannot change Tristate--> Drive 1 or Tristate--> Drive0. 

Regards,

Mallika

Mallika

View solution in original post

0 Likes
6 Replies
MallikaK_22
Moderator
Moderator

Hello,

Please refer to Table 18: GPIO configuration in CY7C65215 datasheet for the gpio configuration options available. The gpios can be configured from the USB Serial Configuration Utility.

Note: The drive modes of I2C pins (SCL, SDA) port pins are always open drain.

Regards,

Mallika

 

Mallika
0 Likes
TeMa_2997106
Contributor II

Mallika-san,

Is it possible to set with API instead of Utility?

It seems that it can be done by using CySetGpioValue, but there is no description of value in the API Guide. Is it possible to control using this?

Thanks,
Tetsuo

0 Likes
MallikaK_22
Moderator
Moderator

Hello Tetsuo,

Apologies for the delay in response.

Please refer to this KBA: https://community.cypress.com/t5/Knowledge-Base-Articles/USB-Serial-Bridge-Controller-Managing-I-Os-... 

For configuring the gpio, you need to use USB Serial configuration utility. Then, either to retrieve the status of the input GPIO or to set the status of GPIO to Drive 1 or Drive 0,  you can use the CySetGPIOValue() API.

Regards,

Mallika

Mallika
0 Likes
TeMa_2997106
Contributor II

Mallika-san,

I understood that the default is tristate. And I also understood that it can set Drive1 and Drive0 using CySetGPIOValue().

In my understanding, it can change the default tristate to Drive0, but you can't change Drive0 to tristate. Is it correct? Or is it possible to return to the default(tristate) using the CyGetGPIOValue() ?

Thanks,
Tetsuo

0 Likes
MallikaK_22
Moderator
Moderator

Hello Tetsuo,

The API can only change the GPIO mode from Drive 1 --> 0 & vice-versa. It cannot change Tristate--> Drive 1 or Tristate--> Drive0. 

Regards,

Mallika

Mallika

View solution in original post

0 Likes
TeMa_2997106
Contributor II

Mallika-san,

Thanks you for your support.

I can understand.

 

Thanks,

Tetsuo

0 Likes