CyUSB3065 GPIO problem

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

cross mob
jawu_4351971
Level 3
Level 3
25 replies posted 10 replies posted 5 replies posted

I want to configure GPIO20,to output High or Low level,but CyU3PDeviceConfigureIOMatrix return a CY_U3P_ERROR_BAD_ARGUMENT error code.

I don't know why, Does not GPIO20 is not a general purpose IO?

pastedImage_0.png

0 Likes
1 Solution

EDITED FOR BETTER UNDERSTANDING

Hi,

You can override GPIO[20] and use it.

Overriding GPIO[20] won't interfere with the working of MIPI/GPIF block


Regards,
Yashwant

View solution in original post

5 Replies
YashwantK_46
Moderator
Moderator
Moderator
100 solutions authored 50 solutions authored 50 likes received

Hi,

You will fristly need to override the GPIO and then configure it based on the picture below.

gpio_override.PNG

LED_CTS is declared as a name for GPIO[20] and is configured as above. You can use any name for declaration.

If you use the above method, you won't need to change the io_cfg.gpioSimpleEn[0] and can be set to 0.

Regards,

Yashwant

0 Likes

thanks for your reply,I want to know more, what's the second function of GPIO20?because I want to know why must I to overwrite it?

Do you have a datasheet to describe it?

thank you!

0 Likes

Hi,

Please refer to the following Cypress Community Thread: Using GPIOs 17 to 20 on CX3


Essentially the GPIO's 17-20 need to be overridden manually as they are shared between the firmware control and GPIF state machine control.

This information is not included in the CX_TRM currently. It will be revised and added soon to it.

Regards,

Yashwant

0 Likes

Hi:

    thanks for you reply, Now in my project, I will use UVC and in the UVC I have seen the example code in the firmware,there will be use GPIF. Can I use UVC if GPIO20 is override?

0 Likes

EDITED FOR BETTER UNDERSTANDING

Hi,

You can override GPIO[20] and use it.

Overriding GPIO[20] won't interfere with the working of MIPI/GPIF block


Regards,
Yashwant