Index: firmware/source/sys_selftest.c =================================================================== diff -u -rbc538f960d0bc8c72991817ea52efac4775ce953 -rf9757546acead1664344df6dd6d21ab86ecb590b --- firmware/source/sys_selftest.c (.../sys_selftest.c) (revision bc538f960d0bc8c72991817ea52efac4775ce953) +++ firmware/source/sys_selftest.c (.../sys_selftest.c) (revision f9757546acead1664344df6dd6d21ab86ecb590b) @@ -46,6 +46,10 @@ #include "Common.h" #include "HDDefs.h" #include "SystemCommMessages.h" + +#define LR_OFFSET_WORD_IN_STACK 22 ///< Offset of the link register from the STACK_MARKER +#define STACK_MARKER 0xCAFECAFE ///< Location in the stack to determine the offset in word from the Link Register +#define LR_OFFSET_ADJUSTMENT 4 ///< Adjust the content of the LR so that the Memory Access Violation does not get call continously /* USER CODE END */ #include "sys_selftest.h" #include "sys_core.h"