diff options
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules')
4 files changed, 25 insertions, 2 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c index 23009d7fb..2871a31c8 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c +++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c @@ -532,6 +532,11 @@ void FlashInitAndLoad(void) UploadProcessParametersRequest* request = NULL; char ProcessParamsPath[50] = "0://SysInfo//ProcessP.cfg"; +#ifdef WATCHDOG + ROM_WatchdogResetDisable(WATCHDOG0_BASE); + uint32_t timeout = 120000000*35; + ROM_WatchdogReloadSet(WATCHDOG0_BASE, timeout); +#endif FlashInit(); //initialize flash Report("Flash Initialized", __FILE__,__LINE__,FLASH_SIZE, RpMessage, FLASH_RAM_BASE, 0); @@ -593,5 +598,10 @@ void FlashInitAndLoad(void) } else Report("Process not Initialized", __FILE__,__LINE__,0, RpMessage, 0, 0); +#ifdef WATCHDOG + ROM_WatchdogResetEnable(WATCHDOG0_BASE); + timeout = 120000000*3; + ROM_WatchdogReloadSet(WATCHDOG0_BASE, timeout); +#endif } diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index fe9671657..31783db49 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -644,7 +644,7 @@ uint32_t HeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue) { int index=MAX_HEATERS_NUM; int32_t MaxreadValue; - int32_t MinreadValue; + if (IfIndex>>8 != IfTypeHeaters) { LOG_ERROR (IfIndex, "Wrong Interface type"); @@ -677,7 +677,7 @@ uint32_t HeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue) SecondaryPT100Read = readValue; } MaxreadValue = max (MainPT100Read,SecondaryPT100Read); - MinreadValue = min (MainPT100Read,SecondaryPT100Read); + if (MaxreadValue >= HeaterControl[index].sensormaxvalue) { diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c index c2f6a4384..ee568d686 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Progress.c @@ -39,12 +39,22 @@ void Stub_ProgressRequest(MessageContainer* requestContainer) else if((request->amount == 0xCF) && (request->delay == 0xCF)) //Create File System on the Drive { +#ifdef WATCHDOG + ROM_WatchdogResetDisable(WATCHDOG0_BASE); + uint32_t timeout = 120000000*35; + ROM_WatchdogReloadSet(WATCHDOG0_BASE, timeout); +#endif FRESULT iFResult = Init_Flash_File_System(true); if(iFResult != FR_OK) { LOG_ERROR (iFResult, "Error during init Flash File System"); assert(iFResult); } +#ifdef WATCHDOG + ROM_WatchdogResetEnable(WATCHDOG0_BASE); + timeout = 120000000*3; + ROM_WatchdogReloadSet(WATCHDOG0_BASE, timeout); +#endif } else if((request->amount == 0x0C) && (request->delay == 0x0C)) //Get Gas Sensor diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 5efc3798e..eb1b751bb 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -733,6 +733,7 @@ uint32_t ThreadInitialTestStub(HardwareMotor * request) if (Motor_i == FEEDER_MOTOR) // dryer motor is speed controlled. later a speed sensor will be utilized, but for now it will not be controlled { + Report("Feeder Control",__FILE__,Motor_i,MotorControlConfig[Motor_i].m_params.Kp,RpWarning,MotorControlConfig[Motor_i].m_params.Ki,0); if (SpeedControlId != 0xFF) { RemoveControlCallback(SpeedControlId,ThreadLengthCBFunction); @@ -744,6 +745,7 @@ uint32_t ThreadInitialTestStub(HardwareMotor * request) } if (Motor_i == POOLER_MOTOR) // dryer motor is speed controlled. later a speed sensor will be utilized, but for now it will not be controlled { + Report("Puller Control",__FILE__,Motor_i,MotorControlConfig[Motor_i].m_params.Kp,RpWarning,MotorControlConfig[Motor_i].m_params.Ki,0); if (PoolerSpeedControlId != 0xFF) { if (RemoveControlCallback(PoolerSpeedControlId,PoolerThreadLengthCBFunction)!=OK) @@ -783,6 +785,7 @@ uint32_t ThreadInitialTestStub(HardwareMotor * request) } if (Motor_i == WINDER_MOTOR) // dryer motor is speed controlled. later a speed sensor will be utilized, but for now it will n//ot be controlled { + Report("Winder Control",__FILE__,Motor_i,MotorControlConfig[Motor_i].m_params.Kp,RpWarning,MotorControlConfig[Motor_i].m_params.Ki,0); if (ControlIdtoMotorId[Motor_i] != 0xFF) { if(RemoveControlCallback(ControlIdtoMotorId[Motor_i],ThreadControlCBFunction)!=OK) |
