Skip to content

Conversation

@alblib
Copy link

@alblib alblib commented Sep 7, 2025

Original implementation did not work because

  1. The implementation did not respect LED driver LV52204MT chip specification. It needed to prevent to enter digital mode but keep it in pwm mode, but the original implementation did not make it go into pwm mode. Also, it had too long tick time (2ms) which is well beyond proper on-time of pwm mode and can make the chip shutdown or turn on mode.
  2. As the tick was too long, it did not work in most of range (10~100), and at the value 10, it blinked so much so very unpleasant to watch. I had to shorten but not too shorten the tick time to work properly, and I also implemented PDM so make eye comfortable as well as the led driver chip misunderstand the intension.

@CLAassistant
Copy link

CLAassistant commented Sep 7, 2025

CLA assistant check
All committers have signed the CLA.

@alblib
Copy link
Author

alblib commented Sep 7, 2025

tick has to be under 50us and use pdm so led driver dont go into digital mode. I worry this can make too much load on the chip. I think this is design flaw of the giga display shield. They should use dedicated pwm pin to control the backlight.

@alblib
Copy link
Author

alblib commented Sep 7, 2025

Also, I implemented lightness (human perception) percentage to the set function no the pwm duty cycle for convenience. Also, we have to make sure duty percentage goes not too low, otherwise the off time becomes too long so the led driver goes into shutdown mode. Thus, this implementation is just appropriate, considering every specification we have to satisfy.

@github-actions
Copy link

github-actions bot commented Sep 7, 2025

Memory usage change @ 0ee8484

Board flash % RAM for global variables %
arduino:mbed_giga:giga 🔺 0 - +2192 0.0 - +0.11 🔺 0 - +16 0.0 - 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A
Click for full report table
Board examples/backlight/SimpleBacklight
flash
% examples/backlight/SimpleBacklight
RAM for global variables
% examples/basic/ArduinoLogoDrawing
flash
% examples/basic/ArduinoLogoDrawing
RAM for global variables
% examples/basic/SimpleText
flash
% examples/basic/SimpleText
RAM for global variables
% examples/camera/display_camera
flash
% examples/camera/display_camera
RAM for global variables
% examples/gfx/geometrical-shapes
flash
% examples/gfx/geometrical-shapes
RAM for global variables
% examples/gfx/hello-world
flash
% examples/gfx/hello-world
RAM for global variables
% examples/gfx/touch-switch
flash
% examples/gfx/touch-switch
RAM for global variables
% examples/imu/accelerometer
flash
% examples/imu/accelerometer
RAM for global variables
% examples/imu/gyroscope
flash
% examples/imu/gyroscope
RAM for global variables
% examples/lvgl/bar_lvgl
flash
% examples/lvgl/bar_lvgl
RAM for global variables
% examples/lvgl/button_lvgl
flash
% examples/lvgl/button_lvgl
RAM for global variables
% examples/lvgl/check_radio_lvgl
flash
% examples/lvgl/check_radio_lvgl
RAM for global variables
% examples/lvgl/image_lvgl
flash
% examples/lvgl/image_lvgl
RAM for global variables
% examples/lvgl/imu_orientation
flash
% examples/lvgl/imu_orientation
RAM for global variables
% examples/lvgl/slider_lvgl
flash
% examples/lvgl/slider_lvgl
RAM for global variables
% examples/microphone/PDMSerialPlotter
flash
% examples/microphone/PDMSerialPlotter
RAM for global variables
% examples/rgb/SimpleRGB
flash
% examples/rgb/SimpleRGB
RAM for global variables
% examples/rgb/blink
flash
% examples/rgb/blink
RAM for global variables
%
arduino:mbed_giga:giga 2192 0.11 16 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
Click for full report CSV
Board,examples/backlight/SimpleBacklight<br>flash,%,examples/backlight/SimpleBacklight<br>RAM for global variables,%,examples/basic/ArduinoLogoDrawing<br>flash,%,examples/basic/ArduinoLogoDrawing<br>RAM for global variables,%,examples/basic/SimpleText<br>flash,%,examples/basic/SimpleText<br>RAM for global variables,%,examples/camera/display_camera<br>flash,%,examples/camera/display_camera<br>RAM for global variables,%,examples/gfx/geometrical-shapes<br>flash,%,examples/gfx/geometrical-shapes<br>RAM for global variables,%,examples/gfx/hello-world<br>flash,%,examples/gfx/hello-world<br>RAM for global variables,%,examples/gfx/touch-switch<br>flash,%,examples/gfx/touch-switch<br>RAM for global variables,%,examples/imu/accelerometer<br>flash,%,examples/imu/accelerometer<br>RAM for global variables,%,examples/imu/gyroscope<br>flash,%,examples/imu/gyroscope<br>RAM for global variables,%,examples/lvgl/bar_lvgl<br>flash,%,examples/lvgl/bar_lvgl<br>RAM for global variables,%,examples/lvgl/button_lvgl<br>flash,%,examples/lvgl/button_lvgl<br>RAM for global variables,%,examples/lvgl/check_radio_lvgl<br>flash,%,examples/lvgl/check_radio_lvgl<br>RAM for global variables,%,examples/lvgl/image_lvgl<br>flash,%,examples/lvgl/image_lvgl<br>RAM for global variables,%,examples/lvgl/imu_orientation<br>flash,%,examples/lvgl/imu_orientation<br>RAM for global variables,%,examples/lvgl/slider_lvgl<br>flash,%,examples/lvgl/slider_lvgl<br>RAM for global variables,%,examples/microphone/PDMSerialPlotter<br>flash,%,examples/microphone/PDMSerialPlotter<br>RAM for global variables,%,examples/rgb/SimpleRGB<br>flash,%,examples/rgb/SimpleRGB<br>RAM for global variables,%,examples/rgb/blink<br>flash,%,examples/rgb/blink<br>RAM for global variables,%
arduino:mbed_giga:giga,2192,0.11,16,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:mbed_portenta:envie_m7,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A

@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Sep 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants