I want to use an EPS8266 to control 2 MOSFETs. The first MOSFET will be a switch to control the input power to a buck converter module. For the second one, I will be using analogWrite() to PWM control a 10W LED (the load of the module). I also wanted to manually speed up the function so the PWM was at a higher frequency, removing the possibility of any faint flickering. But then I realised that doing this may create, or worsen, a problem.
I want to know whether this setup would work. I think the first MOSFET should be fine, but I wasn't sure about the second one, the one that controls the brightness of the LED. Would switching the load on and off (through the use of analogWrite()) at such a fast speed affect the voltage of the buck converter? Would the voltage regulation of the module be fast enough to keep up with the switching of the MOSFET? If the buck converter is not fast enough to keep up with the switching of the microcontroller, that would make the voltage output of the buck converter unsteady, right? If this is the case, what sort of effect could it have on the LED?