cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

New Contributor II

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
Reply
1 Solution
Moderator
Moderator

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
Moderator
Moderator

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
Reply
New Contributor II

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
Reply
Moderator
Moderator

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
Reply
New Contributor II

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
Reply
Moderator
Moderator

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