Change in operating mode

Announcements

Live Webinar: USB-C adoption. Simple & Cost-efficient solutions | April 18th @9am or 5pm CEST. Register now !

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

cross mob
DvSh_4663776
Level 1
Level 1
5 replies posted 5 sign-ins First reply posted

Hello!

I have the cy4531 ez-pd ccg3 evaluation kit.
I wanted to know if there is a possibility to use it to work in this way:
To type C I connect a tablet, and to type B I connect a mouse (for example), then when the power supply is connected, the tablet will charge, and when the power supply is disconnected - the mouse will get its power from the tablet battery?

0 Likes
1 Solution
Sananya_14
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello,

The USB Type-B port on the CY4531 EVK is meant for connecting to a host which would provide VBUS. So to connect to a mouse on the connector, 5V should be derived from the DC supply if the tablet is a sink, or the Type-C VBUS if the tablet is a source, and be provided to the USB3_VBUS pin of the USB 3.0 connector for the mouse to enumerate. Since the data role is determined by PD, DR_Swap should be issued as per the tablet's role to make CCG3 a UFP.

Please also note that the EVK doesn't support DP Sink so alternate mode in the MUX should be disabled for only USB communication.

Best Regards,
Sananya

View solution in original post

0 Likes
11 Replies
Sananya_14
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello,

The USB Type-B port on the CY4531 EVK is meant for connecting to a host which would provide VBUS. So to connect to a mouse on the connector, 5V should be derived from the DC supply if the tablet is a sink, or the Type-C VBUS if the tablet is a source, and be provided to the USB3_VBUS pin of the USB 3.0 connector for the mouse to enumerate. Since the data role is determined by PD, DR_Swap should be issued as per the tablet's role to make CCG3 a UFP.

Please also note that the EVK doesn't support DP Sink so alternate mode in the MUX should be disabled for only USB communication.

Best Regards,
Sananya

0 Likes

Thank you so much for your prompt reply!

Can I make all these changes through the EZ-PD Configuration Utility?

0 Likes

Hello,

For the 5V on USB3_VBUS pin , you would have to make a hardware change.

To handle the role, you would have to add the DR_Swap request in the firmware as per the current tablet role.

Alternate mode can be disabled through the EZ-PD Configuration utility and firmware.

Best Regards,
Sananya

0 Likes

Thank you!
I try, but can not figure out how to control the state of the table whether it is source or sink.
I connected the circuit as described in the attached picture.
Will be happy to understand how to control the status of the tablet, and if there is a particular configuration in which to connect the circuit in addition to the connection I made, get information about it.
Thank you
Dvir

connection.png

0 Likes
Sananya_14
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello,

To set the role based on connected power supply, you could set CCG3 Port Role as DRP in the configuration and based on the connected DC supply, it will act as source or sink for the tablet. You could verify the role in the main() in the firmware and send a DR_Swap request to make it UFP as shown in the example below.

if ((dpm_get_info(port)->contract_exist) &&(dpm_get_info(port)->cur_port_type == PRT_TYPE_DFP) )
{

   dpm_pd_command (port, DPM_CMD_SEND_DR_SWAP, NULL, NULL);

}

Please ensure 5V is present at the connector in both cases before checking for the device enumeration on the tablet.

Best Regards,
Sananya

0 Likes

Hello!
I added the code to main, changed the hardware and changed the configuration so that it would be in DRP mode.
The mouse works and there is communication between it and the tablet both when the power supply is connected and when it is not connected. But the tablet does not charge when the power supply is connected.
Is there anything else I need to change for this?

Best Regards,
Dvir

0 Likes
Sananya_14
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello Dvir,

Thanks for the update. Please provide the PD logs using an analyzer such as CY4500 when the power supply is connected to the board. You could also try changing the CCG3 configuration to Source only and test if the tablet is able to charge for this case.

Best Regards,

Sananya

0 Likes

Thanks Sananya for the quick response!

I do not have an analyzer yet. When I changing the CCG3 configuration to Source only the tablet is able to charge, but then there is no communication between the tablet and the mouse.

0 Likes
Sananya_14
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello,

It could be possible that the CCG3 is not sending the DR_Swap request as expected and the mouse is enumerating on the tablet whenever CCG3 is a UFP, sink by default. It would be helpful to check the PD messages using an analyzer to understand the messaging sequence.

Best Regards,
Sananya

0 Likes

I understand.
Maybe there is a particular location where you should put the code you sent me before in the main?

0 Likes
Sananya_14
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello,

You could put the code snippet in the while(1) loop (after all the task functions) in main(), and set a retry limit in case the request is rejected by the tablet.

Best Regards,
Sananya

0 Likes