Hi, I'm currently trying to use RIOT-OS with the Nordic SDK Softdevice S132.
I have been able to follow Kaspar's example where he integrated the IOT sdk as a pkg, and have integrated the nordic sdk as a pkg as well. Code is linked and flashed at the correct address(es). My code runs, and can even confirm that ISR's trigger correctly. (Some of my test code uses a driver that triggers interrupts. The output is visible on an led.) Unfortunately, when trying to use the shell, the moment that I type anything into the shell and hit 'enter', I get a hard fault. Seen here: 2016-09-07 15:12:22,846 - INFO # Context before hardfault: 2016-09-07 15:12:22,847 - INFO # r0: 0x00000000 2016-09-07 15:12:22,851 - INFO # r1: 0x00000002 2016-09-07 15:12:22,852 - INFO # r2: 0xe000ed00 2016-09-07 15:12:22,854 - INFO # r3: 0x10000000 2016-09-07 15:12:22,854 - INFO # r12: 0x00000000 2016-09-07 15:12:22,855 - INFO # lr: 0x0001d9c1 2016-09-07 15:12:22,855 - INFO # pc: 0x0001c6a2 2016-09-07 15:12:22,859 - INFO # psr: 0x01000200 2016-09-07 15:12:22,859 - INFO # 2016-09-07 15:12:22,859 - INFO # FSR/FAR: 2016-09-07 15:12:22,862 - INFO # CFSR: 0x00040000 2016-09-07 15:12:22,863 - INFO # HFSR: 0x40000000 2016-09-07 15:12:22,864 - INFO # DFSR: 0x00000000 2016-09-07 15:12:22,864 - INFO # AFSR: 0x00000000 2016-09-07 15:12:22,871 - INFO # Misc 2016-09-07 15:12:22,872 - INFO # EXC_RET: 0xfffffffd 2016-09-07 15:12:22,872 - INFO # Attempting to reconstruct state for debugging... 2016-09-07 15:12:22,872 - INFO # In GDB: 2016-09-07 15:12:22,879 - INFO # set $pc=0x1c6a2 2016-09-07 15:12:22,881 - INFO # frame 0 2016-09-07 15:12:22,882 - INFO # bt Using the addresses in pc and lr, I was able to find that the calls were related to : _mutex_lock (0x1d9c1) -> thread_arch_yield (0x1c6a2) So clearly, something is happening with the PendSV interrupt. For the example that Kaspar committed. He used SWI0 as a trampoline to trigger context switches from the softdevice). This code is still present in my current implementation. If I do not hit "enter" in the shell, the application / test code continues to run (albeit most of the code is sitting idle except for the isr that is manipulating the led). I'm looking for suggestions on what else to check. Help is appreciated. Regards, Robert
_______________________________________________ devel mailing list [email protected] https://lists.riot-os.org/mailman/listinfo/devel
