This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

lpuart with log enabled

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] <err> os: ***** MPU FAULT *****
[00:05:47.382,415] <err> os:   Stacking error (context area might be not valid)
[00:05:47.382,415] <err> os: r0/a1:  0x000004d4  r1/a2:  0x000004d8  r2/a3:  0x000004dc
os: r3/a4:  0x000004e0 r12/ip:  0x000004e4 r14/lr:  0x000004e8
[00:05:47.382,476] <err> os:  xpsr:  0x00os: Faulting instruction address (r15/pc): 0x000004ec
[00:05:47.382,507] <err> os: >>> ZEPHYR F[00:05:47.382,537] <err> os: Current thread: 0x200001c8 (unknown)
[00:05:47.637,115] <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.

Parents Reply Children
No Data
Related