Forgot to mention that CMRR kinda matters, because the buck output (the CM) varies between 16 to 25V, and I do want to regulate current.
Reference and divider... (Grunting sounds.) Maybe a bidirectional amp to begin with would have been the right thing to do. I guess there is no easy, simple way out and I'm stubborn enough to really want to keep the cheap&simple BOM...
The software kludge is doing fine, it's just a bit... scary? To run the DC/DC without any current feedback for the first 15-20us, which basically equals the time from zero current to inductor saturation current in the worst case, although if it really was rising that fast, I guess the amp would come out of the saturation much faster in this case! So the harder I push it, the quicker I am in control, and I have hard time deciding how carefully I should do this.
I do have input and output voltage measurements, which I use to calculate the "theoretical" Vout/Vin duty cycle to PWM it with, adding some offset towards bigger on-time to make sure current's going in the right direction. And then I have a counter to give up if the ADC's showing near-zero current for too long. It's close enough so that the current doesn't get huge during this 20us, and no blown FETs so far with this scheme, but I don't like the software complexity and I'm already wasting 30% of the CPU time in two 330kHz interrupts calculating and limit checking things...
But thanks, I'll come up with something.