CY7C65215 Get/Set GPIO Config

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

cross mob
Justy
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Hi,

Could you provide Linux sample codes for getting and setting GPIO config from and to CY7C65215 ?

Because there are only  sample codes of getting and setting GPIO values and no reference codes for getting and setting GPIO config in CyUSBSerial_SDK_Linux package.

 

Best Regards,

Justy Huang 

0 Likes
1 Solution
Biren_R
Moderator
Moderator
Moderator
First question asked First like given 250 sign-ins

Hello Huang,

No API we have which configures GPIO as input or output at runtime only way to configure GPIO is at configuration time and it's not API option it's configuration utility.  

Regards,
Biren

View solution in original post

0 Likes
7 Replies
Meghavi
Moderator
Moderator
Moderator
250 replies posted 100 solutions authored 10 likes received

Hi Huang,

You can configure the GPIO only with the Cypress USB-Serial Configuration utility on Windows OS. For more details, refer to "GPIO Drive Modes" in USB-Serial Configuration Utility User Guide 

Regards

0 Likes
Justy
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Hi Meghavi,

 

The Cypress USB-Serial Configuration utility on Windows is good for engineering development. But it's not suitable for mass production because the Windows utility needs to operate manually. 

We need a Linux program to check and correct GPIO configurations automatically during manufacturing of our products with CY7C65215.

Please help to provide examples of getting and setting GPIO configurations of CY7C65215.

 

Best Regards,

Justy Huang

0 Likes
Meghavi
Moderator
Moderator
Moderator
250 replies posted 100 solutions authored 10 likes received

Hi Huang,

There is a Command line utility for Linux to configure USB-Serial Devices. It would be helpful if you have a fixed configuration to be programmed to CY7C65215. But you will have to generate the configuration file in Windows using the configuration utility, will this utility work for you? 

There are APIs (i.e CyGetGPIOValue(), CySetGPIOValue()) which are used to read/write GPIOs only after configuring it in using utility. It can't be used to configure state as there is no API to convert GPIO state from Tri-state to output/input. Please refer this KBA: https://community.infineon.com/t5/Knowledge-Base-Articles/USB-Serial-Bridge-Controller-Managing-I-Os... 

Regards

0 Likes
Justy
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Hi Meghavi,

We know the tool to program initial config for CY7C65215. But we need a tool to check whether GPIO configurations are all valid before shipping them out. 

CyUSBSerial_SDK_Linux defines the "CY_GPIO_GET_CONFIG_CMD" in CyUSBCommon.h so we think we could use this command to check programmed GPIO configs. That's why we are asking you to provide sample codes for reference.

Dose CY7C65215 support using this command to get GPIO configs ?

 

Best Regards,

Justy Huang

0 Likes
Meghavi
Moderator
Moderator
Moderator
250 replies posted 100 solutions authored 10 likes received

Hi Justy,

Apologies for the delay in response. Can you please let us know whether you have configured the CY7C65215 in Vendor mode or CDC mode? 

Regards,

Meghavi

0 Likes
Biren_R
Moderator
Moderator
Moderator
First question asked First like given 250 sign-ins

Hello Huang,

CY_GPIO_GET_CONFIG_CMD is maintaining in CyUSBCommon.h but it has not been implemented at the hoist side and Silicon so this will not work, we apologize for the confusion with this code will remove this in the upcoming release so it does not create confusion to the user.

Regards,
Biren

0 Likes
Biren_R
Moderator
Moderator
Moderator
First question asked First like given 250 sign-ins

Hello Huang,

No API we have which configures GPIO as input or output at runtime only way to configure GPIO is at configuration time and it's not API option it's configuration utility.  

Regards,
Biren

0 Likes