diff options
-rw-r--r-- | src/common/includes/Core/common.h | 6 | ||||
-rw-r--r-- | src/common/src/Core/main.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/common/includes/Core/common.h b/src/common/includes/Core/common.h index b0927c8..92cb977 100644 --- a/src/common/includes/Core/common.h +++ b/src/common/includes/Core/common.h @@ -53,12 +53,12 @@ int random_bool(void); // Fault handling mechanism #define FAULT_SOURCE_MAIN 1 -#define FAULT_SOURCE_GPS 2 -#define FAULT_SOURCE_I2C 3 +#define FAULT_SOURCE_GPS 2 +#define FAULT_SOURCE_I2C 3 #define FAULT_SOURCE_USART 4 +#define FAULT_SOURCE_TASK_OVERFLOW 5 void trigger_fault(int source); - int find_last_sunday(const struct tm*); #ifdef SIMULATOR diff --git a/src/common/src/Core/main.c b/src/common/src/Core/main.c index cb2fcd0..0f32945 100644 --- a/src/common/src/Core/main.c +++ b/src/common/src/Core/main.c @@ -68,7 +68,7 @@ void vApplicationStackOverflowHook(TaskHandle_t, signed char *); void vApplicationStackOverflowHook(TaskHandle_t __attribute__ ((unused)) xTask, signed char *pcTaskName) { usart_debug("TASK OVERFLOW %s\r\n", pcTaskName); - while (1) {}; + trigger_fault(FAULT_SOURCE_TASK_OVERFLOW); } int main(void) { |