Index: firmware/source/sys_selftest.c =================================================================== diff -u -r95d98e7e4e77680481e2d5d28956fc24a185a8a3 -r33edd13b408070f25dce7dc3a582738c5b5f9dfd --- firmware/source/sys_selftest.c (.../sys_selftest.c) (revision 95d98e7e4e77680481e2d5d28956fc24a185a8a3) +++ firmware/source/sys_selftest.c (.../sys_selftest.c) (revision 33edd13b408070f25dce7dc3a582738c5b5f9dfd) @@ -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"