GPIO use as open-drain in CY7C65215

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

cross mob
TeMa_2997106
Level 6
Level 6
Distributor - TED (Japan)
10 likes received 10 solutions authored 250 replies posted

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
Moderator
50 likes received 750 replies posted 250 solutions authored

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

View solution in original post

0 Likes
6 Replies
MallikaK_22
Moderator
Moderator
Moderator
50 likes received 750 replies posted 250 solutions authored

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

 

0 Likes
TeMa_2997106
Level 6
Level 6
Distributor - TED (Japan)
10 likes received 10 solutions authored 250 replies posted

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
Moderator
50 likes received 750 replies posted 250 solutions authored

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

0 Likes
TeMa_2997106
Level 6
Level 6
Distributor - TED (Japan)
10 likes received 10 solutions authored 250 replies posted

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
Moderator
50 likes received 750 replies posted 250 solutions authored

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

0 Likes
TeMa_2997106
Level 6
Level 6
Distributor - TED (Japan)
10 likes received 10 solutions authored 250 replies posted

Mallika-san,

Thanks you for your support.

I can understand.

 

Thanks,

Tetsuo

0 Likes