diff options
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 7 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index 25f826d92..75462bd7c 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -74,6 +74,8 @@ typedef struct MillisecMessage{ uint32_t Dancer_Data[NUM_OF_DANCERS] = {0}; uint32_t Speed_Data = 0; +bool watchdogCriticalAlarm = false; + MillisecMotorDataStruc MotorData[NUM_OF_MOTORS] = {0}; MillisecMotorDataStruc SpeedSetPending[NUM_OF_MOTORS] = {0}; MillisecMotorDataStruc PT100Data[MAX_TEMPERATURE_SENSOR_ID] = {0}; @@ -100,7 +102,7 @@ void MillisecInit(void) Error_init(&eb); - MillisecMsgQ = Mailbox_create(sizeof(MillisecMessageStruc), 20, NULL,&eb); + MillisecMsgQ = Mailbox_create(sizeof(MillisecMessageStruc), 2, NULL,&eb); for (i=0;i<NUM_OF_MOTORS;i++) { MotorsMsgQ[i] = Mailbox_create(sizeof(MillisecMotorDataStruc), 5, NULL,&eb); @@ -418,7 +420,8 @@ uint32_t MillisecLoop(uint32_t tick) for (Sensor_i = 0;Sensor_i < MAX_SYSTEM_DISPENSERS;Sensor_i++) CalculateDispenserPressure(Sensor_i); FPGA_GetAllDispensersValveBusyOCD(); - Control_WD(ENABLE,50); //activate heaters/dispenser watchdog, 5 seconds + if (watchdogCriticalAlarm == false) + Control_WD(ENABLE,50); //activate heaters/dispenser watchdog, 5 seconds } //ROM_IntMasterEnable(); diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h index ef9a9d21b..77c3a5ef8 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h @@ -32,5 +32,7 @@ void MillisecInit(void); void MillisecStop(void); void MillisecStart(void); +extern bool watchdogCriticalAlarm; + extern Task_Handle Millisecond_Task_Handle; #endif /* MODULES_CONTROL_MILLISECTASK_H_ */ |
