Hi, I have a BLE service:
In the callback exp_settings_cb I would like to start a new thread, which I tried to do like this: First I defined stack size etc:
The callback itself looks like this:
The problem is when I trigger the callback by writing to the corresponding characteristic I get:
00> [00:00:13.605,834] <err> os: ***** MPU FAULT *****
00> [00:00:13.605,865] <err> os: Instruction Access Violation
00> [00:00:13.605,865] <err> os: r0/a1: 0x20000bd0 r1/a2: 0x20000bd0 r2/a3: 0x20000b68
00> [00:00:13.605,865] <err> os: r3/a4: 0x00000401 r12/ip: 0x20000bc0 r14/lr: 0x200001ec
00> [00:00:13.605,865] <err> os: xpsr: 0x00000000
00> [00:00:13.605,865] <err> os: Faulting instruction address (r15/pc): 0x200001ec
00> [00:00:13.605,865] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
00> [00:00:13.605,895] <err> os: Current thread: 0x200051f0 (unknown)
00> [00:00:13.828,582] <err> os: Halting system
00> [00:00:00.609,588] <inf> sx127x: SX127x version 0x12 found
00> *** Booting Zephyr OS version 2.5.99 ***
After I included
into my prj.conf I got a different error:
00> [00:00:17.488,342] <err> os: ***** HARD FAULT *****
00> [00:00:17.488,342] <err> os: Fault escalation (see below)
00> [00:00:17.488,342] <err> os: ***** MPU FAULT *****
00> [00:00:17.488,372] <err> os: Stacking error (context area might be not valid)
00> [00:00:17.488,372] <err> os: Data Access Violation
00> [00:00:17.488,372] <err> os: MMFAR Address: 0x200099d0
00> [00:00:17.488,372] <err> os: r0/a1: 0x200089d8 r1/a2: 0x0000efed r2/a3: 0x20001ff4[0m
00> [00:00:17.488,372] <err> os: r3/a4: 0x00000000 r12/ip: 0x00000001 r14/lr: 0x00000000
00> [00:00:17.488,403] <err> os: xpsr: 0x2001863c
00> [00:00:17.488,403] <err> os: Faulting instruction address (r15/pc): 0x20000fa4
00> [00:00:17.488,403] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
00> [00:00:17.488,403] <err> os: Fault during interrupt handling
The thread creation works perfectly fine when trying it inside main though.
I would greatly appreciate any insights that might help solve this problem.
Thank you!