So theres a bit of a stability problem, it doesn't affect the light output but when I turn up the LED current to a certain point the gate drive signal goes crazy.
I think I've established by watching the inductor voltage and changing the LED current that if the MOSFET turns on again while the inductor is still at high voltage and discharging into the output capacitors it causes a large spike as the excess voltage discharges through the MOSFET and its interfering with the MP4008 on the current sense pin which monitors current going through the MOSFET.
I put a 180Ω at 100MHz ferrite bead on the gate and current sense pins but the spike is still making it to the CS pin and causing it to become unstable.
I need to block this spike going to the CS pin somehow but my options are limited on the PCB, I tried a 10nF film from the CS pin to ground but it does nothing.
Green is the MOSFET Drain voltage and red is the spike at the CS pin, the spike is about 9v and gets wider as I increase the LED current:
