Hello,
I am quite new to NCS. I am trying to sending UART data from nRF52dk_52832 to PC.
The example is nrf\samples\peripheral\lpuart.
If I enable the example with CONFIG_LOG=y, the program crash with Stacking error (context area might be not valid)
I think stacking error should be the error related to memory so I have tried increasing memory size with CONFIG_MAIN_STACK_SIZE, CONFIG_HEAP_MEM_POOL_SIZE and CONFIG_LOG_BUFFER_SIZE but not working.
error message:
[00:05:47.382,385] [1;31m<err> os: ***** MPU FAULT *****[0m [00:05:47.382,415] [1;31m<err> os: Stacking error (context area might be not valid)[0m [00:05:47.382,415] [1;31m<err> os: r0/a1: 0x000004d4 r1/a2: 0x000004d8 r2/a3: 0x000004dc[0m os: r3/a4: 0x000004e0 r12/ip: 0x000004e4 r14/lr: 0x000004e8[0m [00:05:47.382,476] [1;31m<err> os: xpsr: 0x00os: Faulting instruction address (r15/pc): 0x000004ec[0m [00:05:47.382,507] [1;31m<err> os: >>> ZEPHYR F[00:05:47.382,537] [1;31m<err> os: Current thread: 0x200001c8 (unknown)[0m [00:05:47.637,115] [1;31m<err>
prj.conf
CONFIG_NRF_SW_LPUART=y # Sample is showing low power capabilities of low power uart module thus # console/logging uart is disabled. # Uncomment this section for debugging. Additionally, comment uart0 disabling # in overlay. CONFIG_MAIN_STACK_SIZE=4096 CONFIG_HEAP_MEM_POOL_SIZE=1024 CONFIG_LOG_BUFFER_SIZE=1024 CONFIG_USE_SEGGER_RTT=y CONFIG_LOG=y CONFIG_NO_OPTIMIZATIONS=y CONFIG_ASSERT=y # Comment this section for debugging CONFIG_CONSOLE=n CONFIG_UART_CONSOLE=n # Uncomment to use lpuart using interrupt driven API # CONFIG_NRF_SW_LPUART_INT_DRIVEN=y
And advice is appreciated.