led_set_brightness() is not setting brightness after led_blink() for STM32U575 #53925
Unanswered
bhavikbhansali
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Seems there is a conflict in the DTS on the same pin being declared (example of a disco_l475i_iot1)for the PWM output
and being declared in the DTS of the board
--> this one should be removed when the pin pa5 is for pwm output |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I am trying to blink an LED using PWM. I came across the 2 inbuild function mentioned and used in led_pwm example. This 2 functions are led_blink() and led_set_brightness(). When I am reading more about this function I came across one details which were mentioned is that if we call led_set_brightness() after led_blink() it will not affect led blinking. I am testing that and checked that it is not true. So just want to know and understand below things.
Is it something where if we call led_blink() function first and call led_set_brightness() after to that it will blink the led with led blink timing where led brightness is as per led_set_brightness() ?
Is it something where it is saying that if we call led_blink() for pin 1 and led_set_brightness() for pin 2 it will not affect each other working?
image of the function

Kindly Note that I am trying to use the same pin and calling the function one after another.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
As per understanding if we call led_blink() followed by led_set_brightness() led need to blink as per defined time and during the one time LED brightness need to be same as we define in led_set_brightness() function.
Impact
It is blocking my implemetition.
Code
In main I am using below code instead of actual example code.
led_blink(lew_pwm, 0, 200, 800);
led_blink(lew_pwm, 1, 200, 800);
k_sleep(K_MSEC(5000));
led_set_brightness(lew_pwm, 0, 75);
led_set_brightness(lew_pwm, 1, 25);
Beta Was this translation helpful? Give feedback.
All reactions