USB Type-C cable orientation control bit

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
dapec_2892156
Level 1
Level 1
First like given

We are using the CCG4M USB Type-C controller chip CYPD4155-96BZXI. I would like to control a pin's output state based on the orientation the USB Type-C cable is connected (Plug Orientation/Cable Twist Detection). Initially I just want to control a couple of LEDs, in the end I need to control a MUX. Could you please point me to which area (line of code, file or set of files) within the SDK I should look into to insert logic to control a pin?

0 Likes
1 Solution
ShifangZ_26
Moderator
Moderator
Moderator
10 likes given 250 sign-ins 1000 replies posted

Hi ,

Recommend you refer KBA: Build CCG4M Project Using CCG4 Project in SDK 3.0.1 and Later Versions – KBA219845

Type-C orientation:

/**

* @brief Get the CC polarity of the Type-C connection.

* @param port Port index.

* @return Returns 0 if CC1 is used, and 1 if CC2 is used.

*/

uint8_t dpm_get_polarity(uint8_t port);

Control a couple of LEDs: Search "APP_FW_LED_ENABLE" in the whole project, you can find the LED example with timer.

Best Regards,

Lisa

View solution in original post

0 Likes
1 Reply
ShifangZ_26
Moderator
Moderator
Moderator
10 likes given 250 sign-ins 1000 replies posted

Hi ,

Recommend you refer KBA: Build CCG4M Project Using CCG4 Project in SDK 3.0.1 and Later Versions – KBA219845

Type-C orientation:

/**

* @brief Get the CC polarity of the Type-C connection.

* @param port Port index.

* @return Returns 0 if CC1 is used, and 1 if CC2 is used.

*/

uint8_t dpm_get_polarity(uint8_t port);

Control a couple of LEDs: Search "APP_FW_LED_ENABLE" in the whole project, you can find the LED example with timer.

Best Regards,

Lisa

0 Likes