Thanks to all your ideas, and I'm open in all directions.
Here is what the amplifier specifically needs to do:
- drive complex loads down to 1 milliOhm
- source current into load and sink current from it
- DC 0.0 to 30V
- sinusodial AC of 1mV to 5V (at least, better full range) and 1mHz to 50kHz
- current is +/- 5A
It is a device meant for DIYers, so every penny counts to keep the BOM cost in a reasonable region.
I'll tell more about this in this forum soon. At the moment I need to stay fuzzy as this something that is new to the market and I don't want our Chinese copier friends to be faster than me. It's maybe interesting to mention that such instruments exists in the professional segment, starting at USD8000.
Does the output have to be fixed-frequency PWM or is delta-sigma modulation acceptable too? 16bit equivalent @ 1MHz toggle rate is easily achievable.
That's an interesting idea, but without calculating it my intuition tells me that I can't get 16 bits for a 50kHz signal from a 1MHz bitstream. My sigma delta ADCs achieve just that but run at 20MHz.
16Bit SPI @ 50MHz would do that for you, you can use up to 8 words as your PWM duty cycle, also it's free in your STM32.
Also you can use circular DMA to free update the PWM 
The SPI itself is not my problem, that's running well. Although I can't use DMA for it, because the STM32's SPI block does not allow me to insert adjustable pauses between packets. I ended up doing the (integer) waveform calculations and SPI feeding in an interrupt at 900kHz. The microcontroller is surprisingly powerful and only needs 10% of its time for all that.
Why aren't you using a class-D audio amplifier chip?
The Class D amplifier mentioned above, is probably the nearest to Serial IN, (i2s) to PWM out.
I actually have one in service in my proof-of-concept build, a Hypex UcD180HG. These use a hysteretic approach that should theoretically have less problems driving my low impedance load. I don't see any instability, which is good, but it a) introduces significant nonlinearity at lower frequencies, and b) it is designed for a symmetrical supply. The latter causes issues when sinking load current, ending up in the need of having dissipative supply voltage limiters even when it is sourcing current. The solution needs to run from a single supply and be able to operate down to the negative rail. And all class D amps that I have looked into have classic output stages with switching deadtime, and that is a linearity killer for power stages operating in two quadrants. If my concept turns out to be working, then it will almost completely eliminate that (at the expense of higher idle current). I'm actually thinking of making a later spin off in form of a high end audio amp :-)
Another approach could be to take a standard SMPS, which has a ramp/comparator built in, and control the DC and AC sides separately.
A high resolution DAC sets DC levels, and then a scaled modulator DAC can set the AC modulation.
If the AC is always small, you can use a DC SMPS for the main DC control and then a linear regulator (which has low voltage drop & thus tolerable? power loss) for the AC modulate.
The method of PCB.Wiz also seems like a good approach to me. Generate the DC level with a regular power supply and provide the AC part using a seperate path. A transformer could to the job and this also provides a way to step the AC voltage down. For example: using a class-D amplifier to drive a 10 to 1 transformer gives a lot of dynamic range for small signal levels. A suitable transformer would be a gap-less one intended for building a forward converter. These are standard off-the-shelve parts from Coilcraft or Wurth (and probably others as well).
My requirements don't allow that, as the AC isn't always small. But I might end up with a hybrid approach if I can't get a single output stage to meet my requirements, like having a low resolution class D power stage tied to a second high resolution / low voltage "servo" class A amplifier. But that could make the solution unaffordable for its target audience.