how to control constant current led driver output with pwm?
please help me


I have some concerns about the current limit circuit (based around the BC337 / R2) and its ability to work with PWM - every time the pulse goes high from U3 (initiating a current flow through the MOSFET), the voltage developed across R2 will activate the BC337 and clamp the drive voltage to the MOSFET. This means the MOSFET will get quite warm because it is operating as a current limit device.

Added to this you are trying to control the LED current via PWM BUT the BC337 circuit is also trying to limit the current. It doesn't look like it should work as you expect.

When you say the LED starts blinking, what is your PWM frequency?

Given the circuit you have I also have concerns about possible high voltages from the LED string being capacitively coupled (through the MOSFET) back to an IO pin on your MCU. Maybe protection diodes would help.