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

USB low-full-high speed peripherals

TeMa_2997106
Level 6
250 replies posted 250 sign-ins 100 replies posted
Level 6

Earlier, I asked in the thread below if there was a Linux driver for VCP conversion.
https://community.infineon.com/t5/USB-low-full-high-speed/CY7C65215A-VCP-support-for-Linux/m-p/32775...

Similarly, is there a Linux driver for the GPIO conversion function? If yes, I'd like to get it.

CY65215A has both functions, so I would like to use both.

Thanks,
Tetsuo

0 Likes
1 Solution
Meghavi
Moderator
Moderator 100 replies posted 100 sign-ins 50 solutions authored
Moderator

Hi Tetsuo-san,

The GPIOs can be configured as input/output/tristate from the USB-Serial Configuration Utility. Once the GPIO's functionality is configured, the GPIO current value is set/get depending on the configuration(input/output) using the CyUSBSerial Library through a host application. There is no separate driver needed for that. You can refer the USB-Serial API doc to control the GPIO operation from USB-Serial SDK.

Best Regards

View solution in original post

0 Likes
13 Replies
Meghavi
Moderator
Moderator 100 replies posted 100 sign-ins 50 solutions authored
Moderator

Hi Tetsuo-san,

Can you please elaborate more about GPIO conversion function? Do you want to read/write GPIOs or configure the state of the GPIO?

Best Regards

0 Likes
TeMa_2997106
Level 6
250 replies posted 250 sign-ins 100 replies posted
Level 6

Meghavi-san,

It is a general-purpose usage. I show the usage below.

-Input: Reads the change in High / Low level (1/0) of the LVCMOS signal and conveys it to the USB host.
-Output: Outputs High / Low (1/0) according to the instructions from the USB host.

In both cases, it is sufficient if the response can be controlled on the order of 100ms.

Thanks,
Tetsuo

0 Likes
Meghavi
Moderator
Moderator 100 replies posted 100 sign-ins 50 solutions authored
Moderator

Hi Tetsuo-san,

The GPIOs can be configured as input/output/tristate from the USB-Serial Configuration Utility. Once the GPIO's functionality is configured, the GPIO current value is set/get depending on the configuration(input/output) using the CyUSBSerial Library through a host application. There is no separate driver needed for that. You can refer the USB-Serial API doc to control the GPIO operation from USB-Serial SDK.

Best Regards

0 Likes
TeMa_2997106
Level 6
250 replies posted 250 sign-ins 100 replies posted
Level 6

Meghavi-san,

Does the USB-Serial Configuration Utility work on Linux? The User Guide only mentions Windows as the supported OS.

Thanks,
Tetsuo

0 Likes
Meghavi
Moderator
Moderator 100 replies posted 100 sign-ins 50 solutions authored
Moderator

Hi Tetsuo-san,

No, The USB-Serial Configuration Utility is only for Windows. 

Best Regards

0 Likes
TeMa_2997106
Level 6
250 replies posted 250 sign-ins 100 replies posted
Level 6

Meghavi-san,

thank you for your answer.

It tried GPIO operation with an application using "CyUSB Serial Library", but an error occurred due to a conflict with the UART standard driver (CDC). It's not working.

I want to use both UART and GPIO simultaneously. How should I build it?

Thanks,
Tetsuo

0 Likes
Meghavi
Moderator
Moderator 100 replies posted 100 sign-ins 50 solutions authored
Moderator

Hi Tetsuo-san,

After the required GPIOs are used for SCB cofiguration, the remaining unused GPIOs can be used during UART operation. You will need to manage the I/O using APIs. All the I/O lines are tri-stated by default and can be configured using the Cypress USB-Serial Configuration Utility. Please go through the KBA at https://community.infineon.com/t5/Knowledge-Base-Articles/USB-Serial-Bridge-Controller-Managing-I-Os... for further details.

Regards

0 Likes
TeMa_2997106
Level 6
250 replies posted 250 sign-ins 100 replies posted
Level 6

Meghavi-san,

I'm sorry for the late comment.

You said Utility is not supported on Linux. How do I design on Linux?

Thanks,
Tetsuo

0 Likes
TeMa_2997106
Level 6
250 replies posted 250 sign-ins 100 replies posted
Level 6

I had already referenced KBA. But it's still not working.

An error occurred in CyOpen () before CyGetGPIOValue ().
When I checked the source of the CyOpen () library, it was an error in the following part.

CyOpen ()
   -> CySelectInterface ()
   ...
   if (libusb_kernel_driver_active (devHandle, interfaceNum)) {
      CY_DEBUG_PRINT_ERROR ("CY: Kernel driver active on the interface number% d \ n", interfaceNum) ;;

It seems to be failing because the kernel's CDC ACM (UART) driver has already acquired the Interface.

Interface specification is not required for GPIO processing, but Interface is specified in the argument of CyOpen () and cannot be invalidated. It seems that 0 is specified in the example in KBA.

So, when I changed the SCB setting from UART CDC ACM to UART --Vendor using Cypress USB-Serial Configuration Utility, the CyOpen () error disappeared. (I'm using Utility because it doesn't load the kernel driver.)

Therefore, I think that kernel's CDC ACM (UART) driver and his CyGetGPIOValue (CyOpen) cannot be used simultaneously. Is it correct? If it is yes, what are the workarounds?

Thanks,
Tetsuo

0 Likes
TeMa_2997106
Level 6
250 replies posted 250 sign-ins 100 replies posted
Level 6

Meghavi-san,

Is there an update?

Thanks,
Tetsuo

0 Likes
Meghavi
Moderator
Moderator 100 replies posted 100 sign-ins 50 solutions authored
Moderator

Hi Tetsuo-san,

Apologies for the inconvenience. The CyOpen() API can not be used to communicate with COM port device. It can only be used to perform vendor-specific operations. Hence, the API is used when one of the interfaces of the device is defined as a vendor interface.

Regards

0 Likes
TeMa_2997106
Level 6
250 replies posted 250 sign-ins 100 replies posted
Level 6

Meghavi-san,

Thank you for your comment.
What I want to achieve is to use both UART and GPIO at simultaneously. If it can't use the API, how do I build it?

Thanks,
Tetsuo

0 Likes
Meghavi
Moderator
Moderator 100 replies posted 100 sign-ins 50 solutions authored
Moderator

Hi Tetsuo-san,

Can you please share the firmware source code with us? Also, please provide the details about SCBs and GPIOs you want to configure.

Regards

0 Likes