Mppt-2420-hc current measurement

Hey what a great project!
I’ve been digging a bit into the schematic and the firmware of mppt-2420-hc and have a small question regarding the implementation of current measurement: Why was the shunt resistor placed between the main inductor and the big caps? In case only the averaged current is of interest, wouldn’t placing it after the junction inductor <> caps lead to a cleaner signal, potentially getting rid of PWM / sampling rate effects? Likely I am missing sth. would be glad for your insights,
Thanks!

If your current measurement bandwidth is fast enough, you can do interesting things like cycle-by-cycle current limiting with the shunt in that location. We did that in a different project with very similar hardware (different current sense amplifier and the pin-compatible STM32G474) to have a fully software-controlled DC/DC converter with overcurrent protection (using the MCU’s built-in comparators).

You are right, for the MPPT solar application one could also place the current sensor at the other side of the caps.