CY4532 USB Type-A devices connect to J9 on main board failed recognize connect /disconnect cable

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
Geromino
Level 5
Level 5
50 replies posted 25 replies posted 10 replies posted

my  setup

CLA  project  with boot    on CY4532 EVK  board

limitation :i dont have option to debug   because it is  not noboot project    i do not have option connect UART because all possible GPIO is taken by example

therefore  add  LED  to indicaton  status  USC TYPE A cable

on main board  j8 debug connector add LED on p2.1

on main  board  J9  connecting phone  the charge is  starting  but when i trying  to get info  from type a device  it failed

in callback timer  add  following code

                const bc_status_t* user_param;

                 user_param=bc_get_status(TYPE_A_PORT_ID);

                if (type_a_is_idle())

                {

                    WEIZ_DEBUG_PRINT(WZ_APP_EVENT_FLOW, "[%s] USB Type A connected Charge mode [%d] \r\n", __func__,user_param->cur_mode);

                    gpio_set_value (FW_LED_GPIO_PORT_PIN, false);

                }    

                else

                {

                    WEIZ_DEBUG_PRINT(WZ_APP_EVENT_FLOW, "[%s]USB Type A Disconnected \r\n", __func__);

                    gpio_set_value (FW_LED_GPIO_PORT_PIN, true);

                }

when i plugin  cable  expected  light  off   when unplug  the cable expected  light  on   it never happen

Q1 : what functionality need to add  to see plug/unplug changes on port A

0 Likes
1 Solution
Pranava_YN
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi,

The Pin 2.1 you are trying to use is being used by the EVK for other purpose. Can you please try using Pin 1.0 (Port 1 Pin 0) instead. Please note that using this pin might affect Type C port functionality and can just be used for verifying your condition. Pin 1.0 is also available from J8 debug connector.

Do let me know whether using this pin solved the issue.

Regards,

Pranava

Best regards,
Pranava

View solution in original post

0 Likes
2 Replies
Pranava_YN
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi,

The Pin 2.1 you are trying to use is being used by the EVK for other purpose. Can you please try using Pin 1.0 (Port 1 Pin 0) instead. Please note that using this pin might affect Type C port functionality and can just be used for verifying your condition. Pin 1.0 is also available from J8 debug connector.

Do let me know whether using this pin solved the issue.

Regards,

Pranava

Best regards,
Pranava
0 Likes

CY4532 EVK   contain  3  ports  USB-PD Type C (j10) which  support  also type A ( line DP0 and DM0 in main board schematics )

the  third one  is line DP1 and DM1   USB-PD type A  stand alone ( J9 )

CCG3PA Car Charger (CLA)   example  CCG3PA Car Charger (CLA) application implements a Type-C PD port controller as well as a Type-A port for charging 

first of all  thanks  for guide me to use P1.0   this  the only GPIO  i could use  for "Debug"    unfortunately  this pin  could  not  define as  UART tx  see datasheet definition (1 – P1.0 Port 1 pin 0: GPIO/UART_1_CTS/I2C_SDA_1[1] / TCPWM_line_0[2], Programmable SCP/OCP/OVP/UVP Fault indication)

Q1 : how  handle  with  type a   inside   port c type ?  how  can get info  from  this line (DP0 and DM0) such as plugin/out ?

Q2: i didnt  find  any real time  app callback for Type A (DP1 DM1) ) following function  used  only in app_init function  type_a_port_disable/enable  therefore i do  not  have any indication  of plugin/out in real time  also  about charge param  as

typedef enum{

    BC_CHARGE_NONE = 0,         /**< No active battery charging modes. */

    BC_CHARGE_DCP,              /**< Dedicated Charging Port as defined by BC 1.2 spec. */

    BC_CHARGE_QC2,              /**< QC2.0 charger. */

    BC_CHARGE_QC3,              /**< QC3.0 charger. */

    BC_CHARGE_AFC,              /**< Adaptive Fast Charging mode. */

    BC_CHARGE_APPLE,            /**< Apple power brick. */

    BC_CHARGE_CDP               /**< Charging Downstream Port as defined by BC 1.2 spec. */

}bc_charge_mode_t;

type_a_get_status  function   supposed  help get info from Type a  in real time  but  i dont  get any  info  when i plugin  to J9 my phone

please advice  how handle port a  stand alone in real time   and also type  which in type c   also in real time

0 Likes