XMC4400: BUCK_PCC_FIX_FQ: how to use 'gain'

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

cross mob
jsmith678x
Level 4
Level 4
100 sign-ins 25 replies posted First solution authored

Dear Support,

I'm trying to work with the BUCK_PCC_FIX_FQ Dave App components on XMC4400. I'm trying to choose Vout = 6V.

I assume I have to use a gain factor because Vout is over 3.3V. I found 'Divider ration/gain' in the ADC Measurement tab. Maybe I have to use this but I'm not sure.  I've downloaded the BUCK_PCC_FIX_FQ_EXAMPLE_XMC42 example because it is fully configured. I've searched 0.79295 (this value is in the Vout edit box) in the C files and I found

.gain_vout = 0.79295f,

in    const BUCK_PCC_FIX_FQ_CONFIG_t BUCK_PCC_FIX_FQ_0_config

However when I search for gain_vout , no hit for using this. It seems this variable not used. So what to do when Vout > 3.3V .

 

 

0 Likes
1 Solution
psb
Moderator
Moderator
Moderator
250 sign-ins 25 solutions authored 100 replies posted

@jsmith678x , 

  • To have an output voltage of 6V, set the Vout ref[V] value in the buck converter configuration tab as 6V. 
    psb_0-1655207246083.png
  • vout_gain is basically the gain of the hardware circuit or rather the divider/gain ratio, and the control loop is written in a way that it computes the duty ratio directly from the ADC digital value.
  • The digital value of ADC is seen under the variable v_out. The value of this variable is (actual vout*gain_vout/varef), where actual vout is the actual value of the output voltage, gain_vout is the divider/gain ratio of the signal conditioning circuit, varef is the voltage used by the SAR of the ADC to convert into digital. 
  • The value of v_out variable is basically the digital output of the ADC and is used in the closed loop control. 
Best Regards,
Sai

View solution in original post

0 Likes
5 Replies
lock attach
Attachments are accessible only for community members.
psb
Moderator
Moderator
Moderator
250 sign-ins 25 solutions authored 100 replies posted

Hello @jsmith678x , 

     Thanks for posting on the Infineon Community. 

     The value of the ADC gain is given based on the evaluation board. Request you to change the value of gain as per your hardware design in the XMC Digital Power Explorer kit.

To make changes as per the hardware designed as done by you, change the Divider ratio/gain in the ADC Measurement block in the user interface (BUCK_PCC_FIX_FQ_0.ui) and generate the code. The variable .gain_vout changes after generating the code from apps. Kindly verify that once the code is generated after updating in the apps. 

Kindly refer to the  document Readme_BUCK_PCC_FIX_FQ_EXAMPLE_XMC42.pdf available in the BUCK_PCC_FIX_FQ_EXAMPLE_XMC42 example .

Apologies for the delay in response and thanks for your patience !

Best Regards,
Sai
0 Likes
jsmith678x
Level 4
Level 4
100 sign-ins 25 replies posted First solution authored

Maybe regenerated but never used

jsmith678x_0-1654504517201.png

 

0 Likes
psb
Moderator
Moderator
Moderator
250 sign-ins 25 solutions authored 100 replies posted

This variable .gain_vout is not updated even after generating the code by changing the Divider ration/gain term in ADC Measurement ? 

Best Regards,
Sai
0 Likes
jsmith678x
Level 4
Level 4
100 sign-ins 25 replies posted First solution authored

Updated.

 

But the problem is how it is working.. when no reference to this variable?

0 Likes
psb
Moderator
Moderator
Moderator
250 sign-ins 25 solutions authored 100 replies posted

@jsmith678x , 

  • To have an output voltage of 6V, set the Vout ref[V] value in the buck converter configuration tab as 6V. 
    psb_0-1655207246083.png
  • vout_gain is basically the gain of the hardware circuit or rather the divider/gain ratio, and the control loop is written in a way that it computes the duty ratio directly from the ADC digital value.
  • The digital value of ADC is seen under the variable v_out. The value of this variable is (actual vout*gain_vout/varef), where actual vout is the actual value of the output voltage, gain_vout is the divider/gain ratio of the signal conditioning circuit, varef is the voltage used by the SAR of the ADC to convert into digital. 
  • The value of v_out variable is basically the digital output of the ADC and is used in the closed loop control. 
Best Regards,
Sai
0 Likes