I moved forward to 3.1.1 and I still reproduce the issue. I also tested on two boards and built using two different systems and can still reproduce the issue. This mostly rules out a one-off xiao board issue or a system build issue.
My simple recipe is below if anyone has some bandwidth to try to reproduce. More background below that.
Config:
- Plain non-sense xiao nrf54l15
- nrf connect and tool chain 3.1.0 or 3.1.1
Steps
- Create blinky app
- Build and run with all defaults → should work
- Add the debug config below to prj.conf → Should stop working
- Create an overlay file with the snippet below → should work again
prj.conf snippet
CONFIG_MPU_STACK_GUARD=y
CONFIG_RESET_ON_FATAL_ERROR=n
CONFIG_ASSERT=y
CONFIG_DEBUG=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_OPTIMIZATIONS=y
CONFIG_DEBUG_THREAD_INFO=y
CONFIG_THREAD_NAME=y
CONFIG_LOG_MODE_IMMEDIATE=y
CONFIG_LOG=y
CONFIG_LOG_DEFAULT_LEVEL=4
xiao_nrf54l15_nrf54l15_cpuapp.overlay content
&uart21 {
status = "disabled";
};
An interesting clue is that I can “fix” the problem by simply disabling uart21 in the .overlay file. I discovered this because my matter app suddenly started working after I had aligned the resulting xiao zephyr.dts to match the zephyr.dts produced by the nrf54l15dk, which I assume is a solid baseline (it actually ran on my xiao). I then backed out changes one by one until only the disabling of uart21 solved the issue.
Debugging with gdb seems to show memory corruption. Since adding and subtracting debug config and disabling/enabling uart21 change the issue, I’m guessing memory is moved into a convenient configuration. I’m leery to rely on that as a “fix”.
I’m using the plain, non-sense version of xiao, so that could be part of the issue. I noticed the board files provided by seeed are set up for the sense version. I disabled/deleted the non-applicable HW in my .overlay, but that didn’t make a difference.
I’m not making good headway getting to the root with the debugger. I’m might try to binary search my way through startup or step my way through it with the debugger. Maybe start with uart driver initialization.
I have a raytac board arriving tomorrow. It will be interesting to see if I can reproduce the problem there.
As I type I am wondering if enabling extra debug functionality somehow makes use of uart21 if it is enabled. Even then it shouldn’t cause a crash.