Testing and extensive debugging of Matter-based application

Hello
I am currently developing a custom Matter device (dimmer, to be exact) with UI (buttons and buzzer) and using Matter Template app as a foundation for my code.
Right now, I have a working device with required functionality, but during testing with Matter protocol I noticed unwanted behavior. 
This behavior consists of main application random freezing (sometimes even for >1sec) during execution of Matter Cluster commands like 'Move To Level' with non-zero duration.
This is what my current findings are:
1) This issue is not related to my own custom code. This was checked by me by commenting all custom code, leaving only AppTask Event queue scheduler running and deleted portions of code responsible for button and LED handling by example app 
2) Disabling or enabling logging and other debugging functions does not change this behavior. With default logging enabled, I can see that during these freezes logging and everything that outputs logs (cluster functionality, main app etc.) also stop.
Although I am quite new to NRF Connect SDK and Zephyr OS functionality, I can deduct that this issue is somehow connected with some critical thread starving and taking CPU cycles or not releasing CPU for other threads. However, I still need help in understanding how to run an extensive debugging process and how to pinpoint the source of my problems.
First of all, I cannot use nrf debug effectively because any breakpoint or pause in code execution will crash the application due to ASSERT error thrown either by SoftDevice or MPSL. Is there any way to see current status of the threads without pausing code execution?
Or is there any way to use logging functionality without J-link debugging to pinpoint the source of freezes?

  • Hello,
    Sorry for long waiting time.
    It seems that I had problems with the version of my SDK. I am using NCS v2.2.0, and I was using it during problem occurrence, but after force update of SDK (through toolchain manager 'Update SDK' option) I can no longer observe long freezes.
    Another reason of why I have my problem fixed can be related to my properly executed deferred attribute assignment to CurrentLevel attribute.
    "Light bulb" example during my tests was behaving properly too.
    Although I am noticing the same behaviour as in mentioned issue on Github (very long command execution does not have accurate execution time, in my case for 10sec command has ~12sec execution), it is not as critical as random long freezes I had previously.
    Thank you for attention and for guidance!

  • Hi,

    Great to hear that the issue with freezing has been resolved. I have notified the developers that you are also experiencing the same problem as in the Github issue.

    Best regards,

    Marte

Related