CCG3PA debugging ability Peripherals and PD stack

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
lock attach
Attachments are accessible only for community members.
Geromino
Level 5
Level 5
50 replies posted 25 replies posted 10 replies posted

FW customize CCG3PA Car Charger (CLA)   example PSoC   creator 4.2  

  • CY4532 EVK Board   
  • Main board jumper j2/3/4/5 short 1 2 j6 short 2 3
  • Power board j14 short  
  • Miniprog3 connected 
  • CY4532 connect with type to BCR CY4533
  • Enable SWD interface in system tab

Step 1: Preparation FW customize CCG3PA Car Charger (CLA)   example PSoC   creator 4.2  

  1. Disable in stack_params.h define CCG_TYPE_A_PORT_ENABLE  (0u)
  2. disable page type a
  3. enable SWD interface  in system tab

Operation Debug mode: add breakpoint in these three case in app event handler

APP_EVT_TYPEC_ATTACH

APP_EVT_DISCONNECT

APP_EVT_PD_CONTRACT_NEGOTIATION_COMPLETE

When check above cases: plugin/plug out USB type c cable the debugger response correctly and stops and these points

note1 : after programming and debugging CCG3PA Car Charger (CLA)   example  it failed read device config  via ez pd configuration utility  there for I need programing via PSoC programmer CYPD3171-24LQXQ_cla_3_4_0_2274_0_0_0_pa.hex from C:\Program Files (x86)\Cypress\EZ-PD CCGx Power SDK\CCGx\Firmware\binaries\CYPD3171-24LQXQ_cla

This issue was discuses by me in community but never get any response

Attached original_cla.c   represent config.c   configuration table

Q1 :product type  in the begging "type unknown"  I change it  to UFP-AMA  it  is necessary  if yes what is  the meaning ?

Step 2:  Minimum FW customize CCG3PA Car Charger (CLA)   example PSoC   creator 4.2

 

EZ PD configuration utility

  • edit  5 PDOs  as follow fix type 5,9,12,15,20 volt attached screen shoot 
  • generate  ams_cla.c file  which will be copy to config.c  file

Then operate again Operation Debug mode:  add breakpoint in these three case in app event handler

APP_EVT_TYPEC_ATTACH

APP_EVT_DISCONNECT

APP_EVT_PD_CONTRACT_NEGOTIATION_COMPLETE recognize  each change on BCR  SW switch ( 1-5 )  change voltage request

Step 3: elaborate FW customize CCG3PA Car Charger (CLA)   example PSoC   creator 4.2

  • Selector device CYPD3171
  • Add SW_Tx_UART  pin  p1.2  ( TP13 )
  • connect LED on pin p2.3 see  attached image  ( j8 header ) toggle 1 sec

#define APP_FW_LED_ENABLE (1u)

#define FW_LED_GPIO_PORT_PIN (GPIO_PORT_2_PIN_3)

  • add debug print via  SW_Tx_UART   in app.c

APP_EVT_TYPEC_ATTACH

APP_EVT_DISCONNECT

APP_EVT_PD_CONTRACT_NEGOTIATION_COMPLETE

  • during run time  when j6 short 1 2   all  work ( LED toggle , UART print to TeraTerm see attached  files  ) 
  • during  debug session LED  and UART does not work  also  by adding break point  on above cases in app.c   no response after   connect or disconnect type c cable 

Step 4:  Minimum FW customize CCG3PA Car Charger (CLA)   example PSoC   creator 4.2

  1. Device selector  ->  CYPD3175 ( custom design )

The device enter to Deep Sleep state

/*******************************************************************************

* Function Name: CySysPmDeepSleep

****************************************************************************//**

*

* Puts the part into the Deep Sleep state. If the firmware attempts to enter

* this mode before the system is ready (that is, when

* PWR_CONTROL.LPM_READY = 0), then the device will go into the Sleep mode

* instead and automatically enter the originally intended mode when the

* holdoff expires.

*

* The wakeup occurs when an interrupt is received from a DeepSleep or

* Hibernate peripheral. For more details, see a corresponding

* peripheral's datasheet.

*

*******************************************************************************/

