Requesting Assistance with LVGL, LED Control, and PWM Implementation


I hope this message finds you well. I am seeking assistance and guidance for a project involving the implementation of LVGL (UI) to control LED indicators and PWM functionality. I have outlined my objectives and encountered challenges below, and I would greatly appreciate your support and expertise.


Build a board with LVGL for controlling LED indicators and implementing PWM for LCD dimming and a servo motor.
PWM Requirements:

PWM cycle period: 333Hz
PWM resolution: 4096 levels
Challenges Faced:

Limited control range with analogWrite():

The range is limited to 0-255, which restricts the level of change and pulse frequency control.
Resolution limitation with the threads library:

The shortest period achievable is 1 ms, which affects PWM resolution (motor movement steps and brightness steps).
Interference from indev (touch input) on timer interrupt-based PWM:

PWM is influenced by indev, causing blinking LEDs. Is there a way to reduce or isolate this interference?
Request for Input:

How can we overcome the limitations of analogWrite() and achieve finer control and frequency accuracy?
Is it possible to utilize the timer interrupt method for precise resolution and accurate frequency performance?
I would greatly appreciate any insights, suggestions, or comments you can provide regarding these challenges. Your expertise and guidance will be invaluable in helping me achieve the desired functionality.

Thank you kindly for your time and support. I look forward to your response.

Best regards,