It depends on how your LEDs are controlled and how you feed the dim signal.
If, for example, one transistor is connected in series with each LED, this will lead to flickering at low duty cycles. To avoid this, take one constant current source per LED and short-circuit the LED with the transistor, which allows you to control the brightness between 0% to 100% without flicker. Disadvantage: the set current always flows per LED, only the LED voltage and thus the brightness is reduced to zero.
For brightness control, you can use one PWM channel per LED and transistor if you want to control all 36 LEDs independently.
Now you just have to find an STM32 with as many timers with PWM channels as you need for your 36 channels. And that is exactly what only the STM32H7 family can do at the moment, e.g. with the STM32H723ZG, with which 40 PWM channels can be realised (TIM1...5, TIM8, TIM12...17, TIM23...24).
I recommend using n-channel MOSFETs with a very low gate threshold as transistor switches, because they are directly 3.3V-compatible and their gate can be directly controlled by the PWM output.
Does it answer your question?
Regards
/Peter
In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.