How to connect USB to CY8C4247AZI - L485

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

cross mob
RuGl_1600761
Employee
Employee
25 replies posted 25 sign-ins 10 replies posted

I like to use this device running an USB - HID profile. According datasheet Pin 13.1 (D-)  13.0(D+) and P13.2 VBUS (5V from USB?). Datasheet of USB tells me that I also have to assign VBUS to P0.0 ..(for 4200L devices). For me this is all not clear how to wire. It would be very great if your datasheet hold a schematics of all possible scenario.. how to connect. Pease assist !!

I like to run it as self powered, Not Bus powered. Please tell me the exact setting in USB configuration, and how to wire... what to connect where and how, Thanks.

rgl
0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello @RuGl_1600761 

We have USB code examples for PSoC 4L. All the code examples foe PSoC 4L kit are available at this link: https://www.cypress.com/documentation/development-kitsboards/cy8ckit-046-psoc-4-l-series-pioneer-kit

You can download the code examples from the above link. The set of code examples also contains one USB Mouse code example which uses self powered configuration, you can refer to this example and make similar settings.

For self powered configuration you need to ensure the following:

1.  Under the Configuration descriptor device power is set to self powered

Ekta_0-1614756509179.png

 

2. 

Ekta_1-1614756606796.png

 

As shown in the above image, you can use the VBUS power pad option – This option is only applicable for PSoC 4200L devices. The USBFS Component uses the VBUS power pad to return the VBUS status through the USBFS_VBusPresent() function. This option allows you to save GPIO pins using a dedicated power pin instead.

I am attaching the USB_Mouse code example for psoc 4l along with this post.

In case the issue persists, kindly attach you project so that we can have a look at it.

Best Regards

Ekta

View solution in original post

0 Likes
5 Replies
RuGl_1600761
Employee
Employee
25 replies posted 25 sign-ins 10 replies posted

in addition: I already assigned P0.0 to a different functonality and the pcb is finished. Do I really need this connection? Is there a solution witout P0.0?

rgl
0 Likes
RuGl_1600761
Employee
Employee
25 replies posted 25 sign-ins 10 replies posted

I tried a lot using P0.0 connected to vbusdet by a resistor divider in parallel to VUSB and the USB supply....and tried all tried all avaliable VUSB monitoring poaaibilities.... but control flow always stop here

while(USBFS_1_bGetConfiguration() == 0x00)
{
/* Waiting for device to be configured */
}

What is missing ???  It is really sad...

 

rgl
0 Likes
lock attach
Attachments are accessible only for community members.
RuGl_1600761
Employee
Employee
25 replies posted 25 sign-ins 10 replies posted

the code for USB HID I got from cypress AE. It runs on psoc5 CY8CKIT - 059 (psoc5) but I have to shift to a psoc4 as described.

rgl
0 Likes
lock attach
Attachments are accessible only for community members.
Ekta_N
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello @RuGl_1600761 

We have USB code examples for PSoC 4L. All the code examples foe PSoC 4L kit are available at this link: https://www.cypress.com/documentation/development-kitsboards/cy8ckit-046-psoc-4-l-series-pioneer-kit

You can download the code examples from the above link. The set of code examples also contains one USB Mouse code example which uses self powered configuration, you can refer to this example and make similar settings.

For self powered configuration you need to ensure the following:

1.  Under the Configuration descriptor device power is set to self powered

Ekta_0-1614756509179.png

 

2. 

Ekta_1-1614756606796.png

 

As shown in the above image, you can use the VBUS power pad option – This option is only applicable for PSoC 4200L devices. The USBFS Component uses the VBUS power pad to return the VBUS status through the USBFS_VBusPresent() function. This option allows you to save GPIO pins using a dedicated power pin instead.

I am attaching the USB_Mouse code example for psoc 4l along with this post.

In case the issue persists, kindly attach you project so that we can have a look at it.

Best Regards

Ekta

0 Likes

Hi Ekta,

thanks again for your reply. I have to use a generic USB. From the information I could find in various documentation it was hard for me to get this part running and in the end I could not find the error which gives me not a good feeling. I always like to understand the problem to be able to fix it if it comes again. I could fix the error only by copy and paste…Since Friday I tried to get it working and send several posts to the community and today I get the first response. It would be great to have a faster response. For me there is some room for improvement in the documentation.

Best Regards

RuGl

rgl
0 Likes