Hello all !
After watching a lot of Dave's videos on the µSupply and on his Dummy constant current load, I finally decided to get my hands dirty.

I did a small constant current load on a breadboard (the schematics are attached to the post).
I had some
STM32F4 Discovery board (based on the STM32F407vg) laying around, which was perfect, they have mutiple ADC, and some nice timer able to generate some PWM.
I choosed the value of 0.33? for the RSENSE because I wanted my microcontroller to read the value up to ~9Amps (the ADC goes up to 3V max).
And the filter right after the PWM is just for test at the moment, but has a cut off frequency of 500Hz (the PWM has a frequency of 20kHz).
And the issue is that the value
the ADC gives me is a bit off from the actual value (which I measure using a Fluke 189) which is annoying specially when the load is taking 3 amps and the micro tells me "2.8 amps".
So I though, I should increase the number of samples, and then apply an average filter (I get a value averaged every 8ms ~125 Hz)
But the error remain.
Also I configured the pin internally without any "pull up / pull down".
Would it be useful if I added an OP Amp as a buffer between the ADC and the RSENSE ?
TLDR : Have a shunt resistor getting 3 amps and the ADC connected to it give me a value close of it with an error.
I'm a bit out of idea here, if you have any advice it would be great.