Q2:  corresponding peripheral's datasheet   could you provide it?

     Q3 : CCG3PA Car Charger (CLA) example  could run on CYPD3175  only by changing device "device selector " in        PSoC 4.2 ?

     Q4 : it is possible  to replace  CYPD3171 to CYPD3175  on EVK CY4532  ?

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

Response to the queries

Best regards,
Pranava

View solution in original post

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

Hi,

Q1 :product type  in the begging "type unknown"  I change it  to UFP-AMA  it  is necessary  if yes what is  the meaning ?

>> Sometimes the Configuration Utility displays "type unknown" but the device is anyway connected. You can try reading the Configuration from the Utility and check if the Configuration is being read properly.

Q2:  corresponding peripheral's datasheet   could you provide it?

>>  Peripherals in the function description refers to GPIOs, Serial Communication Blocks, CC pins and Timers that can wake up device from deep sleep. In case you are asking this to enable or disable deep sleep mode, please refer to SYS_DEEPSLEEP_ENABLE flag present in config.h file. You can find description in Compile time options section of SDK User guide.

Q3 : CCG3PA Car Charger (CLA) example  could run on CYPD3175  only by changing device "device selector " in        PSoC 4.2 ?

>> Yes, you just have to change device as well as bootloader setting in bootloadable component in the project.

Q4 : it is possible  to replace  CYPD3171 to CYPD3175  on EVK CY4532  ?

>> Yes, but please note that only CCG3PA CLA project (With the above mentioned modification) can be run on the modified hardware. Please DONOT attempt to program any other firmware with this setting.

>> Regarding Debugging Issue, can you please mention the baud rate at which UART is operating and also try printing with a lower baud rate. Also please add breakpoints in the conditions mentioned after the print.

If you can share the Project it will be easier to debug the issue from our side.

Regards,

Pranava

Best regards,
Pranava
0 Likes
lock attach
Attachments are accessible only for community members.

Hi Pranavay , first of all thanks for all  info

Summery :

step 1

still  error  reading device config  after programming  CCG3PA-Car-Charger-CLA

GitHub - Geromino/CCG3PA-Car-Charger-CLA-   clone project  (  if there any issue  clone project  let me know ! )

CCG3PA-Car-Charger-CLA-/Documents && History please refer Q1 and Q2

1)  Customized CCG3PA Car Charger_0A Jul 17 2020.docx

2)  attached  reading_falied_adter debugging with car chargder FW.png

step 2: NA

step 3:

customization  FW  with Peripherals  working

after "update components"  5.8 version  in PSoC 4.2  in both project ( noboot  ) then debug started working with FW  on GitHub

step 4:

finally  update bootloader_1 in charger car  project  and select device CYPD3175   the debug  working  fine thanks

C:\Program Files (x86)\Cypress\EZ-PD CCGx Power SDK\CCGx\Firmware\projects\CYPD3175-24LQXQ_pa_direct_fb\CYPD3175-24LQXQ_pa_direct_fb.cydsn\Bootloader\CYPD3175-24LQXQ_cc_src_boot_3_1_2_1484_0_0_0_pa.

C:\Program Files (x86)\Cypress\EZ-PD CCGx Power SDK\CCGx\Firmware\projects\CYPD3175-24LQXQ_pa_direct_fb\CYPD3175-24LQXQ_pa_direct_fb.cydsn\Bootloader\CYPD3175-24LQXQ_cc_src_boot_3_1_2_1484_0_0_0_pa.elf

step 4 : working  the issue was update bootloader_1 component (  i think )   thanks again

note  i reduce baud of UART to 9600 may be could be more faster  but for purpose debug it is ok ( in the future we will connect to  BLE5 with AT commands  )

0 Likes
lock attach
Attachments are accessible only for community members.
Pranava_YN
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi,

I am attaching the response to your queries in document Customized CCG3PA Car Charger_0A Jul 17 2020.docx. 

Please do let me know if you have any other issues.

Regards,

Pranava

Best regards,
Pranava
0 Likes
lock attach
Attachments are accessible only for community members.

Response to the queries

Best regards,
Pranava
0 Likes