Hi,
1. Please help me resolve the log error that occurs with CONFIG_LOG_DEFAULT_LEVEL=4
2. I created a very simple example of log printing and it worked fine when I set CONFIG_LOG_DEFAULT_LEVEL=3.
3. When I set CONFIG_LOG_DEFAULT_LEVEL=4, the printed log shows the error message as follows:
4. The code is as follows:
[17:18:27.649]收←◆[00:00:1[00:00:00.306,945] [0m<dbg> os: setup_thread_stack: stack 0x20002340 for thread 0x20000828: obj_size=4160 buf_start=0x20002380 buf_size 4096 stack_ptr=0x20003380[0m [00:00:00.306,976] [0m<dbg> os: setup_thread_stack: stack 0x200021c0 for thread 0x20000788: obj_size=384 buf_start=0x20002200 buf_size 320 stack_ptr=0x20002340[0m [1;31m--- 24 messages dropped --- [0m[00:00:00.306,976] [0m<dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2[0m [00:00:00.307,006] [0m<dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2[0m [00:00:00.307,006] [0m<dbg> mpu: region_init: [2] 0x20002340 0x150b000a[0m [00:00:00.307,037] [0m<dbg> clock_control: clkstarted_handle: lfclk: Clock started[0m [00:00:00.307,067] [0m<dbg> os: setup_thread_stack: stack 0x20001640 for thread 0x20000288: obj_size=832 buf_start=0x20001680 buf_size 768 stack_ptr=0x20001980[0m [00:00:00.307,128] [0m<dbg> os: setup_thread_stack: stack 0x20003380 for thread 0x200008e8: obj_size=2112 buf_start=0x200033c0 buf_size 2048 stack_ptr=0x20003bc0[0m [00:00:00.307,159] [0m<dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2[0m [00:00:00.307,159] [0m<dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2[0m [00:00:00.307,189] [0m<dbg> mpu: region_init: [2] 0x20003380 0x150b000a[0m [00:00:00.307,189] [0m<dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2[0m [00:00:00.307,220] [0m<dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2[0m [00:00:00.307,220] [0m<dbg> mpu: region_init: [2] 0x20002340 0x150b000a[0m [00:00:00.307,250] [0m<dbg> os: setup_thread_stack: stack 0x20001200 for thread 0x200001e8: obj_size=1088 buf_start=0x20001240 buf_size 1024 stack_ptr=0x20001640[0m [00:00:00.307,281] [0m<dbg> os: k_sched_unlock: scheduler unlocked (0x20000828:0)[0m [00:00:00.307,281] [0m<dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2[0m [00:00:00.307,312] [0m<dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2[0m [00:00:00.307,312] [0m<dbg> mpu: region_init: [2] 0x20002340 0x150b000a[0m LOG_PRINTK Hello World! nrf52840dk_nrf52840 LOG_RAW Hello World! nrf52840dk_nrf52840 [00:00:00.307,434] [1;31m<err> hello_world: LOG_ERR Hello World! nrf52840dk_nrf52840 [0m [00:00:00.307,464] [1;33m<wrn> hello_world: LOG_WRN Hello World! nrf52840dk_nrf52840 [0m [00:00:00.307,495] [1;32m<inf> hello_world: LOG_INF Hello World! nrf52840dk_nrf52840 [0m [00:00:00.307,525] [0m<dbg> hello_world: log_test: LOG_DBG Hello World! nrf52840dk_nrf52840 [0m [00:00:00.307,556] [1;31m<err> hello_world: LOG_HEXDUMP_ERR Hello World! 6e 72 66 39 31 36 30 64 6b 5f 6e 72 66 39 31 36 |nrf9160d k_nrf916 30 |0 [0m [17:18:28.897]收←◆[00:00:00.555,725] [0m<dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2[0m [00:00:00.555,755] [0m<dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2[0m [00:00:00.555,755] [0m<dbg> mpu: region_init: [2] 0x200021c0 0x150b000a[0m [00:00:00.555,786] [0m<dbg> pm: pm_system_suspend: No PM operations done.[0m [00:00:01.555,755] [0m<dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2[0m [00:00:01.555,786] [0m<dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2[0m [00:00:01.555,786] [0m<dbg> mpu: region_init: [2] 0x20001640 0x150b000a[0m [17:18:29.951]收←◆[00:00:01.608,734] [0m<dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2[0m [00:00:01.608,764] [0m<dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2[0m [00:00:01.608,795] [0m<dbg> mpu: region_init: [2] 0x200021c0 0x150b000a[0m [00:00:01.608,795] [0m<dbg> pm: pm_system_suspend: No PM operations done.[0m [00:00:02.608,795] [0m<dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2[0m [00:00:02.608,825] [0m<dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2[0m [00:00:02.608,825] [0m<dbg> mpu: region_init: [2] 0x20001640 0x150b000a[0m [17:18:30.650]收←◆[00:00:02.661,804] [0m<dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2[0m [00:00:02.661,804] [0m<dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2[0m [00:00:02.661,834] [0m<dbg> mpu: region_init: [2] 0x200021c0 0x150b000a[0m [00:00:02.661,865] [0m<dbg> pm: pm_system_suspend: No PM operations done.[0m [00:00:03.307,800] [0m<dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2[0m [00:00:03.307,830] [0m<dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2[0m [00:00:03.307,830] [0m<dbg> mpu: region_init: [2] 0x20002340 0x150b000a[0m LOG_PRINTK Hello World! nrf52840dk_nrf52840 LOG_RAW Hello World! nrf52840dk_nrf52840 [00:00:03.307,922] [1;31m<err> hello_world: LOG_ERR Hello World! nrf52840dk_nrf52840 [0m [00:00:03.307,983] [1;33m<wrn> hello_world: LOG_WRN Hello World! nrf52840dk_nrf52840 [0m [00:00:03.308,013] [1;32m<inf> hello_world: LOG_INF Hello World! nrf52840dk_nrf52840 [0m [00:00:03.308,044] [0m<dbg> hello_world: log_test: LOG_DBG Hello World! nrf52840dk_nrf52840 [0m [00:00:03.308,074] [1;31m<err> hello_world: LOG_HEXDUMP_ERR Hello World! 6e 72 66 39 31 36 30 64 6b 5f 6e 72 66 39 31 36 |nrf9160d k_nrf916 30 |0 [0m [00:00:03.308,105] [1;33m<wrn> hello_world: LOG_HEXDUMP_WRN Hello World! 6e 72 66 39 31 36 30 64 6b 5f 6e 72 66 39 31 36 |nrf9160d k_nrf916 30 |0 [0m [00:00:03.308,105] [1;32m<inf> hello_world: LOG_HEXDUMP_INF Hello World! 6e 72 66 39 31 36 30 64 6b 5f 6e 72 66 39 31 36 |nrf9160d k_nrf916 30 |0 [0m [00:00:03.308,135] [0m<dbg> hello_world: log_test: LOG_HEXDUMP_DBG Hello World! 6e 72 66 39 31 36 30 64 6b 5f 6e 72 66 39 31 36 |nrf9160d k_nrf916 30 |0 [0m [00:00:03.308,166] [0m<dbg> os: z_tick_sleep: thread 0x20000828 for 98304 ticks[0m [00:00:03.308,197] [0m<dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2[0m [00:00:03.308,197] [0m<dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2[0m [00:00:03.308,227] [0m<dbg> mpu: region_init: [2] 0x20001640 0x150b000a[0m [17:18:31.874]收←◆[00:00:03.533,081] [0m<dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2[0m [00:00:03.533,111] [0m<dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2[0m [00:00:03.533,111] [0m<dbg> mpu: region_init: [2] 0x200021c0 0x150b000a[0m [00:00:03.533,142] [0m<dbg> pm: pm_system_suspend: No PM operations done.[0m [00:00:04.533,111] [0m<dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2[0m [00:00:04.533,142] [0m<dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2[0m [00:00:04.533,142] [0m<dbg> mpu: region_init: [2] 0x20001640 0x150b000a[0m [17:18:32.928]收←◆[00:00:04.586,151] [0m<dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2[0m [00:00:04.586,181] [0m<dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2[0m [00:00:04.586,181] [0m<dbg> mpu: region_init: [2] 0x200021c0 0x150b000a[0m [00:00:04.586,212] [0m<dbg> pm: pm_system_suspend: No PM operations done.[0m [00:00:05.586,181] [0m<dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2[0m [00:00:05.586,212] [0m<dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2[0m [00:00:05.586,212] [0m<dbg> mpu: region_init: [2] 0x20001640 0x150b000a[0m [17:18:33.651]收←◆[00:00:05.639,190] [0m<dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2[0m [00:00:05.639,190] [0m<dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2[0m [00:00:05.639,221] [0m<dbg> mpu: region_init: [2] 0x200021c0 0x150b000a[0m [00:00:05.639,251] [0m<dbg> pm: pm_system_suspend: No PM operations done.[0m [00:00:06.308,258] [0m<dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2[0m [00:00:06.308,288] [0m<dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2[0m [00:00:06.308,288] [0m<dbg> mpu: region_init: [2] 0x20002340 0x150b000a[0m LOG_PRINTK Hello World! nrf52840dk_nrf52840 LOG_RAW Hello World! nrf52840dk_nrf52840 [00:00:06.308,410] [1;31m<err> hello_world: LOG_ERR Hello World! nrf52840dk_nrf52840 [0m [00:00:06.308,441] [1;33m<wrn> hello_world: LOG_WRN Hello World! nrf52840dk_nrf52840 [0m [00:00:06.308,471] [1;32m<inf> hello_world: LOG_INF Hello World! nrf52840dk_nrf52840 [0m [00:00:06.308,502] [0m<dbg> hello_world: log_test: LOG_DBG Hello World! nrf52840dk_nrf52840 [0m [00:00:06.308,532] [1;31m<err> hello_world: LOG_HEXDUMP_ERR Hello World! 6e 72 66 39 31 36 30 64 6b 5f 6e 72 66 39 31 36 |nrf9160d k_nrf916 30 |0 [0m [00:00:06.308,563] [1;33m<wrn> hello_world: LOG_HEXDUMP_WRN Hello World! 6e 72 66 39 31 36 30 64 6b 5f 6e 72 66 39 31 36 |nrf9160d k_nrf916 30 |0 [0m [00:00:06.308,563] [1;32m<inf> hello_world: LOG_HEXDUMP_INF Hello World! 6e 72 66 39 31 36 30 64 6b 5f 6e 72 66 39 31 36 |nrf9160d k_nrf916 30 |0 [0m [00:00:06.308,593] [0m<dbg> hello_world: log_test: LOG_HEXDUMP_DBG Hello World! 6e 72 66 39 31 36 30 64 6b 5f 6e 72 66 39 31 36 |nrf9160d k_nrf916 30 |0 [0m [00:00:06.308,624] [0m<dbg> os: z_tick_sleep: thread 0x20000828 for 98304 ticks[0m [00:00:06.308,654] [0m<dbg> mpu: mpu_configure_region: Configure MPU region at index 0x2[0m [00:00:06.308,654] [0m<dbg> mpu: region_allocate_and_init: Program MPU region at index 0x2[0m [00:00:06.308,685] [0m<dbg> mpu: region_init: [2] 0x20001640 0x150b000a[0m
5. Test environment:
ncs v2.4.0
DK:PCA10056 3.0.0
Thank you for all your assistance.
Kind regards,
Peter.Min