Strange power consumption of Matter Window Covering

Hello DevZone, 

 I met a strange problem strange power consumption of Matter Window Covering example (with release build).

  •  Hardware: 52840DK v3.0.1
  •  Software: NCS v2.4.2
  •  Configuration:  `prj_release.conf`

  The problem is: when I pushed button 3, there will be a stable current about 350uA, and it will not disappear even after reset.

  By the way, I have tested the debug build (with prj.conf). And this problem does not show up.

It seems that the serial will be enabled accidentally when button 3 is pressed, when in release built.

I have no idea about this problem, since I can't see the log of release build.

Best regards,

Jayant

  • Hi

    Are you testing the device standalone or also commissioning it when seeing this issue. I think what's happening is that button 3 enables the HF clock for some reason, and doesn't turn it off. From the documentation I'm not able to see why this should be, as it should just change the level of one LED one step. Do you see LED2/3 being changed when pressing button 3 as expected?

    Do you have the log from the debug mode then. Since the HF clock is already running by default to do logging in the debug build I think that's why you don't see the current increase in the debug build, but I assume the behavior is the same.

    Best regards,

    Simon

  • Hi Simon

    I tested both standalone and commissioned. The result is the same.

    What you said about HFCLK is right. I just found out that this is not a problem. The real reason is that the LED2 will be lighted up with PWM when the window covering is not 100% opened or 0% closed.

    It's related to Button 3, because the default state is 100% opened, and pressing Button 3 will close the window covering by a step of 5%.

    The power consumption will not disappear after reset, I think it's because the example saved the position to the flash.

    Best regards,

    Jayant

  • So the PWM is left running after button 3 is pressed once to keep the "window covering" at 95%? If that's it I would assume either pressing button 2 once to get it back to 100% or button 3 19 more times to get it fully closed should stop the PWM, no? You could also try to modify the sample to make one button press close the window covering fully I guess. I can ask the developers if this is the intended behavior and that the current consumption in fact should increase whenever the window isn't fully opened or closed.

    Best regards,

    Simon

  • Yes, pressing button 2 once or pressing the button 3 19 more times will stop the PWM. I have modified the `PositionToBrightness()` function, to set the brightness to only 0% or 100%. And this can be fixed.

    I can also remove the code and DeviceTree node of PWM. 

    By the way, I think it's a good idea to ask the developers to change the LED behavior in release mode, because the position is not always 100% or 0%, especially when using Apple Home to control this device. This power consumption is very confusing for the new customers who is not familiar with our product.

    Best regards,

    Jayant

Related