# CC/CV mode of Buck Converter used for Battery Charging

I was trying to understand the CV/CC charging of the battery using a buck converter. I came across this website, where it described the addition of sensor resistors to measure current and get the reading in voltage using op amp and send it as feedback. https://www.ti.com/lit/an/snva829/snva829.pdf

I have a couple of questions regarding its implementation

1. I have closed-loop DC to DC voltage regulator working, can I use voltage obtained from measuring current in the load as feedback and control the DC to DC converter?
2. If I use current sensor feedback voltage, how does the buck converter will be controlled to keep constant current at the output with varying voltage in constant current mode?

I couldn't find good material explaining the control block diagram of the whole system, so didn't understand it. Could someone please help me with that?

Above is a typical configuration for two ORed op-amps with two different reference voltages. A 2.5-V source for the CV and a much lower value, e.g. 100 mV, for the current sense (you want a low-value shunt resistance). When the CV op-amp takes the lead, e.g. with an output current less than the CC value, the $$\D_V\$$ diode conducts and drives $$\V_{err}\$$. Because the current is below the CC level, op-amp CC rails up and thus $$\D_I\$$ is blocked. When you now reach the CC target and $$\V_{out}\$$ starts dropping, $$\D_V\$$ blocks and $$\D_I\$$ conducts with the CC op-amp taking the lead.