Hi All,
first thank you for the replays.
on the sketched circuit that i attached is a buck-boost controller that already has integrated averaging current sense limit ( LM5176), the controller is sensing with ISNS pins and when the current limit occurs the controller pulls down SS pin, but this is fixed and doesn't depend on input voltage ( or in my case constant input power).
So the idea is to replace the miliohm sense resistor RSNS with a circuit so i can adjust (the let say it so) RSNS with a DAC ( I will also measure with ADC the input voltage in order to know what max current can i have that meets the power limit, this is controlled with MCU)
1) Do maybe some one have an idea?
2) In the mean time i got a proposed circuit from TI, but it uses a lot of components and i' not shore how it works, please look attached file, and if you have time or understand how it works please comment
BR.