This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RUN_STATUS_LED in zigbee/light_bulb stops blinking if brightness is less than 100%!

Hello,


I'm evaluating nrf52840 and trying to use zigbee/light_bulb as a starting point. One thing I caught immediately and still trying to find an explanation for was the strange behavior of RUN_STATUS_LED.


Steps to reproduce:
1. Use zigbee/light_bulb from nRF Connect SDK v1.7.0 (I checked v1.6.1, and it exhibits the same behavior).
2. Upload it to nRF52840-PCA10056 (Development Kit for nRF52840)
3. Let the light bulb join your Zigbee network (I don't think that the network origin matters).
4. Turn the bulb on and set the brightness to less than 100%.
5. Observe that RUN_STATUS_LED (aka DK_LED1) stops blinking for an inexplicable reason!

I'm failing to find any even distant relationship between DK_LED1 and PWM, which controls the brightness in the example code. I assume that the issue must be somewhere deeper and requires the attention of the SDK developers.

Best regards,

Sergey

  • Hi Sergey,

    I am able to reproduce this on my side, but it seems like RUN_STATUS_LED stops blinking when LED 4 is turned on completely as well, and it will only blink if LED 4 is turned off.

    I have started looking into this, and I will come back to you tomorrow.

    Best regards,

    Marte

  • Hi Sergey,

    This is caused by the pins for LED 1 and LED 4 both being configured as PWM0. LED 4 is configured specifically for this sample, which you can find in the overlay file boards/nrf52840dk_nrf52840.overlay, while LED 1 is the default PWM LED for nRF52840 DK and is configured in the board file zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts.

    If you need to disable LED 1 as PWM LED you can do so by deleting the ch0-pin property in the overlay file:

    &pwm0 {
        ch1-pin = <16>;
        ch1-inverted;
        /delete-property/ ch0-pin;
    };

    Best regards,

    Marte

  • Hi Marte,

    Indeed, I deleted ch0-pin association with pwm0 and the issue has gone away.

    Thank you for your prompt and professional reply! 

    Best regards,

    Sergey

Related