API read USBPD_ADC2_SAR_CTRL/USBPD_ADC1_SAR_CTRL register ?

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

in  CCG3 Registers Technical Reference Manual (TRM).pdf 

i want read SAR_OUT [23:16]     value   ADC1 and ADC2  it is possible ?  

on CY4532  exk   in vbus_is_present function   add  follwing code

    #define ADC_SAR_OUT                 0x0FF00000

    #define ADD_USBPD_ADC1_SAR_CTRL     0x400A01A0 or  ADD_USBPD_ADC1_SAR_CTRL     0x400A01A8

    uint32_t usbpd_adc1_sar_out;

    usbpd_adc1_sar_out = *(__IO uint32_t*) (ADD_USBPD_ADC1_SAR_CTRL)&ADC_SAR_OUT;

i get  zero   expected  to receive  5v  or  any request from device to be charged  any advice ?

0 Likes
1 Solution
Abhilash_P
Moderator
Moderator
Moderator
50 likes received 500 replies posted 250 solutions authored

Hii zapa_4702046

          Can you confirm like which board you are working on exactly to access the Vbus voltage value??

Since CY4532 is not CCG3 and the register values which you have mentioned is for CCG3 and not CY4532.

You are referring TRM of CCG3 to access registers of CCG3PA.

TRM of CY4532 which is a CCG3PA is not available on the web. You need to contact local sales for the same.

And can I know why you want to read the register values?

You can use pd_adc_sample () which has the same implementation.

And you can obtain the measured value directly from the API.

Regards

Abhilash P

View solution in original post

1 Reply
Abhilash_P
Moderator
Moderator
Moderator
50 likes received 500 replies posted 250 solutions authored

Hii zapa_4702046

          Can you confirm like which board you are working on exactly to access the Vbus voltage value??

Since CY4532 is not CCG3 and the register values which you have mentioned is for CCG3 and not CY4532.

You are referring TRM of CCG3 to access registers of CCG3PA.

TRM of CY4532 which is a CCG3PA is not available on the web. You need to contact local sales for the same.

And can I know why you want to read the register values?

You can use pd_adc_sample () which has the same implementation.

And you can obtain the measured value directly from the API.

Regards

Abhilash P