From d1b050a74228f336443f2877bb8c241b3ab93402 Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Tue, 5 Mar 2019 14:02:19 +0200 Subject: change the calll in MillisecLowLoop from Read_Head_MixChip_Heaters_Current to Read_Heaters_Current --- Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c | 2 +- .../Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c | 4 ++-- .../Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.h | 1 + Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c index 3dace18bb..e8b46084c 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c @@ -461,7 +461,7 @@ uint32_t FPGA_MotorConfig_callback(TimerMotors_t _motorId, uint32_t ReadValue) switch (ConfigStages[_motorId]) { - case MOTOR_CONFIG_READ_ADC: + case MOTOR_CONFIG_READ_ADC: ConfigStages[_motorId]++; Read_Motors_Driver_Type(_motorId); //intentional fall through diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c index f95d0cd83..53fa64db4 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c @@ -244,7 +244,7 @@ double Get_MidTank_Pressure_Sensor(MidTank_t MidTank_ID) //0-7 ///////////////////////// Head_MixChip_Heaters_Current ////////////////////////////// -bool Heaters_Current_Read_Enable[9] = {true,true,true,true,true,true,true,true,true}; +bool Heaters_Current_Read_Enable[9] = {true,true,true,true,true,true,true,true,false}; double Heaters_Current[9]; @@ -295,7 +295,7 @@ uint32_t Read_Head_MixChip_Heaters_Current(HEATERS_CURRENT Heater_ID) //0-5 */ assert (Heater_ID Date: Tue, 5 Mar 2019 14:46:21 +0200 Subject: remove wrong assert --- Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.c b/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.c index b93e57422..ce84d7eb6 100644 --- a/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.c +++ b/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.c @@ -212,7 +212,7 @@ uint32_t ADC_TriggerCollection(void) // (called by MillisecLoop) uint32_t ADC_GetReading(int DataItemId) // // ADC Data get for a single data read { int bufnotinuse; - assert (DataItemId Date: Tue, 5 Mar 2019 17:49:02 +0200 Subject: changing the motor direction when using motor driver PowerSTEP01 --- Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c index 435d7aef3..a1e91f6fc 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c @@ -17,6 +17,8 @@ #include "drivers/Flash_Memory/fatfs/ff.h" #include "drivers/SSI_Comm/Dancer/Dancer.h" +#include "drivers/FPGA/Moters_Driver/PowerSTEP01.h" + #include "thread.h" MotorDriverConfigStruc MotorsCfg[NUM_OF_MOTORS]={0}; HardwarePidControl MotorsControl[MAX_THREAD_MOTORS_NUM] = {0}; @@ -52,6 +54,14 @@ uint32_t MotorsConfigMessage(HardwareMotor * request) MotorsCfg[Motor_i].pulseperround = request->pulseperround; MotorsCfg[Motor_i].pulleyradius = request->pulleyradius; MotorsCfg[Motor_i].configword = request->configword; + if(MotorDriverResponse[Motor_i].DriverType == VoltageCombinedMotDriver) + { + MotorsCfg[Motor_i].directionthreadwize = !(request->directionthreadwize);//PowerSTEP01 + } + else + { + MotorsCfg[Motor_i].directionthreadwize = request->directionthreadwize;//L6470 + L6472 + } MotorsCfg[Motor_i].directionthreadwize = request->directionthreadwize; MotorsCfg[Motor_i].kvalhold = request->kvalhold; MotorsCfg[Motor_i].kvalrun = request->kvalrun; -- cgit v1.3.1 From a5d69ec4f8f0364fa25b7564c4d1be8ec0d0679f Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Wed, 6 Mar 2019 11:23:19 +0200 Subject: stop PID control when turning heaters off. improve heaters handling. thread break test --- .../Embedded_SW/Embedded/Common/SW_Info/SW_Info.c | 2 +- .../Embedded/Drivers/flash_ram/FlashProgram.c | 2 +- .../Embedded_SW/Embedded/Modules/General/process.c | 21 ++- .../Embedded/Modules/Heaters/Heaters_ex.h | 1 + .../Embedded/Modules/Heaters/Heaters_init.c | 4 +- .../Embedded/Modules/Heaters/Heaters_print.c | 152 +++++++++++++-------- .../Embedded/Modules/Thread/Thread_print.c | 10 +- .../Embedded/StateMachines/Printing/JobSTM.c | 19 +++ 8 files changed, 142 insertions(+), 69 deletions(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c index 12d6bdeb6..c4f04254d 100644 --- a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c +++ b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c @@ -20,7 +20,7 @@ typedef struct } TangoVersion_t; -TangoVersion_t _gTangoVersion = {1,3,7,8}; +TangoVersion_t _gTangoVersion = {1,3,7,81}; #define BUILD_DATE __DATE__ char Dat[50] = BUILD_DATE; char _gTangoName [MAX_STRING_LEN] = "Tango01 ";//d diff --git a/Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.c b/Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.c index af7f13a00..637c91e7d 100644 --- a/Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.c +++ b/Software/Embedded_SW/Embedded/Drivers/flash_ram/FlashProgram.c @@ -42,7 +42,7 @@ uint32_t ReadAppAndProgram(uint32_t ui32FlashStart,uint32_t ui32FileSize,void* b // by the amount of the reserved block. // ui32FlashEnd = ui32FlashStart + ui32FileSize; -#warning check all addresses + // // Check to make sure the file size is not too large to fit in the flash. diff --git a/Software/Embedded_SW/Embedded/Modules/General/process.c b/Software/Embedded_SW/Embedded/Modules/General/process.c index dd9f8deae..458bb35f2 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/process.c +++ b/Software/Embedded_SW/Embedded/Modules/General/process.c @@ -38,11 +38,29 @@ int32_t tableindex = 0; char ProcessParamsConfigPath[50] = "0://SysInfo//ProcessP.cfg"; ProcessParameters ProcessParametersKeep; +void HeatersStopControlOnHeatersOff(ProcessParameters* ProcessParams) +{ + uint32_t temp_sum = 0; + temp_sum += ProcessParams->dryerzone1temp; + temp_sum += ProcessParams->dryerzone2temp; + temp_sum += ProcessParams->dryerzone3temp; + temp_sum += ProcessParams->mixertemp; + temp_sum += ProcessParams->headzone1temp; + temp_sum += ProcessParams->headzone2temp; + temp_sum += ProcessParams->headzone3temp; + temp_sum += ProcessParams->headzone4temp; + temp_sum += ProcessParams->headzone5temp; + temp_sum += ProcessParams->headzone6temp; + if (temp_sum == 0)// heating off + { + HeatersControlStop(); + REPORT_MSG(temp_sum,"Heating control off - temperatures off"); + } +} uint32_t HandleProcessParameters(ProcessParameters* ProcessParams) { uint32_t status = 0; - if (ProcessParams==NULL) { status = ERROR_CODE__INVALID_PARAMETER; @@ -145,6 +163,7 @@ uint32_t HandleProcessParameters(ProcessParameters* ProcessParams) HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary, false, ProcessParams->dryerzone3temp); */ + HeatersStopControlOnHeatersOff(ProcessParams); dyeingspeed = ProcessParams->dyeingspeed; dryerbufferlength = ProcessParams->dryerbufferlength; mininkuptake = ProcessParams->mininkuptake; diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_ex.h b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_ex.h index 8a77f98a2..0b65d9e5e 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_ex.h +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_ex.h @@ -27,4 +27,5 @@ void Heaters_SetOperationLimits(int acheatersloweroperationlimit,int acheatersu uint32_t HeatersEnd(void); +void HeatersControlStop(void); uint32_t Heaters_Init(void); diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_init.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_init.c index 6fbfa5884..7c4bb1761 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_init.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_init.c @@ -29,7 +29,7 @@ /******************** STRUCTURES AND ENUMs ********************************************/ -typedef enum { +/*typedef enum { HeatersInitialState, HeatersInit, HeatersControlledOp, @@ -43,7 +43,7 @@ typedef enum { HeatersOverHeat, HeatersOnTest }HEATERS_EVENTS_ENUM; - +*/ /******************** GLOBAL PARAMETERS ********************************************/ HeaterPIDControlConfig HeaterControl[MAX_HEATERS_NUM] = {0,0,0,0,0,0,0,0,0,0,0,0}; bool AcHeaterConfigured[MAX_AC_HEATERS] = {0,0,0}; diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index bc5448e7b..3f62fc3b6 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -17,7 +17,7 @@ #include "PMR/Diagnostics/HeaterType.pb-c.h" #include "PMR/Diagnostics/HeaterState.pb-c.h" #include "PMR/common/MessageContainer.pb-c.h" -#include "PMR/Diagnostics/EventType.pb-c.h" +#include "PMR/Diagnostics/EventType.pb-c.h" #include "../AlarmHandling/AlarmHandling.h" #include "../control/control.h" @@ -277,6 +277,9 @@ uint32_t HeatersSingleHeaterEnd(HardwarePidControlType HeaterId) HeaterReady[HeaterId] = true; } + AlarmHandlingSetAlarm(HeaterUnderEventType[HeaterId], false); + AlarmHandlingSetAlarm(HeaterUnderEventType_B[HeaterId], false); + AlarmHandlingSetAlarm(HeaterEventType[HeaterId], false); return status; } @@ -389,7 +392,8 @@ uint32_t HeaterCommandRequestMessage(int HeaterId, bool OnOff, int Temperature) } else if ((HeaterState == HEATER_ON)&& (OnOff == HEATER_ON)) //set temperature { - if (abs(HeaterPIDConfig[HeaterId].m_SetParam - HeaterCmd[HeaterId].targettemperatue)>0.5) //#bug 221 + HeaterPIDConfig[HeaterId].m_SetParam = HeaterCmd[HeaterId].targettemperatue; + /*/if (abs(HeaterPIDConfig[HeaterId].m_SetParam - HeaterCmd[HeaterId].targettemperatue)>0.5) //#bug 221 { PrepareHeater(HeaterId,Temperature); //prepare the heaters control info } @@ -397,8 +401,8 @@ uint32_t HeaterCommandRequestMessage(int HeaterId, bool OnOff, int Temperature) { HeaterPreviousRead[HeaterId] = GetFilteredHeaterRead(HeaterId);// LOG_ERROR(HeaterId,"ReRead Heater Temp"); - } - HeaterPIDConfig[HeaterId].m_SetParam = HeaterCmd[HeaterId].targettemperatue; + }*/ + PrepareHeater(HeaterId,Temperature); //prepare the heaters control info // if the heater is not on return (?). //set the target operation temperature //set the heater operation mode to fast heating - depended on the current temperature @@ -417,6 +421,88 @@ uint32_t HeaterCommandRequestMessage(int HeaterId, bool OnOff, int Temperature) return OK; } +/* + * PrepareHeater + * called by: Communication from host + * initialized all global data + */ +void PrepareACHeater(int HeaterId,uint32_t Frequency, uint32_t SetTemperatue) +{ + if (ControlIdtoHeaterId [HeaterId] == 0xFF) + { + ControlIdtoHeaterId [HeaterId] = AddControlCallback( HeaterControlCBFunction, Frequency/*eOneSecond*/,TemperatureSensorRead,(IfTypeHeaters*0x100+HeaterId),DryerInternalPT100Id,0); + //HeaterPreviousRead[HeaterId] = TemperatureSensorRead(DryerInternalPT100Id); + HeaterPreviousRead[HeaterId] = GetFilteredHeaterRead(HeaterId);// + Report("PrepareHeater Read", __FILE__,__LINE__,HeaterId, SetTemperatue, HeaterPreviousRead[HeaterId], 0); + HeaterPreviousRead[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain] = GetFilteredHeaterRead(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain);//TemperatureSensorRead(HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain]); + HeaterPreviousRead[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary] = GetFilteredHeaterRead(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary);// = TemperatureSensorRead(HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary]); + } + //turn all alarms off + AlarmHandlingSetAlarm(HeaterUnderEventType[HeaterId], false); + AlarmHandlingSetAlarm(HeaterUnderEventType_B[HeaterId], false); + AlarmHandlingSetAlarm(HeaterEventType[HeaterId], false); + + if (ControlIdtoMaxHeaterId [HeaterId] == 0xFF) + ControlIdtoMaxHeaterId [HeaterId] = AddControlCallback( DcHeaterMaxTempCBFunction, eOneSecond,TemperatureSensorRead,(IfTypeHeaters*0x100+HeaterId),HeaterId2PT100Id[HeaterId],0); + + Enable_Reading_Heaters_Current(HeaterId2CurrentId[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain]); + Enable_Reading_Heaters_Current(HeaterId2CurrentId[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary]); + + HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain, 0); + HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary, 0); + if (MainDryerHeaterMaxTempControl == 0xFF) + MainDryerHeaterMaxTempControl = AddControlCallback( HeaterMaxTempCBFunction, eHundredMillisecond,TemperatureSensorRead,(IfTypeHeaters*0x100+HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain),HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain],0); + if (SecondDryerHeaterMaxTempControl == 0xFF) + SecondDryerHeaterMaxTempControl = AddControlCallback( HeaterMaxTempCBFunction, eHundredMillisecond,TemperatureSensorRead,(IfTypeHeaters*0x100+HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary),HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary],0); + //InitialHeating = true; + HeaterReady[HeaterId] = false; + if (BlowerCfg.enabled == true) + { + Turn_the_Blower_On();//Turn on with the Default_Voltage + if (BlowerCfg.heatingvoltage) + Control_Voltage_To_Blower(BlowerCfg.heatingvoltage); + else + Control_Voltage_To_Blower(BlowerCfg.voltage-500); + + } + if (SetTemperatue) + { + Control_Dryer_Fan(START,75);//use START or STOP, 0 - 100% + } +} +/* + * PrepareHeater + * called by: Communication from host + * initialized all global data + */ +int PrepareDCHeater(int HeaterId, uint32_t Frequency, uint32_t SetTemperatue) +{ + if (ControlIdtoHeaterId [HeaterId] == 0xFF) + ControlIdtoHeaterId [HeaterId] = AddControlCallback( DCHeaterControlCBFunction, Frequency/*eOneSecond*/,TemperatureSensorRead,(IfTypeHeaters*0x100+HeaterId),HeaterId2PT100Id[HeaterId],0); + //HeaterPIDConfig[HeaterId].m_params.dt *=10; + //DCInitialHeating[HeaterId] = true; + HeaterReady[HeaterId] = false; + HeaterRecalculateHeaterParams(HeaterId, 0); + + //turn all alarms off + AlarmHandlingSetAlarm(HeaterUnderEventType[HeaterId], false); + AlarmHandlingSetAlarm(HeaterUnderEventType_B[HeaterId], false); + AlarmHandlingSetAlarm(HeaterEventType[HeaterId], false); + + Enable_Reading_Heaters_Current(HeaterId2CurrentId[HeaterId]); + + HeaterPreviousRead[HeaterId] = GetFilteredHeaterRead(HeaterId);//TemperatureSensorRead(HeaterId2PT100Id[HeaterId]); + if((abs(HeaterPreviousRead[HeaterId]-MINIMUM_HEATER_READ)<1)||(abs(MAXIMUM_HEATER_READ-HeaterPreviousRead[HeaterId])<10)) + { + LOG_ERROR (HeaterId,"PT100 not working properly"); + return ERROR; + } + Report("PrepareHeater Read", __FILE__,__LINE__,HeaterId, SetTemperatue, HeaterPreviousRead[HeaterId], 0); + if (ControlIdtoMaxHeaterId [HeaterId] == 0xFF) + ControlIdtoMaxHeaterId [HeaterId] = AddControlCallback( DcHeaterMaxTempCBFunction, eOneSecond,TemperatureSensorRead,(IfTypeHeaters*0x100+HeaterId),HeaterId2PT100Id[HeaterId],0); + + return OK; +} /* * PrepareHeater * called by: Communication from host @@ -466,64 +552,12 @@ uint32_t PrepareHeater(int HeaterId, uint32_t SetTemperatue) } if (HeaterId >= MAX_AC_HEATERS) //DC Heaters { - if (ControlIdtoHeaterId [HeaterId] == 0xFF) - ControlIdtoHeaterId [HeaterId] = AddControlCallback( DCHeaterControlCBFunction, Frequency/*eOneSecond*/,TemperatureSensorRead,(IfTypeHeaters*0x100+HeaterId),HeaterId2PT100Id[HeaterId],0); - //HeaterPIDConfig[HeaterId].m_params.dt *=10; - //DCInitialHeating[HeaterId] = true; - HeaterReady[HeaterId] = false; - HeaterRecalculateHeaterParams(HeaterId, 0); - - Enable_Reading_Heaters_Current(HeaterId2CurrentId[HeaterId]); - - HeaterPreviousRead[HeaterId] = GetFilteredHeaterRead(HeaterId);//TemperatureSensorRead(HeaterId2PT100Id[HeaterId]); - if((abs(HeaterPreviousRead[HeaterId]-MINIMUM_HEATER_READ)<1)||(abs(MAXIMUM_HEATER_READ-HeaterPreviousRead[HeaterId])<10)) - { - LOG_ERROR (HeaterId,"PT100 not working properly"); + if (PrepareDCHeater(HeaterId,Frequency,SetTemperatue)!=OK) return ERROR; - } - Report("PrepareHeater Read", __FILE__,__LINE__,HeaterId, SetTemperatue, HeaterPreviousRead[HeaterId], 0); - if (ControlIdtoMaxHeaterId [HeaterId] == 0xFF) - ControlIdtoMaxHeaterId [HeaterId] = AddControlCallback( DcHeaterMaxTempCBFunction, eOneSecond,TemperatureSensorRead,(IfTypeHeaters*0x100+HeaterId),HeaterId2PT100Id[HeaterId],0); - } else if (HeaterId == HARDWARE_PID_CONTROL_TYPE__DryerAirTemperature) //AC Heaters { - if (ControlIdtoHeaterId [HeaterId] == 0xFF) - { - ControlIdtoHeaterId [HeaterId] = AddControlCallback( HeaterControlCBFunction, Frequency/*eOneSecond*/,TemperatureSensorRead,(IfTypeHeaters*0x100+HeaterId),DryerInternalPT100Id,0); - //HeaterPreviousRead[HeaterId] = TemperatureSensorRead(DryerInternalPT100Id); - HeaterPreviousRead[HeaterId] = GetFilteredHeaterRead(HeaterId);// - Report("PrepareHeater Read", __FILE__,__LINE__,HeaterId, SetTemperatue, HeaterPreviousRead[HeaterId], 0); - HeaterPreviousRead[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain] = GetFilteredHeaterRead(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain);//TemperatureSensorRead(HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain]); - HeaterPreviousRead[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary] = GetFilteredHeaterRead(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary);// = TemperatureSensorRead(HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary]); - } - if (ControlIdtoMaxHeaterId [HeaterId] == 0xFF) - ControlIdtoMaxHeaterId [HeaterId] = AddControlCallback( DcHeaterMaxTempCBFunction, eOneSecond,TemperatureSensorRead,(IfTypeHeaters*0x100+HeaterId),HeaterId2PT100Id[HeaterId],0); - - Enable_Reading_Heaters_Current(HeaterId2CurrentId[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain]); - Enable_Reading_Heaters_Current(HeaterId2CurrentId[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary]); - - HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain, 0); - HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary, 0); - if (MainDryerHeaterMaxTempControl == 0xFF) - MainDryerHeaterMaxTempControl = AddControlCallback( HeaterMaxTempCBFunction, eHundredMillisecond,TemperatureSensorRead,(IfTypeHeaters*0x100+HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain),HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain],0); - if (SecondDryerHeaterMaxTempControl == 0xFF) - SecondDryerHeaterMaxTempControl = AddControlCallback( HeaterMaxTempCBFunction, eHundredMillisecond,TemperatureSensorRead,(IfTypeHeaters*0x100+HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary),HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary],0); - //InitialHeating = true; - HeaterReady[HeaterId] = false; - if (BlowerCfg.enabled == true) - { - Turn_the_Blower_On();//Turn on with the Default_Voltage - if (BlowerCfg.heatingvoltage) - Control_Voltage_To_Blower(BlowerCfg.heatingvoltage); - else - Control_Voltage_To_Blower(BlowerCfg.voltage-500); - - } - if (SetTemperatue) - { - Control_Dryer_Fan(START,75);//use START or STOP, 0 - 100% - } + PrepareACHeater(HeaterId,Frequency,SetTemperatue); } return OK; } @@ -693,7 +727,7 @@ uint32_t DcHeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t eadValue) return OK; } } - else //temperature withing limits + else //temperature within limits { if(UnderHeatCounter[index] ) { diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 394e2ae13..6a8474438 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -427,9 +427,9 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) JobEndReason = JOB_THREAD_BREAK; ThreadControlActive = false; SendJobProgress(0.0,0,false, TMessage); - //SegmentReady(Module_Thread,ModuleFail); - AlarmHandlingSetAlarm(EVENT_TYPE__THREAD_BREAK,true); - EndState(CurrentJob,"ReadBreakSensor Error" ); + SegmentReady(Module_Thread,ModuleFail); + //AlarmHandlingSetAlarm(EVENT_TYPE__THREAD_BREAK,true); + //EndState(CurrentJob,"ReadBreakSensor Error" ); LOG_ERROR(index, "ReadBreakSensor Error"); return OK; } //passed limit @@ -458,7 +458,7 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) SendJobProgress(0.0,0,false, TMessage); //EndState(CurrentJob,TMessage ); SegmentReady(Module_Thread,ModuleFail); - switch (index) + /*switch (index) { case POOLER_MOTOR: AlarmHandlingSetAlarm(EVENT_TYPE__THREAD_TENSION_CONTROL_FAILURE_PULLER_DANCER,true); @@ -469,7 +469,7 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) case WINDER_MOTOR: AlarmHandlingSetAlarm(EVENT_TYPE__THREAD_TENSION_CONTROL_FAILURE_WINDER_DANCER,true); break; - } + }*/ LOG_ERROR (DancerId, "Dancer Failure"); return OK; } diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c index 08233ce9a..e012dc020 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c @@ -43,6 +43,8 @@ #include "PMR/Hardware/Hardwaremotor.pb-c.h" #include "PMR/Hardware/HardwareWinder.pb-c.h" #include "PMR/common/MessageContainer.pb-c.h" +#include "PMR/Diagnostics/EventType.pb-c.h" + #include "Modules/General/process.h" #include "modules/Diagnostics/Diagnostics.h" @@ -748,6 +750,23 @@ void SendJobProgress(double ProcessedLength, int SegmentId, bool done, char *Mes { responseContainer.has_error = true; responseContainer.error = JobError_to_ErrorCode[JobEndReason]; + switch (JobEndReason) + { + case JOB_THREAD_BREAK: + AlarmHandlingSetAlarm(EVENT_TYPE__THREAD_BREAK,true); + break; + case JOB_POOLER_DANCER_FAIL: + AlarmHandlingSetAlarm(EVENT_TYPE__THREAD_TENSION_CONTROL_FAILURE_PULLER_DANCER,true); + break; + case JOB_FEEDER_DANCER_FAIL: + AlarmHandlingSetAlarm(EVENT_TYPE__THREAD_TENSION_CONTROL_FAILURE_FEEDER_DANCER,true); + break; + case JOB_WINDER_DANCER_FAIL: + AlarmHandlingSetAlarm(EVENT_TYPE__THREAD_TENSION_CONTROL_FAILURE_WINDER_DANCER,true); + break; + default: + break; + } } if (JobAbortedByUser == true) { -- cgit v1.3.1 From 9aab05cf66c58ae6f444ddcece0aa02e0fa54a3a Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Wed, 6 Mar 2019 13:12:43 +0200 Subject: update the function Read_Head_MixChip_Heaters_Current + stub for HeatersEnd --- .../Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c | 12 ++++++------ .../Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Heater.c | 7 ++++++- 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c index 53fa64db4..94db2e3f4 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c @@ -305,27 +305,27 @@ uint32_t Read_Head_MixChip_Heaters_Current(HEATERS_CURRENT Heater_ID) //0-5 { case HEAD_ZONE_1: I2C_Slave_Add = 0x40; - Channel = 0x08; + Channel = 0x10; break; case HEAD_ZONE_2: I2C_Slave_Add = 0x40; - Channel = 0x10; + Channel = 0x08; break; case HEAD_ZONE_3: I2C_Slave_Add = 0x40; - Channel = 0x20; + Channel = 0x04; break; case HEAD_ZONE_4: I2C_Slave_Add = 0x44; - Channel = 0x01; + Channel = 0x80; break; case HEAD_ZONE_5_6: I2C_Slave_Add = 0x44; - Channel = 0x02; + Channel = 0x40; break; case MIXCHIP: I2C_Slave_Add = 0x46; - Channel = 0x20; + Channel = 0x08; break; default: diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Heater.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Heater.c index 47e1bda34..7735c9955 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Heater.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Heater.c @@ -25,7 +25,7 @@ void Stub_HeaterRequest(MessageContainer* requestContainer) { - uint32_t status = NOT_SUPPORTED; + uint32_t status = PASSED; MessageContainer responseContainer; StubHeaterRequest* request = stub_heater_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); @@ -35,6 +35,11 @@ void Stub_HeaterRequest(MessageContainer* requestContainer) request->heatergroupon */ + if((request->heatergroupid == 0xff) && (request->heatergroupon == false) && (request->heatertemperaturereq == 0)) + { + HeatersEnd(); + } + else if (request->heatergroupon ) status = ActivateHeater(request->heatergroupid); else -- cgit v1.3.1 From b3cfecea7d2493776db2f03ee48b06436029d438 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Wed, 6 Mar 2019 13:24:54 +0200 Subject: add stub for heaters end --- Software/Embedded_SW/.jxbrowser-data/Cache/data_0 | Bin 45056 -> 45056 bytes Software/Embedded_SW/.jxbrowser-data/Cache/data_1 | Bin 270336 -> 270336 bytes Software/Embedded_SW/.jxbrowser-data/Cache/data_2 | Bin 1056768 -> 1056768 bytes Software/Embedded_SW/.jxbrowser-data/Cache/data_3 | Bin 4202496 -> 4202496 bytes .../Embedded_SW/.jxbrowser-data/Cache/f_000008 | 94 - .../Embedded_SW/.jxbrowser-data/Cache/f_00000a | 88 - .../Embedded_SW/.jxbrowser-data/Cache/f_00000d | 757 ------ .../Embedded_SW/.jxbrowser-data/Cache/f_00000e | 536 ----- .../Embedded_SW/.jxbrowser-data/Cache/f_00000f | 599 ----- .../Embedded_SW/.jxbrowser-data/Cache/f_000011 | 677 ------ .../Embedded_SW/.jxbrowser-data/Cache/f_000014 | 1986 ---------------- .../Embedded_SW/.jxbrowser-data/Cache/f_000015 | 1177 --------- .../Embedded_SW/.jxbrowser-data/Cache/f_000016 | 2505 -------------------- .../Embedded_SW/.jxbrowser-data/Cache/f_000017 | 1308 ---------- .../Embedded_SW/.jxbrowser-data/Cache/f_000018 | 1132 --------- .../Embedded_SW/.jxbrowser-data/Cache/f_000020 | 17 - Software/Embedded_SW/.jxbrowser-data/Cache/index | Bin 524656 -> 524656 bytes .../Embedded_SW/.jxbrowser-data/GPUCache/data_0 | Bin 8192 -> 45056 bytes .../Embedded_SW/.jxbrowser-data/GPUCache/data_1 | Bin 270336 -> 270336 bytes .../Embedded_SW/.jxbrowser-data/GPUCache/data_3 | Bin 8192 -> 4202496 bytes Software/Embedded_SW/.jxbrowser-data/History | Bin 94208 -> 110592 bytes .../Local Storage - EXT/file_null.localstorage | 2 +- .../https_www.youtube-nocookie.com_0.localstorage | Bin 3072 -> 3072 bytes Software/Embedded_SW/.jxbrowser-data/Login Data | Bin 18432 -> 24576 bytes Software/Embedded_SW/.jxbrowser-data/Web Data | Bin 59392 -> 69632 bytes Software/Embedded_SW/Embedded/debug_w_pmr/makefile | 140 +- .../Embedded_SW/Embedded/debug_w_pmr/sources.mk | 9 +- .../Embedded/debug_w_pmr/subdir_rules.mk | 20 +- Software/Stubs Collection/stubs/HeatersEnd.cs | 16 + .../stubs/technician view files/lp4 Tech Board.tpf | 44 +- 30 files changed, 139 insertions(+), 10968 deletions(-) delete mode 100644 Software/Embedded_SW/.jxbrowser-data/Cache/f_000008 delete mode 100644 Software/Embedded_SW/.jxbrowser-data/Cache/f_00000a delete mode 100644 Software/Embedded_SW/.jxbrowser-data/Cache/f_00000d delete mode 100644 Software/Embedded_SW/.jxbrowser-data/Cache/f_00000e delete mode 100644 Software/Embedded_SW/.jxbrowser-data/Cache/f_00000f delete mode 100644 Software/Embedded_SW/.jxbrowser-data/Cache/f_000011 delete mode 100644 Software/Embedded_SW/.jxbrowser-data/Cache/f_000014 delete mode 100644 Software/Embedded_SW/.jxbrowser-data/Cache/f_000015 delete mode 100644 Software/Embedded_SW/.jxbrowser-data/Cache/f_000016 delete mode 100644 Software/Embedded_SW/.jxbrowser-data/Cache/f_000017 delete mode 100644 Software/Embedded_SW/.jxbrowser-data/Cache/f_000018 delete mode 100644 Software/Embedded_SW/.jxbrowser-data/Cache/f_000020 create mode 100644 Software/Stubs Collection/stubs/HeatersEnd.cs (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 index 43bc4dd30..72da15f27 100644 Binary files a/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 and b/Software/Embedded_SW/.jxbrowser-data/Cache/data_0 differ diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 index 98e1cbae6..d09ddd8f9 100644 Binary files a/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 and b/Software/Embedded_SW/.jxbrowser-data/Cache/data_1 differ diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 index 616f7914e..f77d1a73c 100644 Binary files a/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 and b/Software/Embedded_SW/.jxbrowser-data/Cache/data_2 differ diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 b/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 index af4db3b45..e128b103c 100644 Binary files a/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 and b/Software/Embedded_SW/.jxbrowser-data/Cache/data_3 differ diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000008 b/Software/Embedded_SW/.jxbrowser-data/Cache/f_000008 deleted file mode 100644 index 03809ee51..000000000 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000008 +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000a b/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000a deleted file mode 100644 index e4a0d245b..000000000 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000a +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000d b/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000d deleted file mode 100644 index d76522119..000000000 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000d +++ /dev/null @@ -1,757 +0,0 @@ - - - - - - - - - - - - - - diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000e b/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000e deleted file mode 100644 index e7bb11c06..000000000 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000e +++ /dev/null @@ -1,536 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000f b/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000f deleted file mode 100644 index 1a981f34a..000000000 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/f_00000f +++ /dev/null @@ -1,599 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000011 b/Software/Embedded_SW/.jxbrowser-data/Cache/f_000011 deleted file mode 100644 index dd6614b23..000000000 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000011 +++ /dev/null @@ -1,677 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000014 b/Software/Embedded_SW/.jxbrowser-data/Cache/f_000014 deleted file mode 100644 index d9405fdcf..000000000 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000014 +++ /dev/null @@ -1,1986 +0,0 @@ -// vim:ts=4:sts=4:sw=4: -/*! - * - * Copyright 2009-2012 Kris Kowal under the terms of the MIT - * license found at http://github.com/kriskowal/q/raw/master/LICENSE - * - * With parts by Tyler Close - * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found - * at http://www.opensource.org/licenses/mit-license.html - * Forked at ref_send.js version: 2009-05-11 - * - * With parts by Mark Miller - * Copyright (C) 2011 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -(function (definition) { - "use strict"; - - // This file will function properly as a - - diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000018 b/Software/Embedded_SW/.jxbrowser-data/Cache/f_000018 deleted file mode 100644 index 3c991af21..000000000 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000018 +++ /dev/null @@ -1,1132 +0,0 @@ -/* - * ======== rovapi.js ======== - * Browser-side ROVServer API - */ - -var rov; /* TICloudAgent ROVServer sub module */ - -var packagePath; /* package path array from the environment, CCS, or ... */ - -var wssPort = 8888; /* standalone nodeserver's WebSocket server port */ -var sock; /* standalone WebSocket server socket */ - -/* ccs7 is true when we are running in the context of the CCS cloud */ -var ccs7 = false; - -var ds; /* DebugServer module: agent.getSubModule("DS") */ -var dsFlag = false; /* true if we're told to connect via DSLite */ -var dsActiveCoreName = null; - -var deferedSymbols = null; -var exeSet = null; /* exeSet != null => ROV connected to the exe exeSet */ - -/* - * ======== debuggerStatus ======== - * Current debugger state - * - * null - unknown or disconnected - * "Disconnected" - - * "TargetHalt" - - * "Running" - - * "Connected" - - * - * TODO: connected/disconnected should be orthogonal to - * running/halted so what's up with the states above?!?! - */ -var debuggerStatus = null; - -/* - * ======== init ======== - */ -function init() -{ - ccs7 = (typeof TICloudAgent) == "undefined" ? false : true; - - /* parse URL for setup parameters */ - var tokens = location.href.split(/[?&]/); - tokens.shift(); - for (var i = 0; i < tokens.length; i++) { - var param = tokens.shift(); - var pair = param.split('='); - switch (pair[0]) { - case "wsPort": { - if (pair[1]) { - wssPort = pair[1]; - console.log("set wssPort to: " + wssPort); - } - break; - } - } - } -} - -/* - * ======== setExecutable ======== - * Specify the executable to decode - * - * This function initializes ROV and must be called before any other calls. - * - * During the operation, progress() is called with a progress string that - * may be useful to an impatient user. - * - * On completion, callback() is called with a response of the form: - * {resStr: "...", exeName: "...", connType: "...", connArgs: ["...", ...]} - * where, - * exeName - full path of the executable - * connType - connection type: "DSLite", "Serial", "Net", ... - * connArgs - array of String values needed by the connection - * or, in the event that none are supplied, [] - * coreName - name of core to which we're connected (if unknown, null) - * resStr - final status result string from this operation: - * "OK" - success - * any other string - failure and the string is a printable - * message explaining the cause - * - * Events coming from the target after a connection is estabilished - * but possibly _before_ and after the executable has been set are - * returned by calling targetEvents(). - * - * path is a string of the form: - * ?comm=[:]*[&]* - * where, - * is the full path to the executable - * is "DSLite", "Serial", "Net", ... - * is a communication-specific value - * is an arbitrary name-value pair that is - * specified by the client - */ -function setExecutable(path, reqObj, callback, progress, targetEvents) -{ - init(); - - /* standalone (for now we need TICloudAgent to use DSLite, blech!) */ - if (!ccs7 && path.indexOf("DSLite") == -1) { - var old = sock; - sock = new WebSocket("ws://localhost:" + wssPort); - sock.onopen = function() { - sock.send(JSON.stringify("exec:" + path + "\r\n")); - if (old != null) { - old.close(); - } - }; - - sock.onmessage = function (ret) { - console.log("setExec response: " + ret.data); - if (ret.data != null && ret.data.indexOf("Working:") == 0) { - if (progress != null) progress(ret.data, reqObj); - } - else { - var result = _parseExePath(path); - - /* add resStr to result to form callback value */ - result.resStr = ret.data; - result.exeName = ""; /* safe, but is this needed??? */ - result.coreName = ""; - callback(result, reqObj); - } - }; - } - /* TI Cloud */ - else { - var dev = ""; - var k = path.indexOf("DSLite"); - if (k != -1) { - dsFlag = true; - - /* check path for a device name (default is "") */ - var tmp = path.substr(k + 7).split(':')[0]; - if (tmp != null && tmp != "" && tmp != "undefined") { - dev = tmp; - } - } - - /* connect to the ROV module and DS (if requested) */ - _connect().then( - /* connect to active core's module */ - function(obj) { - /* save ROVServer module for subsequent use */ - rov = obj; - - /* use ds to get debug core */ - if (ds == null || dsFlag == false) { - var promContainer = Q.defer(); - var prom = promContainer.promise; - promContainer.resolve(); - return (prom); /* return undefined */ - } - - /* if ds != null, get all core names */ - return ds.listCores().then( - function(cores) { - return _setupCore(cores, dev, targetEvents, reqObj); - } - ).then( - function(core0) { - console.log("dstatus: " + debuggerStatus); - if (debuggerStatus == null - || debuggerStatus == "Disconnected") { - console.log("debugger is not connected"); - /* don't fail if connection is, say, Serial. - * (does this make sense?) - */ - if (dsFlag) { - throw new Error("The debugger is not connected"); - } - } - return (core0); /* return core's module */ - } - ); - } - ) - .then( - /* use debug core to get exe name */ - function(core0) { - if (core0 != null) { - /* ask debugger for files loaded on specified core */ - return _getSymbols(core0); - } - console.log("no debugger => no symbol file list"); - return ({symbolFiles: []}); - } - ) - .then( - /* get package path for the specified exe */ - function(files) { - console.log("core files: " - + JSON.stringify(files, null, 3)); - var exe = _validateExe(path, files).split('?')[0]; - return _getProject(exe).then( - function (proj) { - console.log("exe project: " - + JSON.stringify(proj, null, 3)); - if (proj.location && rov_setFileDefaults) { - rov_setFileDefaults(proj.location, proj.location); - } - return (_getPackagePath(proj.name)); - } - ) - .then( - function (path) { - packagePath = path; - console.log("exe package path: " + path); - return (files); - } - ) - .fail( - function(msg) { - throw new Error(msg); - } - ); - } - ) - .then( - /* start ROV model with an exe specified by path or debugger */ - function(files) { - console.log("core files: " - + JSON.stringify(files, null, 3)); - var newPath = _validateExe(path, files); - var obj = _parsePackagePath(packagePath); - - console.log("rov.setExec(" + newPath + ", " + obj.xdcroot - + ", " + obj.xdcpath + ")"); - return rov.setExec(newPath, obj.xdcroot, obj.xdcpath).then( - function detectProgress(res) { - console.log("setExec response: " + res); - if (res != null && res.indexOf("Working:") == 0) { - rov.getProgress().then(detectProgress); - if (progress != null) { - progress(res, reqObj); - } - } - else { - /* parse newPath for the UI */ - var result = _parseExePath(newPath); - result.coreName = _getCoreName(dsActiveCoreName); - - /* add resStr to result to form callback value */ - result.resStr = res; - - /* save just the exe name */ - exeSet = result.exeName; - - callback(result, reqObj); - } - } - ); - } - ) - .fail( - function(err) { - var msg = err.message ? err.message : err; - console.log("Error: setExecutable() failed: " + msg); - var result = _parseExePath(path); - result.resStr = String(msg); - result.exeName = ""; - result.coreName = ""; - callback(result, reqObj); - } - ); - } - - return (true); -} - -/* - * ======== discoverAddons ======== - */ -function discoverAddons(reqObj, callback) -{ - /* standalone */ - if (sock != null) { - sock.onmessage = function(ret) { - var parsed = null; - var err = null; - try { - parsed = JSON.parse(ret.data); - } - catch (e) { - err = 'Error: JSON.parse exception: ' + e.message; - } - callback(err, parsed, reqObj); - }; - sock.send(JSON.stringify("addons\r\n")); - } - /* TI Cloud */ - else { - rov.discoverAddons().then( - function(list) { - console.log("addons: " + list); - var parsed = null; - var err = null; - try { - parsed = JSON.parse(list); - } - catch (e) { - err = 'Error: JSON.parse exception: ' + e.message; - } - callback(err, parsed, reqObj); - } - ).fail( - function (err) { - var msg = err.message ? err.message : err; - console.log( - "Error: Unexpected Exception from discoverAddons callback:" - + msg); - } - ); - } - - return (true); -} - -/* - * ======== getViewList ======== - * Get list of all modules and their supported views - * - * The view list is a map of arrays, where keys are module names and values - * are arrays of the objects with 'name' and 'type' properties. - * [{name:"view1", type:"view1_type"}, ... ,{name:"viewN", type:"viewN_type"}] - * - * Returns the view list or an error by calling callback(err, list, reqObj), - * where, - * err - error string (or null for no error) - * list - the view list (or null if err is non-null - * reqObj - the passed in context object - */ -function getViewList(reqObj, callback) -{ - /* standalone */ - if (sock != null) { - sock.onmessage = function(ret) { - var parsed = null; - var err = null; - try { - parsed = JSON.parse(ret.data); - } - catch (e) { - err = 'Error: JSON.parse exception: ' + e.message; - } - callback(err, parsed, reqObj); - }; - sock.send(JSON.stringify("list\r\n")); - } - /* TI Cloud */ - else { - rov.getViews().then( - function(list) { - console.log("list: " + list); - var parsed = null; - var err = null; - try { - parsed = JSON.parse(list); - } - catch (e) { - err = 'Error: JSON.parse exception: ' + e.message; - } - callback(err, parsed, reqObj); - } - ).fail( - function (err) { - var msg = err.message ? err.message : err; - console.log( - "Error: Unexpected Exception from getViewList callback:" - + msg); - } - ); - } - - return (true); -} - -/* - * ======== getView ======== - * Get specified view from a module - * - * Returns the view list or an error by calling - * callback(err, view, module, view,reqObj), - * where, - * err - error string (or null forno error) - * list - the view JSON object (or null if err is non-null - * module - the passed in modeule name - * view - the passed in view name - * reqObj - the passed in context object - */ -var queue = []; -function getView(module, view, reqObj, callback) -{ - /* standalone */ - if (sock != null) { - queue.push({module: module, view: view, reqObj: reqObj}); - sock.onmessage = function(ret) { - var parsed = null; - var err = null; - - if (ret.data.indexOf("Error:") == 0) { - err = ret.data; - } - else { - try { - parsed = JSON.parse(ret.data); - } - catch (e) { - err = 'Error: JSON.parse exception: ' - + e.message + ": " + ret.data; - } - } - var args = queue.shift(); - callback(err, parsed, args.module, args.view, args.reqObj); - }; - - sock.send(JSON.stringify("view:" + module + "," + view + "\r\n")); - } - /* TI Cloud */ - else { - //if (debuggerStatus == "Running") { - // callback("Target is running!", null, module, view, reqObj); - // return; - //} - if (dsFlag && (debuggerStatus == null - || debuggerStatus == "Disconnected")) { - callback("Target is disconnected!", null, module, view, reqObj); - return (false); - } - rov.getView(module, view).then( - function(response) { - if (response.indexOf("Error:") == 0) { - callback(response, null, module, view, reqObj); - } - else { - var parsedRes; - var parseErr = null; - try { - parsedRes = JSON.parse(response); - } - catch (e) { - parseErr = 'Error: JSON.parse exception: ' + e.message; - parsedRes = null; - } - callback(parseErr, parsedRes, module, view, reqObj); - } - console.log(module + ":" + view + ": " + response); - } - ).fail( - function (err) { - var msg = err.message ? err.message : err; - console.log("Error: Unexpected exception from getView(" - + module + ", " + view + "): " + msg); - } - ); - } - - return (true); -} - -/* - * ======== _configureDebugger ======== - * Configure debugger using the supplied target configuration - * - * devName is the basename of a .ccxml file (minus the .ccxml extension) - * that defines how to setup the debugger - * - * rov is assumed to be non-null (i.e., _connect() returns a promise to get - * the ROVServer module _and_ that promise resolved to rov). - * - * ds is also assumed to be non-null, which is implied by rov != null - * because, ds is initialized by _connect() before creating the promise to - * get rov. - * - * Returns a promise - * resolved to dbg, where dbg.cores == array of cores - * or - * rejected because devName.ccxml is not found or - * configuration with this file failed - * - * (Internal function) - */ -function _configureDebugger(devName) -{ - console.log("_configureDebugger(" + devName + ")"); - return _getProject().then( - /* get the package path from active project (or workspace if none) */ - function(proj) { - console.log("activeProjectContext: " + JSON.stringify(proj, null, 3)); - return _getPackagePath(proj.name); - } - ).then( - /* lookup .ccxml file along package path */ - function (packagePath) { - return rov.find(devName + ".ccxml", packagePath); - } - ).then( - /* configure the debugger */ - function(ccxmlFile) { - console.log("configuring with: " + ccxmlFile); - return ds.configure(ccxmlFile).fail( - function(err) { - var msg = "configuration for '" + devName - + "' failed: " + (err.message ? err.message : err); - console.log(msg); - throw new Error(msg); - } - ); - } - ).fail( - function(err) { - debuggerStatus = null; - - var msg = "can't find " + devName + ".ccxml"; - console.log(msg); - throw new Error(msg); - } - ); -} - -/* - * ======== _connect ======== - * Connect to the ROV module in the TICloudAgent WebSocket server - * - * Called directly by setExecutable() to establish connection with - * the ROVServer module (rov_server.js). - * - * Returns a promise - * resolved to rov = ROVServer submodule (agent.getSubModule("ROVServer")) - * rejected because we can't start agent or the connection is - * DSLite and we failed to get the DS submodule - * - * Throws an exception if TICloudAgent.Init() throws (which it shouldn't) - * - * Side Effects: sets ds to the DebugServer/DSLite module - * - * (Internal function) - */ -function _connect() -{ - var agent; - console.log("_connect: connecting ..."); - - if (rov != null) { - var prom = Q.defer(); - prom.resolve(rov); - console.log("_connect: using cached rov = " + rov); - return (prom.promise); - } - - return TICloudAgent.Init().then( - /* init/configure agent and get EventBroker module */ - function(_agent) { - agent = _agent; - agent.addConfigProperty("cloudAgentInstallerServerURL", - location.origin + "/ticloudagent/"); - return agent.getSubModule("EventBroker"); - } - ).then( - /* add EventBroker listeners and get active project */ - function(broker) { - broker.addListener("ccs.debug.activeContextChangedEvent", - function(data) { - console.log("ccs.debug.activeContextChanged: " - + JSON.stringify(data, null, 3)); - }); - - return broker.fetchData("ccs.debug.activeContext"); - } - ).then( - /* get DS module */ - function(obj) { - console.log("activeDebugContext: " + JSON.stringify(obj, null, 3)); - if (obj.data && obj.data.length > 0) { - dsActiveCoreName = obj.data[0].core; - } - - /* get DS sub-model from agent */ - return agent.getSubModule("DS"); - } - ).then( - /* add DS listeners */ - function(_ds) { - ds = _ds; - console.log("acquired DS sub-module: " + ds); - ds.addListener("close", - function() { - console.log("DS closing"); - debuggerStatus = null; - } - ); - ds.addListener("configChanged", - function(data) { - console.log("DS config changed: " - + JSON.stringify(data, null, 3)); - if (data.cores[0] == undefined) { - debuggerStatus = null; - console.log("DS config changed: debugger terminated"); - if (exeSet != null) { - location.reload(true); - exeSet = null; - } - } - } - ); - } - ).fail( - /* throw exception if we can't start agent or get DS submodule */ - function(err) { - var emsg = err.message ? err.message : err; - if (agent == null) { - var msg = "ROV _connect failed to start agent: " + emsg; - console.log(msg); - throw new Error(msg); - } - else if (ds == null) { - var msg = "ROV _connect failed to acquire DS: " + emsg; - console.log(msg); - if (String(emsg).indexOf("ccs.debug.activeContext") != -1) { - msg = "Unable to obtain package path from CCS. Try " - + "restarting ROV after starting the debugger. " - + emsg; - } - if (dsFlag) { - throw new Error(msg); - } - } - } - ).then( - /* return ROVServer submodule */ - function() { - console.log("_connect: requesting server ROV Module from agent"); - return agent.getSubModule("ROVServer"); - } - ); -} - -/* - * ======== _getCoreName ======== - */ -function _getCoreName(dsName) -{ - var coreName = ""; - if (dsName != null) { - var k = dsName.lastIndexOf('/'); - coreName = dsName.substr(k + 1); - } - - return (coreName); -} - -/* - * ======== _getProject ======== - * Return the "current project" or the project containing exePath - * - * Returns a promise that resolves to an object containing the name of the - * current project and its location. - * - * XMLHttpRequest returns: - * 400 and an error message when a required argument is not present - * in the request. - * 500 and log the error message when there is an unexpected exception - * while servicing a request - * 200 and an empty body when there is nothing to return. Eg, if the - * findContextProject finds nothing - * 200 and a JSON object in body (with contentType header set to - * "application/json"), when there is data to return - * 404, 403, etc. in the cases where server is down for some reason, - * or when request is sent to an unknown route - */ -function _getProject(exePath) -{ - var defer = Q.defer(); - - if (!ccs7) { - defer.resolve(null); - return (defer.promise); - } - - /* get project/workspace information */ - function transferFailed(req) { - /* the request for info failed */ - return function (evt) { - var msg = "An error occurred while getting " - + req + " info: " + evt; - console.log(msg); - defer.reject(msg); - }; - } - - function reqListener(req) { - /* the request for info succeeded (maybe: 404 errors return HTML!) */ - return function() { - console.log(req + " info: " + this.responseText); - var result = {name: null, location: null}; - try { - /* TODO: throw if req.status != 200? */ - if (this.responseText != "") { - result = JSON.parse(this.responseText); - } - } - catch (e) { - /* TODO: use statusText rather than responseText? */ - defer.reject("An error occurred while getting " - + req + " info: IDE server failed: " + this.responseText); - } - defer.resolve(result); - }; - } - - /* request current project from the CCS "ide server" */ - var req = new XMLHttpRequest(); - console.log("getting project ..."); - req.addEventListener("load", reqListener("project")); - req.addEventListener("error", transferFailed("project")); - - var suffix = "/ide/findContextProject"; - if (exePath != null) { - suffix = "/ide/findOwnerProject?resourcePath=" + exePath; - } - - req.open("GET", encodeURI(location.origin + suffix)); - req.send(); - - return (defer.promise); -} - -/* - * ======== _getPackagePath ======== - * Return the package path from the current context (if provided) - * - * Returns an array consisting of the package path components, the last - * being the "./packages" sub-directory of XDCtools. - * - * If running in the context of CCS7, ask CCS, otherwise returns null. - */ -function _getPackagePath(projectName) -{ - var defer = Q.defer(); - - if (!ccs7) { - defer.resolve(null); - return (defer.promise); - } - - /* get project/workspace information */ - function transferFailed(req) { - /* the request for info failed */ - return function (evt) { - var msg = "An error occurred while getting " - + req + " info: " + evt; - console.log(msg); - defer.reject(msg); - }; - } - - function reqListener(req) { - /* the request for info succeeded (maybe: 404 errors return HTML!) */ - return function() { - console.log(req + " info: " + this.responseText); - var result = null; - try { - if (this.responseText != "") { - var obj = JSON.parse(this.responseText); - result = obj.packagePath; - } - } - catch (e) { - defer.reject("An error occurred while getting " - + req + " info: IDE server failed: " + this.responseText); - } - defer.resolve(result); - }; - } - - /* request package path from the CCS "ide server" */ - var req = new XMLHttpRequest(); - if (projectName != null && projectName != "") { - /* get path from project */ - console.log("getting package path from project '" + projectName + "'."); - req.addEventListener("load", reqListener("project")); - req.addEventListener("error", transferFailed("project")); - req.open("GET", location.origin - + "/ide/getProjectProperties?projectName=" + projectName); - } - else { - /* get path from workspace */ - console.log("getting package path from workspace"); - req.addEventListener("load", reqListener("workspace")); - req.addEventListener("error", transferFailed("workspace")); - req.open("GET", location.origin + "/ide/getBuildPreferences"); - } - req.send(); - - return (defer.promise); -} - -/* - * ======== _getSymbols ======== - * Return a non-empty set of symbol files for the specified core - * - * If the current set of symbol files is [], wait up to 5s for that to - * change. If it doesn't, fail by rejecting the returned promise. - */ -function _getSymbols(core) -{ - console.log("_getSymbols: request core's symbol files"); - var defered = Q.defer(); - deferedSymbols = defered; /* request symbol files from symbols listener */ - return (core.symbols.getSymbolFiles().then( - function (syms) { - if (syms.symbolFiles.length != 0) { - console.log("_getSymbols: canceled core.symbols request"); - deferedSymbols = null; /* cancel symbols listener request */ - defered.resolve(syms); - } - return (defered.promise.timeout(5000, - "Can't connect: Program symbols must be loaded to " - + "core '" + dsActiveCoreName + "'")); - } - )); -} - -/* - * ======== _parsePackagePath ======== - */ -function _parsePackagePath(packagePath) -{ - if (packagePath != null && packagePath.length > 0) { - var xdcroot = packagePath[packagePath.length - 1].replace(/packages$/, ""); - var xdcpath = packagePath.slice(0, packagePath.length - 1).join(';'); - return ({ - xdcroot: xdcroot, - xdcpath: xdcpath - }); - } - return ({xdcpath: null, xdcroot:null}); -} - -/* - * ======== _parseExePath ======== - * Return JSON object with path components split out into distinct items - * { - * exeName: non-null String - * connType: non-null String - * connArgs: Array of 0 or more Strings - * } - * where, - * exeName - full path of the executable - * connType - connection type: "DSLite", "Serial", "Net", ... - * connArgs - array of String values needed by the connection - * or, in the event that none are supplied, [] - * - */ -function _parseExePath(path) -{ - var result = {}; - - /* separate exe from path */ - var tokens = path.split('?'); - result.exeName = tokens[0]; - - /* separate connection from name=value pairs */ - var connection = tokens[1].split('&')[0]; - - /* split connection into type and args */ - tokens = connection.split(':'); - result.connType = tokens.shift(); - result.connArgs = tokens; - - return (result); -} - -/* - * ======== _setupCore ======== - * If the debugger is not already configured, we configure it here for the - * specified device - * - * This function is only called when we are connecting via DSLite. - * - * dbg is the a debugger object that has a list of (possibly already) - * configured cores. - * - * devName is either "" or and basename (minus extension) of a .ccxml file - * that should be used to configure the device; if devName is "" - * the debugger should already have been configured. - * - * targetEvents and obj are used to send target events generated by - * dbg.cores[0] up to the caller - * - * Returns a promise - * resolved to core 0 module with debugger connected and target running - * or - * rejected because we can't start agent or the connection is - * DSLite and we failed to get the DS submodule - * - * (Internal function) - */ -function _setupCore(dbg, devName, targetEvents, obj) -{ - var prom; - console.log("configuring one debugger core of " + dbg.cores.length - + " cores"); - if (dbg.cores.length == 0 && devName != "") { - /* if the number of cores is 0, core 0 has not already been configured - * by the user via the debugger or a second instance of ROV; so, we - * try to do it now using the .ccxml file specified by devName. - */ - prom = _configureDebugger(devName); - } - else { - var promContainer = Q.defer(); - prom = promContainer.promise; - - if (dbg.cores.length == 0) { /* and devName == "" */ - promContainer.reject(new Error( - "the debugger has not been configured for any device. " - + "Try reconnecting after connecting to the target with " - + "the debugger.")); - } - else if (devName != "") { /* and dbg.cores.length != 0 */ - /* deconfigure closes websockets connected to all cores; so, to - * properly deconfigure we must restart monserver. For now we - * skip the deconfigure step until we figure out how to manage - * the lifecycle of DSLite cores and monserver instances - */ - promContainer.reject(new Error( - "the debugger has already been configured for the device. " - + "To connect with the existing configuration, don't " - + "specify a device configuration; use just 'Debugger'.")); - } - else { /* devName == "" and dbg.cores.length != 0 */ - /* Assume that the debugger has already started for the - * right configuration. - */ - console.log("debugger is up for core " + dbg.cores[0]); - promContainer.resolve(dbg); - } - } - - /* at this point prom is either resolved as dbg, or rejected */ - return prom.then( - function(dbg) { - /* select the currently active debug core */ - var id = 0; - if (dsActiveCoreName != null) { - for (var i = 0; i < dbg.cores.length; i++) { - if (dbg.cores[i] == dsActiveCoreName) { - id = i; - break; - } - } - } - var cname = dbg.cores[id]; - - console.log("adding listeners to core[" + id + "] = '" + cname + "'"); - return ds.getSubModule(cname).then( - /* add listeners to active core */ - function(debugCore) { - console.log("adding target state halt listener"); - debugCore.targetState.waitForHalt( - function(halted) { - debuggerStatus = "TargetHalt"; - console.log("targetState halted"); - } - ); - - debugCore.addListener("refresh", - function(status) { - console.log("core 'refresh' status: " - + JSON.stringify(status, null, 3)); - debuggerStatus = status.reason; - if (targetEvents) { - targetEvents(debuggerStatus, obj); - } - } - ); - - console.log("adding target state change listener"); - debugCore.targetState.addListener("changed", - function(status) { - console.log("targetState status: " - + JSON.stringify(status, null, 3)); - if (status.description == "Running") { - debuggerStatus = "Running"; - } - else if (status.description.match(/^Disconnected/)) - { - debuggerStatus = "Disconnected"; - } - } - ); - - console.log("adding target symbols change listener"); - debugCore.symbols.addListener("changed", - function(status) { - console.log("core.symbols status: " - + JSON.stringify(status, null, 3)); - - /* resolve non-empty symbol file requests */ - if (deferedSymbols - && status.symbolFiles - && status.symbolFiles.length != 0) { - - deferedSymbols.resolve(status); - deferedSymbols = null; - console.log("core.symbols resolved request"); - } - - /* trigger ROV reloads (if necessary) */ - if (exeSet != null - && status.symbolFiles - && status.symbolFiles.length == 0) { - - exeSet = null; - location.reload(true); - } - } - ); - - return (debugCore); - } - ).then( - /* connect to and start "active" debug core */ - function(debugCore) { - var alreadyConnected = false; - - console.log("connecting to active core"); - return debugCore.targetState.connect().then( - function() { - debuggerStatus = "Connected"; - } - ).fail( - function(err) { - if (err.message != undefined - && err.message == - "Target is already connected") { - /* If we made it here with this error message, - * it means the user already started debugger - * so we are not going to call run(). We - * let the user control ROV via the debugger. - */ - debuggerStatus = "Connected"; - alreadyConnected = true; - } - else { - console.log("connect failed: " - + (err.message ? err.message : err)); - throw (err); - } - } - ).then( - function() { - if (alreadyConnected == false) { - /* try starting the core, but ignore fails */ - console.log("starting: " + debugCore); - debugCore.targetState.run().fail( - function (err) { - var msg = - err.message ? err.message : err; - console.log(debugCore - + " could not be started: " + msg); - } - ); - } - - return (debugCore); - } - ); - } - ); - } - ). - fail( - /* handle the case where original prom was rejected */ - function(err) { - var msg = "Debugger setup failed: " - + (err.message ? err.message : err); - console.log(msg); - throw new Error(msg); - } - ); -} - -/* - * ======== _validateExe ======== - */ -function _validateExe(path, files) -{ - console.log("_validateExe(" + path + ", [" + files.symbolFiles + "])"); - - var tokens = path.split('?'); /* split exe path from the connection */ - var fpath = tokens[0].replace(/\\/g, '/'); - var suffix = '?' + tokens[1]; - - var dpath = ""; - if (files.symbolFiles.length > 0) { - dpath = files.symbolFiles[0].replace(/\\/g, '/'); - } - - /* check for miracles */ - if (dpath == fpath) { - return (dpath + suffix); - } - - /* take debugger's path if it's set and nothing else if specified */ - if (dpath != "" && (fpath == "undefined" || fpath == "")) { - return (dpath + suffix); - } - - /* take specified path if it's set and the debugger is clueless */ - if (dpath == "" && (fpath != "undefined" && fpath != "")) { - return (fpath + suffix); - } - - /* else fail */ - var msg = "can't determine the executable path from input '" - + fpath + "' and debugger's '" + dpath + "'"; - - if (dpath != "" && fpath != "undefined" && fpath != "") { - msg = "debugger loaded " + dpath - + "' but '" + fpath + "' was specified."; - } - else if (dpath == "" && (fpath == "undefined" || fpath == "")) { - msg = "no executable path was specifed. Either specify the path to the executable or, if connected via CCS, load program symbols."; - } - - throw (new Error(msg)); -} diff --git a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000020 b/Software/Embedded_SW/.jxbrowser-data/Cache/f_000020 deleted file mode 100644 index 010d57dc8..000000000 --- a/Software/Embedded_SW/.jxbrowser-data/Cache/f_000020 +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2014 Google Inc. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -!function(a,b){var c={},d={},e={},f=null;!function(a,b){function c(a){if("number"==typeof a)return a;var b={};for(var c in a)b[c]=a[c];return b}function d(){this._delay=0,this._endDelay=0,this._fill="none",this._iterationStart=0,this._iterations=1,this._duration=0,this._playbackRate=1,this._direction="normal",this._easing="linear",this._easingFunction=x}function e(){return a.isDeprecated("Invalid timing inputs","2016-03-02","TypeError exceptions will be thrown instead.",!0)}function f(b,c,e){var f=new d;return c&&(f.fill="both",f.duration="auto"),"number"!=typeof b||isNaN(b)?void 0!==b&&Object.getOwnPropertyNames(b).forEach(function(c){if("auto"!=b[c]){if(("number"==typeof f[c]||"duration"==c)&&("number"!=typeof b[c]||isNaN(b[c])))return;if("fill"==c&&v.indexOf(b[c])==-1)return;if("direction"==c&&w.indexOf(b[c])==-1)return;if("playbackRate"==c&&1!==b[c]&&a.isDeprecated("AnimationEffectTiming.playbackRate","2014-11-28","Use Animation.playbackRate instead."))return;f[c]=b[c]}}):f.duration=b,f}function g(a){return"number"==typeof a&&(a=isNaN(a)?{duration:0}:{duration:a}),a}function h(b,c){return b=a.numericTimingToObject(b),f(b,c)}function i(a,b,c,d){return a<0||a>1||c<0||c>1?x:function(e){function f(a,b,c){return 3*a*(1-c)*(1-c)*c+3*b*(1-c)*c*c+c*c*c}if(e<=0){var g=0;return a>0?g=b/a:!b&&c>0&&(g=d/c),g*e}if(e>=1){var h=0;return c<1?h=(d-1)/(c-1):1==c&&a<1&&(h=(b-1)/(a-1)),1+h*(e-1)}for(var i=0,j=1;i=1)return 1;var d=1/a;return c+=b*d,c-c%d}}function k(a){C||(C=document.createElement("div").style),C.animationTimingFunction="",C.animationTimingFunction=a;var b=C.animationTimingFunction;if(""==b&&e())throw new TypeError(a+" is not a valid value for easing");return b}function l(a){if("linear"==a)return x;var b=E.exec(a);if(b)return i.apply(this,b.slice(1).map(Number));var c=F.exec(a);if(c)return j(Number(c[1]),{start:y,middle:z,end:A}[c[2]]);var d=B[a];return d?d:x}function m(a){return Math.abs(n(a)/a.playbackRate)}function n(a){return 0===a.duration||0===a.iterations?0:a.duration*a.iterations}function o(a,b,c){if(null==b)return G;var d=c.delay+a+c.endDelay;return b=Math.min(c.delay+a,d)?I:J}function p(a,b,c,d,e){switch(d){case H:return"backwards"==b||"both"==b?0:null;case J:return c-e;case I:return"forwards"==b||"both"==b?a:null;case G:return null}}function q(a,b,c,d,e){var f=e;return 0===a?b!==H&&(f+=c):f+=d/a,f}function r(a,b,c,d,e,f){var g=a===1/0?b%1:a%1;return 0!==g||c!==I||0===d||0===e&&0!==f||(g=1),g}function s(a,b,c,d){return a===I&&b===1/0?1/0:1===c?Math.floor(d)-1:Math.floor(d)}function t(a,b,c){var d=a;if("normal"!==a&&"reverse"!==a){var e=b;"alternate-reverse"===a&&(e+=1),d="normal",e!==1/0&&e%2!==0&&(d="reverse")}return"normal"===d?c:1-c}function u(a,b,c){var d=o(a,b,c),e=p(a,c.fill,b,d,c.delay);if(null===e)return null;var f=q(c.duration,d,c.iterations,e,c.iterationStart),g=r(f,c.iterationStart,d,c.iterations,e,c.duration),h=s(d,c.iterations,g,f),i=t(c.direction,h,g);return c._easingFunction(i)}var v="backwards|forwards|both|none".split("|"),w="reverse|alternate|alternate-reverse".split("|"),x=function(a){return a};d.prototype={_setMember:function(b,c){this["_"+b]=c,this._effect&&(this._effect._timingInput[b]=c,this._effect._timing=a.normalizeTimingInput(this._effect._timingInput),this._effect.activeDuration=a.calculateActiveDuration(this._effect._timing),this._effect._animation&&this._effect._animation._rebuildUnderlyingAnimation())},get playbackRate(){return this._playbackRate},set delay(a){this._setMember("delay",a)},get delay(){return this._delay},set endDelay(a){this._setMember("endDelay",a)},get endDelay(){return this._endDelay},set fill(a){this._setMember("fill",a)},get fill(){return this._fill},set iterationStart(a){if((isNaN(a)||a<0)&&e())throw new TypeError("iterationStart must be a non-negative number, received: "+timing.iterationStart);this._setMember("iterationStart",a)},get iterationStart(){return this._iterationStart},set duration(a){if("auto"!=a&&(isNaN(a)||a<0)&&e())throw new TypeError("duration must be non-negative or auto, received: "+a);this._setMember("duration",a)},get duration(){return this._duration},set direction(a){this._setMember("direction",a)},get direction(){return this._direction},set easing(a){this._easingFunction=l(k(a)),this._setMember("easing",a)},get easing(){return this._easing},set iterations(a){if((isNaN(a)||a<0)&&e())throw new TypeError("iterations must be non-negative, received: "+a);this._setMember("iterations",a)},get iterations(){return this._iterations}};var y=1,z=.5,A=0,B={ease:i(.25,.1,.25,1),"ease-in":i(.42,0,1,1),"ease-out":i(0,0,.58,1),"ease-in-out":i(.42,0,.58,1),"step-start":j(1,y),"step-middle":j(1,z),"step-end":j(1,A)},C=null,D="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",E=new RegExp("cubic-bezier\\("+D+","+D+","+D+","+D+"\\)"),F=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,G=0,H=1,I=2,J=3;a.cloneTimingInput=c,a.makeTiming=f,a.numericTimingToObject=g,a.normalizeTimingInput=h,a.calculateActiveDuration=m,a.calculateIterationProgress=u,a.calculatePhase=o,a.normalizeEasing=k,a.parseEasingFunction=l}(c,f),function(a,b){function c(a,b){return a in k?k[a][b]||b:b}function d(a){return"display"===a||0===a.lastIndexOf("animation",0)||0===a.lastIndexOf("transition",0)}function e(a,b,e){if(!d(a)){var f=h[a];if(f){i.style[a]=b;for(var g in f){var j=f[g],k=i.style[j];e[j]=c(j,k)}}else e[a]=c(a,b)}}function f(a){var b=[];for(var c in a)if(!(c in["easing","offset","composite"])){var d=a[c];Array.isArray(d)||(d=[d]);for(var e,f=d.length,g=0;g1&&null==d[0].offset&&(d[0].offset=0);for(var b=0,c=d[0].offset,e=1;e1)throw new TypeError("Keyframe offsets must be between 0 and 1.")}}else if("composite"==d){if("add"==f||"accumulate"==f)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};if("replace"!=f)throw new TypeError("Invalid composite mode "+f+".")}else f="easing"==d?a.normalizeEasing(f):""+f;e(d,f,c)}return void 0==c.offset&&(c.offset=null),void 0==c.easing&&(c.easing="linear"),c}),g=!0,h=-(1/0),i=0;i=0&&a.offset<=1}),g||c(),d}var h={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},i=document.createElementNS("http://www.w3.org/1999/xhtml","div"),j={thin:"1px",medium:"3px",thick:"5px"},k={borderBottomWidth:j,borderLeftWidth:j,borderRightWidth:j,borderTopWidth:j,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:j,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};a.convertToArrayForm=f,a.normalizeKeyframes=g}(c,f),function(a){var b={};a.isDeprecated=function(a,c,d,e){var f=e?"are":"is",g=new Date,h=new Date(c);return h.setMonth(h.getMonth()+3),!(g=a.applyFrom&&c0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(a){a=+a,isNaN(a)||(b.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-a/this._playbackRate),this._currentTimePending=!1,this._currentTime!=a&&(this._idle&&(this._idle=!1,this._paused=!0),this._tickCurrentTime(a,!0),b.applyDirtiedAnimation(this)))},get startTime(){return this._startTime},set startTime(a){a=+a,isNaN(a)||this._paused||this._idle||(this._startTime=a,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),b.applyDirtiedAnimation(this))},get playbackRate(){return this._playbackRate},set playbackRate(a){if(a!=this._playbackRate){var c=this.currentTime;this._playbackRate=a,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&(this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),b.applyDirtiedAnimation(this)),null!=c&&(this.currentTime=c)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},_rewind:function(){if(this._playbackRate>=0)this._currentTime=0;else{if(!(this._totalDuration<1/0))throw new DOMException("Unable to rewind negative playback rate animation with infinite duration","InvalidStateError");this._currentTime=this._totalDuration}},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),b.applyDirtiedAnimation(this)},pause:function(){this._isFinished||this._paused||this._idle?this._idle&&(this._rewind(),this._idle=!1):this._currentTimePending=!0,this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1,b.applyDirtiedAnimation(this))},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._isFinished=!0,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this._effect._update(null),b.applyDirtiedAnimation(this))},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(a,b){"function"==typeof b&&"finish"==a&&this._finishHandlers.push(b)},removeEventListener:function(a,b){if("finish"==a){var c=this._finishHandlers.indexOf(b);c>=0&&this._finishHandlers.splice(c,1)}},_fireEvents:function(a){if(this._isFinished){if(!this._finishedFlag){var b=new d(this,this._currentTime,a),c=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){c.forEach(function(a){a.call(b.target,b)})},0),this._finishedFlag=!0}}else this._finishedFlag=!1},_tick:function(a,b){this._idle||this._paused||(null==this._startTime?b&&(this.startTime=a-this._currentTime/this.playbackRate):this._isFinished||this._tickCurrentTime((a-this._startTime)*this.playbackRate)),b&&(this._currentTimePending=!1,this._fireEvents(a))},get _needsTick(){return this.playState in{pending:1,running:1}||!this._finishedFlag},_targetAnimations:function(){var a=this._effect._target;return a._activeAnimations||(a._activeAnimations=[]),a._activeAnimations},_markTarget:function(){var a=this._targetAnimations();a.indexOf(this)===-1&&a.push(this)},_unmarkTarget:function(){var a=this._targetAnimations(),b=a.indexOf(this);b!==-1&&a.splice(b,1)}}}(c,d,f),function(a,b,c){function d(a){var b=j;j=[],ad?c%=d:d%=c;return c=a*b/(c+d)}function g(a){return function(b){var c=a(b);return c&&(c[0]=void 0),c}}function h(a,b){return function(c){var d=a(c);return d?d:[b,c]}}function i(b,c){for(var d=[],e=0;e=1?b:"visible"}]}a.addPropertiesHandler(String,c,["visibility"])}(d),function(a,b){function c(a){a=a.trim(),f.fillStyle="#000",f.fillStyle=a;var b=f.fillStyle;if(f.fillStyle="#fff",f.fillStyle=a,b==f.fillStyle){f.fillRect(0,0,1,1);var c=f.getImageData(0,0,1,1).data;f.clearRect(0,0,1,1);var d=c[3]/255;return[c[0]*d,c[1]*d,c[2]*d,d]}}function d(b,c){return[b,c,function(b){function c(a){return Math.max(0,Math.min(255,a))}if(b[3])for(var d=0;d<3;d++)b[d]=Math.round(c(b[d]/b[3]));return b[3]=a.numberToString(a.clamp(0,1,b[3])),"rgba("+b.join(",")+")"}]}var e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");e.width=e.height=1;var f=e.getContext("2d");a.addPropertiesHandler(c,d,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","outline-color","text-decoration-color"]),a.consumeColor=a.consumeParenthesised.bind(null,c),a.mergeColors=d}(d,f),function(a,b){function c(a,b){if(b=b.trim().toLowerCase(),"0"==b&&"px".search(a)>=0)return{px:0};if(/^[^(]*$|^calc/.test(b)){b=b.replace(/calc\(/g,"(");var c={};b=b.replace(a,function(a){return c[a]=null,"U"+a});for(var d="U("+a.source+")",e=b.replace(/[-+]?(\d*\.)?\d+/g,"N").replace(new RegExp("N"+d,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),f=[/N\*(D)/g,/(N|D)[*\/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],g=0;g1?"calc("+c+")":c}]}var f="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",g=c.bind(null,new RegExp(f,"g")),h=c.bind(null,new RegExp(f+"|%","g")),i=c.bind(null,/deg|rad|grad|turn/g);a.parseLength=g,a.parseLengthOrPercent=h,a.consumeLengthOrPercent=a.consumeParenthesised.bind(null,h),a.parseAngle=i,a.mergeDimensions=e;var j=a.consumeParenthesised.bind(null,g),k=a.consumeRepeated.bind(void 0,j,/^/),l=a.consumeRepeated.bind(void 0,k,/^,/);a.consumeSizePairList=l;var m=function(a){var b=l(a);if(b&&""==b[1])return b[0]},n=a.mergeNestedRepeated.bind(void 0,d," "),o=a.mergeNestedRepeated.bind(void 0,n,",");a.mergeNonNegativeSizePair=n,a.addPropertiesHandler(m,o,["background-size"]),a.addPropertiesHandler(h,d,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),a.addPropertiesHandler(h,e,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","text-indent","top","vertical-align","word-spacing"])}(d,f),function(a,b){function c(b){return a.consumeLengthOrPercent(b)||a.consumeToken(/^auto/,b)}function d(b){var d=a.consumeList([a.ignore(a.consumeToken.bind(null,/^rect/)),a.ignore(a.consumeToken.bind(null,/^\(/)),a.consumeRepeated.bind(null,c,/^,/),a.ignore(a.consumeToken.bind(null,/^\)/))],b);if(d&&4==d[0].length)return d[0]}function e(b,c){return"auto"==b||"auto"==c?[!0,!1,function(d){var e=d?b:c;if("auto"==e)return"auto";var f=a.mergeDimensions(e,e);return f[2](f[0])}]:a.mergeDimensions(b,c)}function f(a){return"rect("+a+")"}var g=a.mergeWrappedNestedRepeated.bind(null,f,e,", ");a.parseBox=d,a.mergeBoxes=g,a.addPropertiesHandler(d,g,["clip"])}(d,f),function(a,b){function c(a){return function(b){var c=0;return a.map(function(a){return a===k?b[c++]:a})}}function d(a){return a}function e(b){if(b=b.toLowerCase().trim(),"none"==b)return[];for(var c,d=/\s*(\w+)\(([^)]*)\)/g,e=[],f=0;c=d.exec(b);){if(c.index!=f)return;f=c.index+c[0].length;var g=c[1],h=n[g];if(!h)return;var i=c[2].split(","),j=h[0];if(j.length=0&&this._cancelHandlers.splice(c,1)}else i.call(this,a,b)},f}}}(),function(a){var b=document.documentElement,c=null,d=!1;try{var e=getComputedStyle(b).getPropertyValue("opacity"),f="0"==e?"1":"0";c=b.animate({opacity:[f,f]},{duration:1}),c.currentTime=0,d=getComputedStyle(b).getPropertyValue("opacity")==f}catch(a){}finally{c&&c.cancel()}if(!d){var g=window.Element.prototype.animate;window.Element.prototype.animate=function(b,c){return window.Symbol&&Symbol.iterator&&Array.prototype.from&&b[Symbol.iterator]&&(b=Array.from(b)),Array.isArray(b)||null===b||(b=a.convertToArrayForm(b)),g.call(this,b,c)}}}(c),!function(a,b,c){function d(a){var c=b.timeline;c.currentTime=a,c._discardAnimations(),0==c._animations.length?f=!1:requestAnimationFrame(d)}var e=window.requestAnimationFrame;window.requestAnimationFrame=function(a){return e(function(c){b.timeline._updateAnimationsPromises(),a(c),b.timeline._updateAnimationsPromises()})},b.AnimationTimeline=function(){this._animations=[],this.currentTime=void 0},b.AnimationTimeline.prototype={getAnimations:function(){return this._discardAnimations(),this._animations.slice()},_updateAnimationsPromises:function(){b.animationsWithPromises=b.animationsWithPromises.filter(function(a){return a._updatePromises()})},_discardAnimations:function(){this._updateAnimationsPromises(),this._animations=this._animations.filter(function(a){return"finished"!=a.playState&&"idle"!=a.playState})},_play:function(a){var c=new b.Animation(a,this);return this._animations.push(c),b.restartWebAnimationsNextTick(),c._updatePromises(),c._animation.play(),c._updatePromises(),c},play:function(a){return a&&a.remove(),this._play(a)}};var f=!1;b.restartWebAnimationsNextTick=function(){f||(f=!0,requestAnimationFrame(d))};var g=new b.AnimationTimeline;b.timeline=g;try{Object.defineProperty(window.document,"timeline",{configurable:!0,get:function(){return g}})}catch(a){}try{window.document.timeline=g}catch(a){}}(c,e,f),function(a,b,c){b.animationsWithPromises=[],b.Animation=function(b,c){if(this.id="",b&&b._id&&(this.id=b._id),this.effect=b,b&&(b._animation=this),!c)throw new Error("Animation with null timeline is not supported");this._timeline=c,this._sequenceNumber=a.sequenceNumber++,this._holdTime=0,this._paused=!1,this._isGroup=!1,this._animation=null,this._childAnimations=[],this._callback=null,this._oldPlayState="idle",this._rebuildUnderlyingAnimation(),this._animation.cancel(),this._updatePromises()},b.Animation.prototype={_updatePromises:function(){var a=this._oldPlayState,b=this.playState;return this._readyPromise&&b!==a&&("idle"==b?(this._rejectReadyPromise(),this._readyPromise=void 0):"pending"==a?this._resolveReadyPromise():"pending"==b&&(this._readyPromise=void 0)),this._finishedPromise&&b!==a&&("idle"==b?(this._rejectFinishedPromise(),this._finishedPromise=void 0):"finished"==b?this._resolveFinishedPromise():"finished"==a&&(this._finishedPromise=void 0)),this._oldPlayState=this.playState,this._readyPromise||this._finishedPromise},_rebuildUnderlyingAnimation:function(){this._updatePromises();var a,c,d,e,f=!!this._animation;f&&(a=this.playbackRate,c=this._paused,d=this.startTime,e=this.currentTime,this._animation.cancel(),this._animation._wrapper=null,this._animation=null),(!this.effect||this.effect instanceof window.KeyframeEffect)&&(this._animation=b.newUnderlyingAnimationForKeyframeEffect(this.effect),b.bindAnimationForKeyframeEffect(this)),(this.effect instanceof window.SequenceEffect||this.effect instanceof window.GroupEffect)&&(this._animation=b.newUnderlyingAnimationForGroup(this.effect),b.bindAnimationForGroup(this)),this.effect&&this.effect._onsample&&b.bindAnimationForCustomEffect(this),f&&(1!=a&&(this.playbackRate=a),null!==d?this.startTime=d:null!==e?this.currentTime=e:null!==this._holdTime&&(this.currentTime=this._holdTime),c&&this.pause()),this._updatePromises()},_updateChildren:function(){if(this.effect&&"idle"!=this.playState){var a=this.effect._timing.delay;this._childAnimations.forEach(function(c){this._arrangeChildren(c,a),this.effect instanceof window.SequenceEffect&&(a+=b.groupChildDuration(c.effect))}.bind(this))}},_setExternalAnimation:function(a){if(this.effect&&this._isGroup)for(var b=0;b "ccsLinker.opt") + @echo 'Flags: -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -Ooff --opt_for_speed=0 --define=ENABLE_LFN --define=DEBUG_TEST_FUNCTIONS --define=TARGET_IS_TM4C129_RA0 --define=ccs="ccs" --define=ccs --define=TIVAWARE --define=PART_TM4C129XNCZAD -g --gcc --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --abi=eabi -z -m"Embedded.map" --heap_size=20480 --stack_size=4095 -i"C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/lib" -i"C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="Embedded_linkInfo.xml" --rom_model' + $(shell echo -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -Ooff --opt_for_speed=0 --define=ENABLE_LFN --define=DEBUG_TEST_FUNCTIONS --define=TARGET_IS_TM4C129_RA0 --define=ccs="ccs" --define=ccs --define=TIVAWARE --define=PART_TM4C129XNCZAD -g --gcc --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --abi=eabi -z -m"Embedded.map" --heap_size=20480 --stack_size=4095 -i"C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/lib" -i"C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="Embedded_linkInfo.xml" --rom_model > "ccsLinker.opt") $(shell type "ccsObjs.opt" >> "ccsLinker.opt") - "C:/TI/ccsv7/tools/compiler/ti-cgt-arm_16.9.4.LTS/bin/armcl" -@"ccsLinker.opt" -o "Embedded.out" - @echo 'Finished building target: $@' + "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/bin/armcl" -@"ccsLinker.opt" -o "Embedded.out" + @echo 'Finished building target: "$@"' @echo ' ' @$(MAKE) --no-print-directory post-build Embedded.bin: $(EXE_OUTPUTS) + @echo 'Building files: $(strip $(EXE_OUTPUTS__QUOTED))' @echo 'Invoking: ARM Hex Utility' - "C:/TI/ccsv7/tools/compiler/ti-cgt-arm_16.9.4.LTS/bin/armhex" -o "Embedded.bin" $(EXE_OUTPUTS__QUOTED) - @echo 'Finished building: $@' + "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/bin/armhex" -o "Embedded.bin" $(EXE_OUTPUTS__QUOTED) + @echo 'Finished building: $(strip $(EXE_OUTPUTS__QUOTED))' @echo ' ' @$(MAKE) --no-print-directory post-build @@ -628,52 +653,53 @@ Embedded.bin: $(EXE_OUTPUTS) clean: -$(RM) $(GEN_CMDS__QUOTED)$(GEN_MISC_FILES__QUOTED)$(BIN_OUTPUTS__QUOTED)$(GEN_FILES__QUOTED)$(EXE_OUTPUTS__QUOTED)$(GEN_OPTS__QUOTED) -$(RMDIR) $(GEN_MISC_DIRS__QUOTED) - -$(RM) "Main.obj" "delay.obj" "Common\SWUpdate\FileSystem.obj" "Common\SWUpdate\FirmwareUpgrade.obj" "Common\SW_Info\SW_Info.obj" "Common\Software_CRC\sw_crc.obj" "Common\Sys_PinOut_Config\MCU_MAIN_pinout.obj" "Common\Sys_PinOut_Config\Pin.obj" "Common\Sys_PinOut_Config\Pin_config.obj" "Common\Utilities\Update.obj" "Common\Utilities\Utils.obj" "Common\Utilities\idle_task.obj" "Common\Utilities\ustdlib.obj" "Common\protobuf-c\person-pb-c.obj" "Common\protobuf-c\protobuf-c.obj" "Common\report\distributor.obj" "Common\report\filter.obj" "Common\report\reportInit.obj" "Communication\CommunicationTask.obj" "Communication\Connection.obj" "Communication\Container.obj" "Communication\PMR\Common\ErrorCode.pb-c.obj" "Communication\PMR\Common\ErrorResponse.pb-c.obj" "Communication\PMR\Common\MessageContainer.pb-c.obj" "Communication\PMR\Common\MessageType.pb-c.obj" "Communication\PMR\Connection\ConnectRequest.pb-c.obj" "Communication\PMR\Connection\ConnectResponse.pb-c.obj" "Communication\PMR\Connection\DeviceInformation.pb-c.obj" - -$(RM) "Communication\PMR\Connection\DisconnectRequest.pb-c.obj" "Communication\PMR\Connection\DisconnectResponse.pb-c.obj" "Communication\PMR\Connection\KeepAliveRequest.pb-c.obj" "Communication\PMR\Connection\KeepAliveResponse.pb-c.obj" "Communication\PMR\Debugging\DebugLogCategory.pb-c.obj" "Communication\PMR\Debugging\StartDebugLogRequest.pb-c.obj" "Communication\PMR\Debugging\StartDebugLogResponse.pb-c.obj" "Communication\PMR\Debugging\StopDebugLogRequest.pb-c.obj" "Communication\PMR\Debugging\StopDebugLogResponse.pb-c.obj" "Communication\PMR\Diagnostics\DataFileFrame.pb-c.obj" "Communication\PMR\Diagnostics\DiagnosticsMonitors.pb-c.obj" "Communication\PMR\Diagnostics\DigitalInterfaceState.pb-c.obj" "Communication\PMR\Diagnostics\DispenserAbortHomingRequest.pb-c.obj" "Communication\PMR\Diagnostics\DispenserAbortHomingResponse.pb-c.obj" "Communication\PMR\Diagnostics\DispenserAbortJoggingRequest.pb-c.obj" "Communication\PMR\Diagnostics\DispenserAbortJoggingResponse.pb-c.obj" "Communication\PMR\Diagnostics\DispenserHomingRequest.pb-c.obj" - -$(RM) "Communication\PMR\Diagnostics\DispenserHomingResponse.pb-c.obj" "Communication\PMR\Diagnostics\DispenserJoggingRequest.pb-c.obj" "Communication\PMR\Diagnostics\DispenserJoggingResponse.pb-c.obj" "Communication\PMR\Diagnostics\DoubleArray.pb-c.obj" "Communication\PMR\Diagnostics\Event.pb-c.obj" "Communication\PMR\Diagnostics\EventType.pb-c.obj" "Communication\PMR\Diagnostics\HeaterState.pb-c.obj" "Communication\PMR\Diagnostics\HeaterType.pb-c.obj" "Communication\PMR\Diagnostics\InterfaceIOs.pb-c.obj" "Communication\PMR\Diagnostics\MotorAbortHomingRequest.pb-c.obj" "Communication\PMR\Diagnostics\MotorAbortHomingResponse.pb-c.obj" "Communication\PMR\Diagnostics\MotorAbortJoggingRequest.pb-c.obj" "Communication\PMR\Diagnostics\MotorAbortJoggingResponse.pb-c.obj" "Communication\PMR\Diagnostics\MotorDirection.pb-c.obj" "Communication\PMR\Diagnostics\MotorHomingRequest.pb-c.obj" "Communication\PMR\Diagnostics\MotorHomingResponse.pb-c.obj" "Communication\PMR\Diagnostics\MotorJoggingRequest.pb-c.obj" - -$(RM) "Communication\PMR\Diagnostics\MotorJoggingResponse.pb-c.obj" "Communication\PMR\Diagnostics\ResolveEventRequest.pb-c.obj" "Communication\PMR\Diagnostics\ResolveEventResponse.pb-c.obj" "Communication\PMR\Diagnostics\SetBlowerStateRequest.pb-c.obj" "Communication\PMR\Diagnostics\SetBlowerStateResponse.pb-c.obj" "Communication\PMR\Diagnostics\SetComponentValueRequest.pb-c.obj" "Communication\PMR\Diagnostics\SetComponentValueResponse.pb-c.obj" "Communication\PMR\Diagnostics\SetDigitalOutRequest.pb-c.obj" "Communication\PMR\Diagnostics\SetDigitalOutResponse.pb-c.obj" "Communication\PMR\Diagnostics\SetHeaterStateRequest.pb-c.obj" "Communication\PMR\Diagnostics\SetHeaterStateResponse.pb-c.obj" "Communication\PMR\Diagnostics\SetValveStateRequest.pb-c.obj" "Communication\PMR\Diagnostics\SetValveStateResponse.pb-c.obj" "Communication\PMR\Diagnostics\StartDiagnosticsRequest.pb-c.obj" "Communication\PMR\Diagnostics\StartDiagnosticsResponse.pb-c.obj" "Communication\PMR\Diagnostics\StartEventsNotificationRequest.pb-c.obj" - -$(RM) "Communication\PMR\Diagnostics\StartEventsNotificationResponse.pb-c.obj" "Communication\PMR\Diagnostics\StopDiagnosticsRequest.pb-c.obj" "Communication\PMR\Diagnostics\StopDiagnosticsResponse.pb-c.obj" "Communication\PMR\Diagnostics\StopEventsNotificationRequest.pb-c.obj" "Communication\PMR\Diagnostics\StopEventsNotificationResponse.pb-c.obj" "Communication\PMR\Diagnostics\ThreadAbortJoggingRequest.pb-c.obj" "Communication\PMR\Diagnostics\ThreadAbortJoggingResponse.pb-c.obj" "Communication\PMR\Diagnostics\ThreadJoggingRequest.pb-c.obj" "Communication\PMR\Diagnostics\ThreadJoggingResponse.pb-c.obj" "Communication\PMR\Diagnostics\ValueComponent.pb-c.obj" "Communication\PMR\Diagnostics\ValueComponentState.pb-c.obj" "Communication\PMR\Diagnostics\ValveState.pb-c.obj" "Communication\PMR\Diagnostics\ValveStateCode.pb-c.obj" "Communication\PMR\Diagnostics\ValveType.pb-c.obj" "Communication\PMR\FirmwareUpgrade\ActivateVersionRequest.pb-c.obj" "Communication\PMR\FirmwareUpgrade\ActivateVersionResponse.pb-c.obj" - -$(RM) "Communication\PMR\FirmwareUpgrade\ValidateVersionRequest.pb-c.obj" "Communication\PMR\FirmwareUpgrade\ValidateVersionResponse.pb-c.obj" "Communication\PMR\FirmwareUpgrade\VersionFileDescriptor.pb-c.obj" "Communication\PMR\FirmwareUpgrade\VersionFileDestination.pb-c.obj" "Communication\PMR\FirmwareUpgrade\VersionPackageDescriptor.pb-c.obj" "Communication\PMR\Hardware\HardwareBlower.pb-c.obj" "Communication\PMR\Hardware\HardwareBlowerType.pb-c.obj" "Communication\PMR\Hardware\HardwareBreakSensor.pb-c.obj" "Communication\PMR\Hardware\HardwareBreakSensorType.pb-c.obj" "Communication\PMR\Hardware\HardwareConfiguration.pb-c.obj" "Communication\PMR\Hardware\HardwareDancer.pb-c.obj" "Communication\PMR\Hardware\HardwareDancerType.pb-c.obj" "Communication\PMR\Hardware\HardwareDispenser.pb-c.obj" "Communication\PMR\Hardware\HardwareDispenserType.pb-c.obj" "Communication\PMR\Hardware\HardwareMotor.pb-c.obj" "Communication\PMR\Hardware\HardwareMotorType.pb-c.obj" "Communication\PMR\Hardware\HardwarePidControl.pb-c.obj" - -$(RM) "Communication\PMR\Hardware\HardwarePidControlType.pb-c.obj" "Communication\PMR\Hardware\HardwareSpeedSensor.pb-c.obj" "Communication\PMR\Hardware\HardwareSpeedSensorType.pb-c.obj" "Communication\PMR\Hardware\HardwareWinder.pb-c.obj" "Communication\PMR\Hardware\HardwareWinderType.pb-c.obj" "Communication\PMR\Hardware\SystemResetRequest.pb-c.obj" "Communication\PMR\Hardware\SystemResetResponse.pb-c.obj" "Communication\PMR\Hardware\UploadHardwareConfigurationRequest.pb-c.obj" "Communication\PMR\Hardware\UploadHardwareConfigurationResponse.pb-c.obj" "Communication\PMR\IO\CreateRequest.pb-c.obj" "Communication\PMR\IO\CreateResponse.pb-c.obj" "Communication\PMR\IO\DeleteRequest.pb-c.obj" "Communication\PMR\IO\DeleteResponse.pb-c.obj" "Communication\PMR\IO\ExecuteProcessRequest.pb-c.obj" "Communication\PMR\IO\ExecuteProcessResponse.pb-c.obj" "Communication\PMR\IO\FileAttribute.pb-c.obj" "Communication\PMR\IO\FileChunkDownloadRequest.pb-c.obj" "Communication\PMR\IO\FileChunkDownloadResponse.pb-c.obj" - -$(RM) "Communication\PMR\IO\FileChunkUploadRequest.pb-c.obj" "Communication\PMR\IO\FileChunkUploadResponse.pb-c.obj" "Communication\PMR\IO\FileDownloadRequest.pb-c.obj" "Communication\PMR\IO\FileDownloadResponse.pb-c.obj" "Communication\PMR\IO\FileInfo.pb-c.obj" "Communication\PMR\IO\FileUploadRequest.pb-c.obj" "Communication\PMR\IO\FileUploadResponse.pb-c.obj" "Communication\PMR\IO\GetFilesRequest.pb-c.obj" "Communication\PMR\IO\GetFilesResponse.pb-c.obj" "Communication\PMR\IO\GetStorageInfoRequest.pb-c.obj" "Communication\PMR\IO\GetStorageInfoResponse.pb-c.obj" "Communication\PMR\IO\KillProcessRequest.pb-c.obj" "Communication\PMR\IO\KillProcessResponse.pb-c.obj" "Communication\PMR\Printing\AbortJobRequest.pb-c.obj" "Communication\PMR\Printing\AbortJobResponse.pb-c.obj" "Communication\PMR\Printing\CurrentJobRequest.pb-c.obj" "Communication\PMR\Printing\CurrentJobResponse.pb-c.obj" "Communication\PMR\Printing\DispenserLiquidType.pb-c.obj" "Communication\PMR\Printing\DispenserStepDivision.pb-c.obj" - -$(RM) "Communication\PMR\Printing\JobBrushStop.pb-c.obj" "Communication\PMR\Printing\JobDispenser.pb-c.obj" "Communication\PMR\Printing\JobRequest.pb-c.obj" "Communication\PMR\Printing\JobResponse.pb-c.obj" "Communication\PMR\Printing\JobSegment.pb-c.obj" "Communication\PMR\Printing\JobSpool.pb-c.obj" "Communication\PMR\Printing\JobSpoolType.pb-c.obj" "Communication\PMR\Printing\JobStatus.pb-c.obj" "Communication\PMR\Printing\JobTicket.pb-c.obj" "Communication\PMR\Printing\JobWindingMethod.pb-c.obj" "Communication\PMR\Printing\ProcessParameters.pb-c.obj" "Communication\PMR\Printing\ResumeCurrentJobRequest.pb-c.obj" "Communication\PMR\Printing\ResumeCurrentJobResponse.pb-c.obj" "Communication\PMR\Printing\UploadProcessParametersRequest.pb-c.obj" "Communication\PMR\Printing\UploadProcessParametersResponse.pb-c.obj" "Communication\PMR\Stubs\CalculateRequest.pb-c.obj" "Communication\PMR\Stubs\CalculateResponse.pb-c.obj" "Communication\PMR\Stubs\ProgressRequest.pb-c.obj" "Communication\PMR\Stubs\ProgressResponse.pb-c.obj" - -$(RM) "Communication\PMR\Stubs\StubAbortJobRequest.pb-c.obj" "Communication\PMR\Stubs\StubAbortJobResponse.pb-c.obj" "Communication\PMR\Stubs\StubCartridgeReadRequest.pb-c.obj" "Communication\PMR\Stubs\StubCartridgeReadResponse.pb-c.obj" "Communication\PMR\Stubs\StubCartridgeWriteRequest.pb-c.obj" "Communication\PMR\Stubs\StubCartridgeWriteResponse.pb-c.obj" "Communication\PMR\Stubs\StubDancerPositionRequest.pb-c.obj" "Communication\PMR\Stubs\StubDancerPositionResponse.pb-c.obj" "Communication\PMR\Stubs\StubDispenserRequest.pb-c.obj" "Communication\PMR\Stubs\StubDispenserResponse.pb-c.obj" "Communication\PMR\Stubs\StubExtFlashReadRequest.pb-c.obj" "Communication\PMR\Stubs\StubExtFlashReadResponse.pb-c.obj" "Communication\PMR\Stubs\StubExtFlashReadWordsRequest.pb-c.obj" "Communication\PMR\Stubs\StubExtFlashReadWordsResponse.pb-c.obj" "Communication\PMR\Stubs\StubExtFlashWriteRequest.pb-c.obj" "Communication\PMR\Stubs\StubExtFlashWriteResponse.pb-c.obj" "Communication\PMR\Stubs\StubExtFlashWriteWordsRequest.pb-c.obj" - -$(RM) "Communication\PMR\Stubs\StubExtFlashWriteWordsResponse.pb-c.obj" "Communication\PMR\Stubs\StubF3Gpo01WriteRequest.pb-c.obj" "Communication\PMR\Stubs\StubF3Gpo01WriteResponse.pb-c.obj" "Communication\PMR\Stubs\StubFPGAReadBackRegRequest.pb-c.obj" "Communication\PMR\Stubs\StubFPGAReadBackRegResponse.pb-c.obj" "Communication\PMR\Stubs\StubFPGAReadVersionRequest.pb-c.obj" "Communication\PMR\Stubs\StubFPGAReadVersionResponse.pb-c.obj" "Communication\PMR\Stubs\StubFpgaReadRegRequest.pb-c.obj" "Communication\PMR\Stubs\StubFpgaReadRegResponse.pb-c.obj" "Communication\PMR\Stubs\StubFpgaWriteRegRequest.pb-c.obj" "Communication\PMR\Stubs\StubFpgaWriteRegResponse.pb-c.obj" "Communication\PMR\Stubs\StubGPIOInputSetupRequest.pb-c.obj" "Communication\PMR\Stubs\StubGPIOInputSetupResponse.pb-c.obj" "Communication\PMR\Stubs\StubGPIOReadBitRequest.pb-c.obj" "Communication\PMR\Stubs\StubGPIOReadBitResponse.pb-c.obj" "Communication\PMR\Stubs\StubGPIOReadByteRequest.pb-c.obj" "Communication\PMR\Stubs\StubGPIOReadByteResponse.pb-c.obj" - -$(RM) "Communication\PMR\Stubs\StubGPIOWriteBitRequest.pb-c.obj" "Communication\PMR\Stubs\StubGPIOWriteBitResponse.pb-c.obj" "Communication\PMR\Stubs\StubGPIOWriteByteRequest.pb-c.obj" "Communication\PMR\Stubs\StubGPIOWriteByteResponse.pb-c.obj" "Communication\PMR\Stubs\StubHWVersionRequest.pb-c.obj" "Communication\PMR\Stubs\StubHWVersionResponse.pb-c.obj" "Communication\PMR\Stubs\StubHeaterRequest.pb-c.obj" "Communication\PMR\Stubs\StubHeaterResponse.pb-c.obj" "Communication\PMR\Stubs\StubHeatingTestPollRequest.pb-c.obj" "Communication\PMR\Stubs\StubHeatingTestPollResponse.pb-c.obj" "Communication\PMR\Stubs\StubHeatingTestRequest.pb-c.obj" "Communication\PMR\Stubs\StubHeatingTestResponse.pb-c.obj" "Communication\PMR\Stubs\StubI2CReadBytesRequest.pb-c.obj" "Communication\PMR\Stubs\StubI2CReadBytesResponse.pb-c.obj" "Communication\PMR\Stubs\StubI2CRequest.pb-c.obj" "Communication\PMR\Stubs\StubI2CResponse.pb-c.obj" "Communication\PMR\Stubs\StubI2CWriteBytesRequest.pb-c.obj" "Communication\PMR\Stubs\StubI2CWriteBytesResponse.pb-c.obj" - -$(RM) "Communication\PMR\Stubs\StubIntADCReadRequest.pb-c.obj" "Communication\PMR\Stubs\StubIntADCReadResponse.pb-c.obj" "Communication\PMR\Stubs\StubJobRequest.pb-c.obj" "Communication\PMR\Stubs\StubJobResponse.pb-c.obj" "Communication\PMR\Stubs\StubL6470DriverRequest.pb-c.obj" "Communication\PMR\Stubs\StubL6470DriverResponse.pb-c.obj" "Communication\PMR\Stubs\StubMidTankPressureSensorRequest.pb-c.obj" "Communication\PMR\Stubs\StubMidTankPressureSensorResponse.pb-c.obj" "Communication\PMR\Stubs\StubMotorHomeMarkRequest.pb-c.obj" "Communication\PMR\Stubs\StubMotorHomeMarkResponse.pb-c.obj" "Communication\PMR\Stubs\StubMotorInitRequest.pb-c.obj" "Communication\PMR\Stubs\StubMotorInitResponse.pb-c.obj" "Communication\PMR\Stubs\StubMotorMovRequest.pb-c.obj" "Communication\PMR\Stubs\StubMotorMovResponse.pb-c.obj" "Communication\PMR\Stubs\StubMotorPositionRequest.pb-c.obj" "Communication\PMR\Stubs\StubMotorPositionResponse.pb-c.obj" "Communication\PMR\Stubs\StubMotorRequest.pb-c.obj" "Communication\PMR\Stubs\StubMotorResponse.pb-c.obj" - -$(RM) "Communication\PMR\Stubs\StubMotorRunRequest.pb-c.obj" "Communication\PMR\Stubs\StubMotorRunResponse.pb-c.obj" "Communication\PMR\Stubs\StubMotorRunStepTickRequest.pb-c.obj" "Communication\PMR\Stubs\StubMotorRunStepTickResponse.pb-c.obj" "Communication\PMR\Stubs\StubMotorSpeedRequest.pb-c.obj" "Communication\PMR\Stubs\StubMotorSpeedResponse.pb-c.obj" "Communication\PMR\Stubs\StubMotorStatusRequest.pb-c.obj" "Communication\PMR\Stubs\StubMotorStatusResponse.pb-c.obj" "Communication\PMR\Stubs\StubMotorStopRequest.pb-c.obj" "Communication\PMR\Stubs\StubMotorStopResponse.pb-c.obj" "Communication\PMR\Stubs\StubOptLimitSwitchRequest.pb-c.obj" "Communication\PMR\Stubs\StubOptLimitSwitchResponse.pb-c.obj" "Communication\PMR\Stubs\StubReadEmbeddedVersionRequest.pb-c.obj" "Communication\PMR\Stubs\StubReadEmbeddedVersionResponse.pb-c.obj" "Communication\PMR\Stubs\StubRealTimeUsageRequest.pb-c.obj" "Communication\PMR\Stubs\StubRealTimeUsageResponse.pb-c.obj" "Communication\PMR\Stubs\StubSpeedSensorRequest.pb-c.obj" - -$(RM) "Communication\PMR\Stubs\StubSpeedSensorResponse.pb-c.obj" "Communication\PMR\Stubs\StubSteperMotorRequest.pb-c.obj" "Communication\PMR\Stubs\StubSteperMotorResponse.pb-c.obj" "Communication\PMR\Stubs\StubTempSensorRequest.pb-c.obj" "Communication\PMR\Stubs\StubTempSensorResponse.pb-c.obj" "Communication\PMR\Stubs\StubTivaReadRegRequest.pb-c.obj" "Communication\PMR\Stubs\StubTivaReadRegResponse.pb-c.obj" "Communication\PMR\Stubs\StubTivaWriteRegRequest.pb-c.obj" "Communication\PMR\Stubs\StubTivaWriteRegResponse.pb-c.obj" "Communication\PMR\Stubs\StubValveRequest.pb-c.obj" "Communication\PMR\Stubs\StubValveResponse.pb-c.obj" "Drivers\ADC_Sampling\ADC.obj" "Drivers\FPGA\FPGA.obj" "Drivers\FPGA\FPGA_SPI_Comm.obj" "Drivers\FPGA\FPGA_SSI_Comm.obj" "Drivers\FPGA\FPGA_GPIO\FPGA_GPIO.obj" "Drivers\FPGA\FPGA_INTERRUPTS\FPGA_Interrupts.obj" "Drivers\FPGA\JTAG_VME\slim_vme_8051\Handle_vme_file.obj" "Drivers\FPGA\JTAG_VME\slim_vme_8051\hardware.obj" "Drivers\FPGA\JTAG_VME\slim_vme_8051\slim_pro.obj" - -$(RM) "Drivers\FPGA\JTAG_VME\slim_vme_8051\slim_vme.obj" "Drivers\FPGA\Moters_Driver\L6470.obj" "Drivers\Flash_Memory\FATFS\Control_File_System.obj" "Drivers\Flash_Memory\FATFS\cc932.obj" "Drivers\Flash_Memory\FATFS\fatfs_port_mx66l51235f.obj" "Drivers\Flash_Memory\FATFS\ff.obj" "Drivers\Flash_Memory\FATFS\mx66l51235f.obj" "Drivers\Flash_Memory\FATFS\spi_flash.obj" "Drivers\Flash_Memory\Flash_Memory.obj" "Drivers\Heater\ADS1220.obj" "Drivers\Heater\Heater.obj" "Drivers\Heater\TemperatureSensor.obj" "Drivers\I2C_Communication\ADC_MUX\ADC_MUX.obj" "Drivers\I2C_Communication\DAC\Blower.obj" "Drivers\I2C_Communication\Dispensers_EEPROM_MUX\Disp_EEPROM_MUX.obj" "Drivers\I2C_Communication\I2C.obj" "Drivers\I2C_Communication\I2C_Comm.obj" "Drivers\I2C_Communication\I2C_Switch\I2C_Swith.obj" "Drivers\I2C_Communication\Thermo_K\MCP9600.obj" "Drivers\Motors\Motor.obj" "Drivers\On_Chip_Flash\Flashstore.obj" "Drivers\SPI\SPI_Comm.obj" "Drivers\SSI_Comm\Dancer\Dancer.obj" "Drivers\SSI_Comm\SSI_Comm.obj" "Drivers\SSI_Comm\Speed_Sensor\Speed_Sensor.obj" - -$(RM) "Drivers\USB_Communication\USBCDCD.obj" "Drivers\Uart_Comm\Uart.obj" "Drivers\Valves\Valve.obj" "Modules\AlarmHandling\AlarmHandling.obj" "Modules\Control\DriverWithCallbackExample.obj" "Modules\Control\MillisecTask.obj" "Modules\Control\PIDAlgo.obj" "Modules\Control\control.obj" "Modules\Diagnostics\DiagnosticActions.obj" "Modules\Diagnostics\Diagnostics.obj" "Modules\Diagnostics\DiagnosticsHoming.obj" "Modules\Diagnostics\DiagnosticsJogging.obj" "Modules\General\GeneralHardware.obj" "Modules\General\process.obj" "Modules\Heaters\Heaters_bit.obj" "Modules\Heaters\Heaters_init.obj" "Modules\Heaters\Heaters_maint.obj" "Modules\Heaters\Heaters_print.obj" "Modules\IDS\IDS_BIT.obj" "Modules\IDS\IDS_dispenser.obj" "Modules\IDS\IDS_init.obj" "Modules\IDS\IDS_maint.obj" "Modules\IDS\IDS_print.obj" "Modules\Stubs_Handler\Calculate.obj" "Modules\Stubs_Handler\Progress.obj" "Modules\Stubs_Handler\StubRealTimeUsage.obj" "Modules\Stubs_Handler\Stub_Cartridge.obj" "Modules\Stubs_Handler\Stub_Dancer.obj" - -$(RM) "Modules\Stubs_Handler\Stub_Dispenser.obj" "Modules\Stubs_Handler\Stub_ExtFlash.obj" "Modules\Stubs_Handler\Stub_FPGARWReg.obj" "Modules\Stubs_Handler\Stub_FPGAReadBackReg.obj" "Modules\Stubs_Handler\Stub_FPGAReadVersion.obj" "Modules\Stubs_Handler\Stub_GPIO.obj" "Modules\Stubs_Handler\Stub_HW_Version.obj" "Modules\Stubs_Handler\Stub_Heater.obj" "Modules\Stubs_Handler\Stub_I2C.obj" "Modules\Stubs_Handler\Stub_IntADC.obj" "Modules\Stubs_Handler\Stub_L6470.obj" "Modules\Stubs_Handler\Stub_MidTankPressureSensor.obj" "Modules\Stubs_Handler\Stub_Motor.obj" "Modules\Stubs_Handler\Stub_OptLimitSwitch.obj" "Modules\Stubs_Handler\Stub_ReadEmbeddedVersion.obj" "Modules\Stubs_Handler\Stub_SpeedSensor.obj" "Modules\Stubs_Handler\Stub_Status.obj" "Modules\Stubs_Handler\Stub_SteperMotor.obj" "Modules\Stubs_Handler\Stub_TempSensor.obj" "Modules\Stubs_Handler\Stub_TivaReg.obj" "Modules\Stubs_Handler\Stub_Valve.obj" "Modules\Stubs_Handler\User_Leds.obj" "Modules\Stubs_Handler\temperature_sensor.obj" "Modules\Thread\Thread_BIT.obj" - -$(RM) "Modules\Thread\Thread_Winder.obj" "Modules\Thread\Thread_init.obj" "Modules\Thread\Thread_maint.obj" "Modules\Thread\Thread_print.obj" "Modules\Waste\Waste_BIT.obj" "Modules\Waste\Waste_init.obj" "Modules\Waste\Waste_maint.obj" "Modules\Waste\Waste_print.obj" "StateMachines\Printing\JobSTM.obj" "StateMachines\Printing\PrintingSTM.obj" - -$(RM) "Main.d" "delay.d" "Common\SWUpdate\FileSystem.d" "Common\SWUpdate\FirmwareUpgrade.d" "Common\SW_Info\SW_Info.d" "Common\Software_CRC\sw_crc.d" "Common\Sys_PinOut_Config\MCU_MAIN_pinout.d" "Common\Sys_PinOut_Config\Pin.d" "Common\Sys_PinOut_Config\Pin_config.d" "Common\Utilities\Update.d" "Common\Utilities\Utils.d" "Common\Utilities\idle_task.d" "Common\Utilities\ustdlib.d" "Common\protobuf-c\person-pb-c.d" "Common\protobuf-c\protobuf-c.d" "Common\report\distributor.d" "Common\report\filter.d" "Common\report\reportInit.d" "Communication\CommunicationTask.d" "Communication\Connection.d" "Communication\Container.d" "Communication\PMR\Common\ErrorCode.pb-c.d" "Communication\PMR\Common\ErrorResponse.pb-c.d" "Communication\PMR\Common\MessageContainer.pb-c.d" "Communication\PMR\Common\MessageType.pb-c.d" "Communication\PMR\Connection\ConnectRequest.pb-c.d" "Communication\PMR\Connection\ConnectResponse.pb-c.d" "Communication\PMR\Connection\DeviceInformation.pb-c.d" "Communication\PMR\Connection\DisconnectRequest.pb-c.d" - -$(RM) "Communication\PMR\Connection\DisconnectResponse.pb-c.d" "Communication\PMR\Connection\KeepAliveRequest.pb-c.d" "Communication\PMR\Connection\KeepAliveResponse.pb-c.d" "Communication\PMR\Debugging\DebugLogCategory.pb-c.d" "Communication\PMR\Debugging\StartDebugLogRequest.pb-c.d" "Communication\PMR\Debugging\StartDebugLogResponse.pb-c.d" "Communication\PMR\Debugging\StopDebugLogRequest.pb-c.d" "Communication\PMR\Debugging\StopDebugLogResponse.pb-c.d" "Communication\PMR\Diagnostics\DataFileFrame.pb-c.d" "Communication\PMR\Diagnostics\DiagnosticsMonitors.pb-c.d" "Communication\PMR\Diagnostics\DigitalInterfaceState.pb-c.d" "Communication\PMR\Diagnostics\DispenserAbortHomingRequest.pb-c.d" "Communication\PMR\Diagnostics\DispenserAbortHomingResponse.pb-c.d" "Communication\PMR\Diagnostics\DispenserAbortJoggingRequest.pb-c.d" "Communication\PMR\Diagnostics\DispenserAbortJoggingResponse.pb-c.d" "Communication\PMR\Diagnostics\DispenserHomingRequest.pb-c.d" "Communication\PMR\Diagnostics\DispenserHomingResponse.pb-c.d" - -$(RM) "Communication\PMR\Diagnostics\DispenserJoggingRequest.pb-c.d" "Communication\PMR\Diagnostics\DispenserJoggingResponse.pb-c.d" "Communication\PMR\Diagnostics\DoubleArray.pb-c.d" "Communication\PMR\Diagnostics\Event.pb-c.d" "Communication\PMR\Diagnostics\EventType.pb-c.d" "Communication\PMR\Diagnostics\HeaterState.pb-c.d" "Communication\PMR\Diagnostics\HeaterType.pb-c.d" "Communication\PMR\Diagnostics\InterfaceIOs.pb-c.d" "Communication\PMR\Diagnostics\MotorAbortHomingRequest.pb-c.d" "Communication\PMR\Diagnostics\MotorAbortHomingResponse.pb-c.d" "Communication\PMR\Diagnostics\MotorAbortJoggingRequest.pb-c.d" "Communication\PMR\Diagnostics\MotorAbortJoggingResponse.pb-c.d" "Communication\PMR\Diagnostics\MotorDirection.pb-c.d" "Communication\PMR\Diagnostics\MotorHomingRequest.pb-c.d" "Communication\PMR\Diagnostics\MotorHomingResponse.pb-c.d" "Communication\PMR\Diagnostics\MotorJoggingRequest.pb-c.d" "Communication\PMR\Diagnostics\MotorJoggingResponse.pb-c.d" "Communication\PMR\Diagnostics\ResolveEventRequest.pb-c.d" - -$(RM) "Communication\PMR\Diagnostics\ResolveEventResponse.pb-c.d" "Communication\PMR\Diagnostics\SetBlowerStateRequest.pb-c.d" "Communication\PMR\Diagnostics\SetBlowerStateResponse.pb-c.d" "Communication\PMR\Diagnostics\SetComponentValueRequest.pb-c.d" "Communication\PMR\Diagnostics\SetComponentValueResponse.pb-c.d" "Communication\PMR\Diagnostics\SetDigitalOutRequest.pb-c.d" "Communication\PMR\Diagnostics\SetDigitalOutResponse.pb-c.d" "Communication\PMR\Diagnostics\SetHeaterStateRequest.pb-c.d" "Communication\PMR\Diagnostics\SetHeaterStateResponse.pb-c.d" "Communication\PMR\Diagnostics\SetValveStateRequest.pb-c.d" "Communication\PMR\Diagnostics\SetValveStateResponse.pb-c.d" "Communication\PMR\Diagnostics\StartDiagnosticsRequest.pb-c.d" "Communication\PMR\Diagnostics\StartDiagnosticsResponse.pb-c.d" "Communication\PMR\Diagnostics\StartEventsNotificationRequest.pb-c.d" "Communication\PMR\Diagnostics\StartEventsNotificationResponse.pb-c.d" "Communication\PMR\Diagnostics\StopDiagnosticsRequest.pb-c.d" - -$(RM) "Communication\PMR\Diagnostics\StopDiagnosticsResponse.pb-c.d" "Communication\PMR\Diagnostics\StopEventsNotificationRequest.pb-c.d" "Communication\PMR\Diagnostics\StopEventsNotificationResponse.pb-c.d" "Communication\PMR\Diagnostics\ThreadAbortJoggingRequest.pb-c.d" "Communication\PMR\Diagnostics\ThreadAbortJoggingResponse.pb-c.d" "Communication\PMR\Diagnostics\ThreadJoggingRequest.pb-c.d" "Communication\PMR\Diagnostics\ThreadJoggingResponse.pb-c.d" "Communication\PMR\Diagnostics\ValueComponent.pb-c.d" "Communication\PMR\Diagnostics\ValueComponentState.pb-c.d" "Communication\PMR\Diagnostics\ValveState.pb-c.d" "Communication\PMR\Diagnostics\ValveStateCode.pb-c.d" "Communication\PMR\Diagnostics\ValveType.pb-c.d" "Communication\PMR\FirmwareUpgrade\ActivateVersionRequest.pb-c.d" "Communication\PMR\FirmwareUpgrade\ActivateVersionResponse.pb-c.d" "Communication\PMR\FirmwareUpgrade\ValidateVersionRequest.pb-c.d" "Communication\PMR\FirmwareUpgrade\ValidateVersionResponse.pb-c.d" "Communication\PMR\FirmwareUpgrade\VersionFileDescriptor.pb-c.d" - -$(RM) "Communication\PMR\FirmwareUpgrade\VersionFileDestination.pb-c.d" "Communication\PMR\FirmwareUpgrade\VersionPackageDescriptor.pb-c.d" "Communication\PMR\Hardware\HardwareBlower.pb-c.d" "Communication\PMR\Hardware\HardwareBlowerType.pb-c.d" "Communication\PMR\Hardware\HardwareBreakSensor.pb-c.d" "Communication\PMR\Hardware\HardwareBreakSensorType.pb-c.d" "Communication\PMR\Hardware\HardwareConfiguration.pb-c.d" "Communication\PMR\Hardware\HardwareDancer.pb-c.d" "Communication\PMR\Hardware\HardwareDancerType.pb-c.d" "Communication\PMR\Hardware\HardwareDispenser.pb-c.d" "Communication\PMR\Hardware\HardwareDispenserType.pb-c.d" "Communication\PMR\Hardware\HardwareMotor.pb-c.d" "Communication\PMR\Hardware\HardwareMotorType.pb-c.d" "Communication\PMR\Hardware\HardwarePidControl.pb-c.d" "Communication\PMR\Hardware\HardwarePidControlType.pb-c.d" "Communication\PMR\Hardware\HardwareSpeedSensor.pb-c.d" "Communication\PMR\Hardware\HardwareSpeedSensorType.pb-c.d" "Communication\PMR\Hardware\HardwareWinder.pb-c.d" - -$(RM) "Communication\PMR\Hardware\HardwareWinderType.pb-c.d" "Communication\PMR\Hardware\SystemResetRequest.pb-c.d" "Communication\PMR\Hardware\SystemResetResponse.pb-c.d" "Communication\PMR\Hardware\UploadHardwareConfigurationRequest.pb-c.d" "Communication\PMR\Hardware\UploadHardwareConfigurationResponse.pb-c.d" "Communication\PMR\IO\CreateRequest.pb-c.d" "Communication\PMR\IO\CreateResponse.pb-c.d" "Communication\PMR\IO\DeleteRequest.pb-c.d" "Communication\PMR\IO\DeleteResponse.pb-c.d" "Communication\PMR\IO\ExecuteProcessRequest.pb-c.d" "Communication\PMR\IO\ExecuteProcessResponse.pb-c.d" "Communication\PMR\IO\FileAttribute.pb-c.d" "Communication\PMR\IO\FileChunkDownloadRequest.pb-c.d" "Communication\PMR\IO\FileChunkDownloadResponse.pb-c.d" "Communication\PMR\IO\FileChunkUploadRequest.pb-c.d" "Communication\PMR\IO\FileChunkUploadResponse.pb-c.d" "Communication\PMR\IO\FileDownloadRequest.pb-c.d" "Communication\PMR\IO\FileDownloadResponse.pb-c.d" "Communication\PMR\IO\FileInfo.pb-c.d" "Communication\PMR\IO\FileUploadRequest.pb-c.d" - -$(RM) "Communication\PMR\IO\FileUploadResponse.pb-c.d" "Communication\PMR\IO\GetFilesRequest.pb-c.d" "Communication\PMR\IO\GetFilesResponse.pb-c.d" "Communication\PMR\IO\GetStorageInfoRequest.pb-c.d" "Communication\PMR\IO\GetStorageInfoResponse.pb-c.d" "Communication\PMR\IO\KillProcessRequest.pb-c.d" "Communication\PMR\IO\KillProcessResponse.pb-c.d" "Communication\PMR\Printing\AbortJobRequest.pb-c.d" "Communication\PMR\Printing\AbortJobResponse.pb-c.d" "Communication\PMR\Printing\CurrentJobRequest.pb-c.d" "Communication\PMR\Printing\CurrentJobResponse.pb-c.d" "Communication\PMR\Printing\DispenserLiquidType.pb-c.d" "Communication\PMR\Printing\DispenserStepDivision.pb-c.d" "Communication\PMR\Printing\JobBrushStop.pb-c.d" "Communication\PMR\Printing\JobDispenser.pb-c.d" "Communication\PMR\Printing\JobRequest.pb-c.d" "Communication\PMR\Printing\JobResponse.pb-c.d" "Communication\PMR\Printing\JobSegment.pb-c.d" "Communication\PMR\Printing\JobSpool.pb-c.d" "Communication\PMR\Printing\JobSpoolType.pb-c.d" - -$(RM) "Communication\PMR\Printing\JobStatus.pb-c.d" "Communication\PMR\Printing\JobTicket.pb-c.d" "Communication\PMR\Printing\JobWindingMethod.pb-c.d" "Communication\PMR\Printing\ProcessParameters.pb-c.d" "Communication\PMR\Printing\ResumeCurrentJobRequest.pb-c.d" "Communication\PMR\Printing\ResumeCurrentJobResponse.pb-c.d" "Communication\PMR\Printing\UploadProcessParametersRequest.pb-c.d" "Communication\PMR\Printing\UploadProcessParametersResponse.pb-c.d" "Communication\PMR\Stubs\CalculateRequest.pb-c.d" "Communication\PMR\Stubs\CalculateResponse.pb-c.d" "Communication\PMR\Stubs\ProgressRequest.pb-c.d" "Communication\PMR\Stubs\ProgressResponse.pb-c.d" "Communication\PMR\Stubs\StubAbortJobRequest.pb-c.d" "Communication\PMR\Stubs\StubAbortJobResponse.pb-c.d" "Communication\PMR\Stubs\StubCartridgeReadRequest.pb-c.d" "Communication\PMR\Stubs\StubCartridgeReadResponse.pb-c.d" "Communication\PMR\Stubs\StubCartridgeWriteRequest.pb-c.d" "Communication\PMR\Stubs\StubCartridgeWriteResponse.pb-c.d" "Communication\PMR\Stubs\StubDancerPositionRequest.pb-c.d" - -$(RM) "Communication\PMR\Stubs\StubDancerPositionResponse.pb-c.d" "Communication\PMR\Stubs\StubDispenserRequest.pb-c.d" "Communication\PMR\Stubs\StubDispenserResponse.pb-c.d" "Communication\PMR\Stubs\StubExtFlashReadRequest.pb-c.d" "Communication\PMR\Stubs\StubExtFlashReadResponse.pb-c.d" "Communication\PMR\Stubs\StubExtFlashReadWordsRequest.pb-c.d" "Communication\PMR\Stubs\StubExtFlashReadWordsResponse.pb-c.d" "Communication\PMR\Stubs\StubExtFlashWriteRequest.pb-c.d" "Communication\PMR\Stubs\StubExtFlashWriteResponse.pb-c.d" "Communication\PMR\Stubs\StubExtFlashWriteWordsRequest.pb-c.d" "Communication\PMR\Stubs\StubExtFlashWriteWordsResponse.pb-c.d" "Communication\PMR\Stubs\StubF3Gpo01WriteRequest.pb-c.d" "Communication\PMR\Stubs\StubF3Gpo01WriteResponse.pb-c.d" "Communication\PMR\Stubs\StubFPGAReadBackRegRequest.pb-c.d" "Communication\PMR\Stubs\StubFPGAReadBackRegResponse.pb-c.d" "Communication\PMR\Stubs\StubFPGAReadVersionRequest.pb-c.d" "Communication\PMR\Stubs\StubFPGAReadVersionResponse.pb-c.d" - -$(RM) "Communication\PMR\Stubs\StubFpgaReadRegRequest.pb-c.d" "Communication\PMR\Stubs\StubFpgaReadRegResponse.pb-c.d" "Communication\PMR\Stubs\StubFpgaWriteRegRequest.pb-c.d" "Communication\PMR\Stubs\StubFpgaWriteRegResponse.pb-c.d" "Communication\PMR\Stubs\StubGPIOInputSetupRequest.pb-c.d" "Communication\PMR\Stubs\StubGPIOInputSetupResponse.pb-c.d" "Communication\PMR\Stubs\StubGPIOReadBitRequest.pb-c.d" "Communication\PMR\Stubs\StubGPIOReadBitResponse.pb-c.d" "Communication\PMR\Stubs\StubGPIOReadByteRequest.pb-c.d" "Communication\PMR\Stubs\StubGPIOReadByteResponse.pb-c.d" "Communication\PMR\Stubs\StubGPIOWriteBitRequest.pb-c.d" "Communication\PMR\Stubs\StubGPIOWriteBitResponse.pb-c.d" "Communication\PMR\Stubs\StubGPIOWriteByteRequest.pb-c.d" "Communication\PMR\Stubs\StubGPIOWriteByteResponse.pb-c.d" "Communication\PMR\Stubs\StubHWVersionRequest.pb-c.d" "Communication\PMR\Stubs\StubHWVersionResponse.pb-c.d" "Communication\PMR\Stubs\StubHeaterRequest.pb-c.d" "Communication\PMR\Stubs\StubHeaterResponse.pb-c.d" - -$(RM) "Communication\PMR\Stubs\StubHeatingTestPollRequest.pb-c.d" "Communication\PMR\Stubs\StubHeatingTestPollResponse.pb-c.d" "Communication\PMR\Stubs\StubHeatingTestRequest.pb-c.d" "Communication\PMR\Stubs\StubHeatingTestResponse.pb-c.d" "Communication\PMR\Stubs\StubI2CReadBytesRequest.pb-c.d" "Communication\PMR\Stubs\StubI2CReadBytesResponse.pb-c.d" "Communication\PMR\Stubs\StubI2CRequest.pb-c.d" "Communication\PMR\Stubs\StubI2CResponse.pb-c.d" "Communication\PMR\Stubs\StubI2CWriteBytesRequest.pb-c.d" "Communication\PMR\Stubs\StubI2CWriteBytesResponse.pb-c.d" "Communication\PMR\Stubs\StubIntADCReadRequest.pb-c.d" "Communication\PMR\Stubs\StubIntADCReadResponse.pb-c.d" "Communication\PMR\Stubs\StubJobRequest.pb-c.d" "Communication\PMR\Stubs\StubJobResponse.pb-c.d" "Communication\PMR\Stubs\StubL6470DriverRequest.pb-c.d" "Communication\PMR\Stubs\StubL6470DriverResponse.pb-c.d" "Communication\PMR\Stubs\StubMidTankPressureSensorRequest.pb-c.d" "Communication\PMR\Stubs\StubMidTankPressureSensorResponse.pb-c.d" - -$(RM) "Communication\PMR\Stubs\StubMotorHomeMarkRequest.pb-c.d" "Communication\PMR\Stubs\StubMotorHomeMarkResponse.pb-c.d" "Communication\PMR\Stubs\StubMotorInitRequest.pb-c.d" "Communication\PMR\Stubs\StubMotorInitResponse.pb-c.d" "Communication\PMR\Stubs\StubMotorMovRequest.pb-c.d" "Communication\PMR\Stubs\StubMotorMovResponse.pb-c.d" "Communication\PMR\Stubs\StubMotorPositionRequest.pb-c.d" "Communication\PMR\Stubs\StubMotorPositionResponse.pb-c.d" "Communication\PMR\Stubs\StubMotorRequest.pb-c.d" "Communication\PMR\Stubs\StubMotorResponse.pb-c.d" "Communication\PMR\Stubs\StubMotorRunRequest.pb-c.d" "Communication\PMR\Stubs\StubMotorRunResponse.pb-c.d" "Communication\PMR\Stubs\StubMotorRunStepTickRequest.pb-c.d" "Communication\PMR\Stubs\StubMotorRunStepTickResponse.pb-c.d" "Communication\PMR\Stubs\StubMotorSpeedRequest.pb-c.d" "Communication\PMR\Stubs\StubMotorSpeedResponse.pb-c.d" "Communication\PMR\Stubs\StubMotorStatusRequest.pb-c.d" "Communication\PMR\Stubs\StubMotorStatusResponse.pb-c.d" - -$(RM) "Communication\PMR\Stubs\StubMotorStopRequest.pb-c.d" "Communication\PMR\Stubs\StubMotorStopResponse.pb-c.d" "Communication\PMR\Stubs\StubOptLimitSwitchRequest.pb-c.d" "Communication\PMR\Stubs\StubOptLimitSwitchResponse.pb-c.d" "Communication\PMR\Stubs\StubReadEmbeddedVersionRequest.pb-c.d" "Communication\PMR\Stubs\StubReadEmbeddedVersionResponse.pb-c.d" "Communication\PMR\Stubs\StubRealTimeUsageRequest.pb-c.d" "Communication\PMR\Stubs\StubRealTimeUsageResponse.pb-c.d" "Communication\PMR\Stubs\StubSpeedSensorRequest.pb-c.d" "Communication\PMR\Stubs\StubSpeedSensorResponse.pb-c.d" "Communication\PMR\Stubs\StubSteperMotorRequest.pb-c.d" "Communication\PMR\Stubs\StubSteperMotorResponse.pb-c.d" "Communication\PMR\Stubs\StubTempSensorRequest.pb-c.d" "Communication\PMR\Stubs\StubTempSensorResponse.pb-c.d" "Communication\PMR\Stubs\StubTivaReadRegRequest.pb-c.d" "Communication\PMR\Stubs\StubTivaReadRegResponse.pb-c.d" "Communication\PMR\Stubs\StubTivaWriteRegRequest.pb-c.d" "Communication\PMR\Stubs\StubTivaWriteRegResponse.pb-c.d" - -$(RM) "Communication\PMR\Stubs\StubValveRequest.pb-c.d" "Communication\PMR\Stubs\StubValveResponse.pb-c.d" "Drivers\ADC_Sampling\ADC.d" "Drivers\FPGA\FPGA.d" "Drivers\FPGA\FPGA_SPI_Comm.d" "Drivers\FPGA\FPGA_SSI_Comm.d" "Drivers\FPGA\FPGA_GPIO\FPGA_GPIO.d" "Drivers\FPGA\FPGA_INTERRUPTS\FPGA_Interrupts.d" "Drivers\FPGA\JTAG_VME\slim_vme_8051\Handle_vme_file.d" "Drivers\FPGA\JTAG_VME\slim_vme_8051\hardware.d" "Drivers\FPGA\JTAG_VME\slim_vme_8051\slim_pro.d" "Drivers\FPGA\JTAG_VME\slim_vme_8051\slim_vme.d" "Drivers\FPGA\Moters_Driver\L6470.d" "Drivers\Flash_Memory\FATFS\Control_File_System.d" "Drivers\Flash_Memory\FATFS\cc932.d" "Drivers\Flash_Memory\FATFS\fatfs_port_mx66l51235f.d" "Drivers\Flash_Memory\FATFS\ff.d" "Drivers\Flash_Memory\FATFS\mx66l51235f.d" "Drivers\Flash_Memory\FATFS\spi_flash.d" "Drivers\Flash_Memory\Flash_Memory.d" "Drivers\Heater\ADS1220.d" "Drivers\Heater\Heater.d" "Drivers\Heater\TemperatureSensor.d" "Drivers\I2C_Communication\ADC_MUX\ADC_MUX.d" "Drivers\I2C_Communication\DAC\Blower.d" - -$(RM) "Drivers\I2C_Communication\Dispensers_EEPROM_MUX\Disp_EEPROM_MUX.d" "Drivers\I2C_Communication\I2C.d" "Drivers\I2C_Communication\I2C_Comm.d" "Drivers\I2C_Communication\I2C_Switch\I2C_Swith.d" "Drivers\I2C_Communication\Thermo_K\MCP9600.d" "Drivers\Motors\Motor.d" "Drivers\On_Chip_Flash\Flashstore.d" "Drivers\SPI\SPI_Comm.d" "Drivers\SSI_Comm\Dancer\Dancer.d" "Drivers\SSI_Comm\SSI_Comm.d" "Drivers\SSI_Comm\Speed_Sensor\Speed_Sensor.d" "Drivers\USB_Communication\USBCDCD.d" "Drivers\Uart_Comm\Uart.d" "Drivers\Valves\Valve.d" "Modules\AlarmHandling\AlarmHandling.d" "Modules\Control\DriverWithCallbackExample.d" "Modules\Control\MillisecTask.d" "Modules\Control\PIDAlgo.d" "Modules\Control\control.d" "Modules\Diagnostics\DiagnosticActions.d" "Modules\Diagnostics\Diagnostics.d" "Modules\Diagnostics\DiagnosticsHoming.d" "Modules\Diagnostics\DiagnosticsJogging.d" "Modules\General\GeneralHardware.d" "Modules\General\process.d" "Modules\Heaters\Heaters_bit.d" "Modules\Heaters\Heaters_init.d" "Modules\Heaters\Heaters_maint.d" - -$(RM) "Modules\Heaters\Heaters_print.d" "Modules\IDS\IDS_BIT.d" "Modules\IDS\IDS_dispenser.d" "Modules\IDS\IDS_init.d" "Modules\IDS\IDS_maint.d" "Modules\IDS\IDS_print.d" "Modules\Stubs_Handler\Calculate.d" "Modules\Stubs_Handler\Progress.d" "Modules\Stubs_Handler\StubRealTimeUsage.d" "Modules\Stubs_Handler\Stub_Cartridge.d" "Modules\Stubs_Handler\Stub_Dancer.d" "Modules\Stubs_Handler\Stub_Dispenser.d" "Modules\Stubs_Handler\Stub_ExtFlash.d" "Modules\Stubs_Handler\Stub_FPGARWReg.d" "Modules\Stubs_Handler\Stub_FPGAReadBackReg.d" "Modules\Stubs_Handler\Stub_FPGAReadVersion.d" "Modules\Stubs_Handler\Stub_GPIO.d" "Modules\Stubs_Handler\Stub_HW_Version.d" "Modules\Stubs_Handler\Stub_Heater.d" "Modules\Stubs_Handler\Stub_I2C.d" "Modules\Stubs_Handler\Stub_IntADC.d" "Modules\Stubs_Handler\Stub_L6470.d" "Modules\Stubs_Handler\Stub_MidTankPressureSensor.d" "Modules\Stubs_Handler\Stub_Motor.d" "Modules\Stubs_Handler\Stub_OptLimitSwitch.d" "Modules\Stubs_Handler\Stub_ReadEmbeddedVersion.d" "Modules\Stubs_Handler\Stub_SpeedSensor.d" - -$(RM) "Modules\Stubs_Handler\Stub_Status.d" "Modules\Stubs_Handler\Stub_SteperMotor.d" "Modules\Stubs_Handler\Stub_TempSensor.d" "Modules\Stubs_Handler\Stub_TivaReg.d" "Modules\Stubs_Handler\Stub_Valve.d" "Modules\Stubs_Handler\User_Leds.d" "Modules\Stubs_Handler\temperature_sensor.d" "Modules\Thread\Thread_BIT.d" "Modules\Thread\Thread_Winder.d" "Modules\Thread\Thread_init.d" "Modules\Thread\Thread_maint.d" "Modules\Thread\Thread_print.d" "Modules\Waste\Waste_BIT.d" "Modules\Waste\Waste_init.d" "Modules\Waste\Waste_maint.d" "Modules\Waste\Waste_print.d" "StateMachines\Printing\JobSTM.d" "StateMachines\Printing\PrintingSTM.d" + -$(RM) "Main.obj" "delay.obj" "Common\SWUpdate\FileSystem.obj" "Common\SWUpdate\FirmwareUpgrade.obj" "Common\SW_Info\SW_Info.obj" "Common\Software_CRC\sw_crc.obj" "Common\Sys_PinOut_Config\MCU_MAIN_pinout.obj" "Common\Sys_PinOut_Config\Pin.obj" "Common\Sys_PinOut_Config\Pin_config.obj" "Common\Utilities\Update.obj" "Common\Utilities\Utils.obj" "Common\Utilities\idle_task.obj" "Common\Utilities\ustdlib.obj" "Common\protobuf-c\protobuf-c.obj" "Common\report\distributor.obj" "Common\report\filter.obj" "Common\report\reportInit.obj" "Communication\CommunicationTask.obj" "Communication\Connection.obj" "Communication\Container.obj" "Communication\PMR\Common\ErrorCode.pb-c.obj" "Communication\PMR\Common\ErrorResponse.pb-c.obj" "Communication\PMR\Common\MessageContainer.pb-c.obj" "Communication\PMR\Common\MessageType.pb-c.obj" "Communication\PMR\Connection\ConnectRequest.pb-c.obj" "Communication\PMR\Connection\ConnectResponse.pb-c.obj" "Communication\PMR\Connection\DeviceInformation.pb-c.obj" "Communication\PMR\Connection\DisconnectRequest.pb-c.obj" + -$(RM) "Communication\PMR\Connection\DisconnectResponse.pb-c.obj" "Communication\PMR\Connection\KeepAliveRequest.pb-c.obj" "Communication\PMR\Connection\KeepAliveResponse.pb-c.obj" "Communication\PMR\Debugging\DebugLogCategory.pb-c.obj" "Communication\PMR\Debugging\StartDebugLogRequest.pb-c.obj" "Communication\PMR\Debugging\StartDebugLogResponse.pb-c.obj" "Communication\PMR\Debugging\StopDebugLogRequest.pb-c.obj" "Communication\PMR\Debugging\StopDebugLogResponse.pb-c.obj" "Communication\PMR\Diagnostics\DataFileFrame.pb-c.obj" "Communication\PMR\Diagnostics\DiagnosticsMonitors.pb-c.obj" "Communication\PMR\Diagnostics\DigitalInterfaceState.pb-c.obj" "Communication\PMR\Diagnostics\DispenserAbortHomingRequest.pb-c.obj" "Communication\PMR\Diagnostics\DispenserAbortHomingResponse.pb-c.obj" "Communication\PMR\Diagnostics\DispenserAbortJoggingRequest.pb-c.obj" "Communication\PMR\Diagnostics\DispenserAbortJoggingResponse.pb-c.obj" "Communication\PMR\Diagnostics\DispenserHomingRequest.pb-c.obj" "Communication\PMR\Diagnostics\DispenserHomingResponse.pb-c.obj" + -$(RM) "Communication\PMR\Diagnostics\DispenserJoggingRequest.pb-c.obj" "Communication\PMR\Diagnostics\DispenserJoggingResponse.pb-c.obj" "Communication\PMR\Diagnostics\DoubleArray.pb-c.obj" "Communication\PMR\Diagnostics\Event.pb-c.obj" "Communication\PMR\Diagnostics\EventType.pb-c.obj" "Communication\PMR\Diagnostics\HeaterState.pb-c.obj" "Communication\PMR\Diagnostics\HeaterType.pb-c.obj" "Communication\PMR\Diagnostics\InterfaceIOs.pb-c.obj" "Communication\PMR\Diagnostics\MotorAbortHomingRequest.pb-c.obj" "Communication\PMR\Diagnostics\MotorAbortHomingResponse.pb-c.obj" "Communication\PMR\Diagnostics\MotorAbortJoggingRequest.pb-c.obj" "Communication\PMR\Diagnostics\MotorAbortJoggingResponse.pb-c.obj" "Communication\PMR\Diagnostics\MotorDirection.pb-c.obj" "Communication\PMR\Diagnostics\MotorHomingRequest.pb-c.obj" "Communication\PMR\Diagnostics\MotorHomingResponse.pb-c.obj" "Communication\PMR\Diagnostics\MotorJoggingRequest.pb-c.obj" "Communication\PMR\Diagnostics\MotorJoggingResponse.pb-c.obj" + -$(RM) "Communication\PMR\Diagnostics\ResolveEventRequest.pb-c.obj" "Communication\PMR\Diagnostics\ResolveEventResponse.pb-c.obj" "Communication\PMR\Diagnostics\SetBlowerStateRequest.pb-c.obj" "Communication\PMR\Diagnostics\SetBlowerStateResponse.pb-c.obj" "Communication\PMR\Diagnostics\SetComponentValueRequest.pb-c.obj" "Communication\PMR\Diagnostics\SetComponentValueResponse.pb-c.obj" "Communication\PMR\Diagnostics\SetDigitalOutRequest.pb-c.obj" "Communication\PMR\Diagnostics\SetDigitalOutResponse.pb-c.obj" "Communication\PMR\Diagnostics\SetHeaterStateRequest.pb-c.obj" "Communication\PMR\Diagnostics\SetHeaterStateResponse.pb-c.obj" "Communication\PMR\Diagnostics\SetValveStateRequest.pb-c.obj" "Communication\PMR\Diagnostics\SetValveStateResponse.pb-c.obj" "Communication\PMR\Diagnostics\StartDiagnosticsRequest.pb-c.obj" "Communication\PMR\Diagnostics\StartDiagnosticsResponse.pb-c.obj" "Communication\PMR\Diagnostics\StartEventsNotificationRequest.pb-c.obj" "Communication\PMR\Diagnostics\StartEventsNotificationResponse.pb-c.obj" + -$(RM) "Communication\PMR\Diagnostics\StopDiagnosticsRequest.pb-c.obj" "Communication\PMR\Diagnostics\StopDiagnosticsResponse.pb-c.obj" "Communication\PMR\Diagnostics\StopEventsNotificationRequest.pb-c.obj" "Communication\PMR\Diagnostics\StopEventsNotificationResponse.pb-c.obj" "Communication\PMR\Diagnostics\ThreadAbortJoggingRequest.pb-c.obj" "Communication\PMR\Diagnostics\ThreadAbortJoggingResponse.pb-c.obj" "Communication\PMR\Diagnostics\ThreadJoggingRequest.pb-c.obj" "Communication\PMR\Diagnostics\ThreadJoggingResponse.pb-c.obj" "Communication\PMR\Diagnostics\ValueComponent.pb-c.obj" "Communication\PMR\Diagnostics\ValueComponentState.pb-c.obj" "Communication\PMR\Diagnostics\ValveState.pb-c.obj" "Communication\PMR\Diagnostics\ValveStateCode.pb-c.obj" "Communication\PMR\Diagnostics\ValveType.pb-c.obj" "Communication\PMR\EmbeddedParameters\AlarmHandlingItem.pb-c.obj" "Communication\PMR\EmbeddedParameters\AlarmParameters.pb-c.obj" "Communication\PMR\EmbeddedParameters\AlarmSourceType.pb-c.obj" + -$(RM) "Communication\PMR\EmbeddedParameters\ConfigurationParameters.pb-c.obj" "Communication\PMR\EmbeddedParameters\DispenserData.pb-c.obj" "Communication\PMR\EmbeddedParameters\DispenserRunningData.pb-c.obj" "Communication\PMR\FirmwareUpgrade\ActivateVersionRequest.pb-c.obj" "Communication\PMR\FirmwareUpgrade\ActivateVersionResponse.pb-c.obj" "Communication\PMR\FirmwareUpgrade\ValidateVersionRequest.pb-c.obj" "Communication\PMR\FirmwareUpgrade\ValidateVersionResponse.pb-c.obj" "Communication\PMR\FirmwareUpgrade\VersionFileDescriptor.pb-c.obj" "Communication\PMR\FirmwareUpgrade\VersionFileDestination.pb-c.obj" "Communication\PMR\FirmwareUpgrade\VersionPackageDescriptor.pb-c.obj" "Communication\PMR\Hardware\HardwareBlower.pb-c.obj" "Communication\PMR\Hardware\HardwareBlowerType.pb-c.obj" "Communication\PMR\Hardware\HardwareBreakSensor.pb-c.obj" "Communication\PMR\Hardware\HardwareBreakSensorType.pb-c.obj" "Communication\PMR\Hardware\HardwareConfiguration.pb-c.obj" "Communication\PMR\Hardware\HardwareDancer.pb-c.obj" + -$(RM) "Communication\PMR\Hardware\HardwareDancerType.pb-c.obj" "Communication\PMR\Hardware\HardwareDispenser.pb-c.obj" "Communication\PMR\Hardware\HardwareDispenserType.pb-c.obj" "Communication\PMR\Hardware\HardwareMotor.pb-c.obj" "Communication\PMR\Hardware\HardwareMotorType.pb-c.obj" "Communication\PMR\Hardware\HardwarePidControl.pb-c.obj" "Communication\PMR\Hardware\HardwarePidControlType.pb-c.obj" "Communication\PMR\Hardware\HardwareSpeedSensor.pb-c.obj" "Communication\PMR\Hardware\HardwareSpeedSensorType.pb-c.obj" "Communication\PMR\Hardware\HardwareWinder.pb-c.obj" "Communication\PMR\Hardware\HardwareWinderType.pb-c.obj" "Communication\PMR\Hardware\SystemResetRequest.pb-c.obj" "Communication\PMR\Hardware\SystemResetResponse.pb-c.obj" "Communication\PMR\Hardware\UploadHardwareConfigurationRequest.pb-c.obj" "Communication\PMR\Hardware\UploadHardwareConfigurationResponse.pb-c.obj" "Communication\PMR\IO\CreateRequest.pb-c.obj" "Communication\PMR\IO\CreateResponse.pb-c.obj" "Communication\PMR\IO\DeleteRequest.pb-c.obj" + -$(RM) "Communication\PMR\IO\DeleteResponse.pb-c.obj" "Communication\PMR\IO\ExecuteProcessRequest.pb-c.obj" "Communication\PMR\IO\ExecuteProcessResponse.pb-c.obj" "Communication\PMR\IO\FileAttribute.pb-c.obj" "Communication\PMR\IO\FileChunkDownloadRequest.pb-c.obj" "Communication\PMR\IO\FileChunkDownloadResponse.pb-c.obj" "Communication\PMR\IO\FileChunkUploadRequest.pb-c.obj" "Communication\PMR\IO\FileChunkUploadResponse.pb-c.obj" "Communication\PMR\IO\FileDownloadRequest.pb-c.obj" "Communication\PMR\IO\FileDownloadResponse.pb-c.obj" "Communication\PMR\IO\FileInfo.pb-c.obj" "Communication\PMR\IO\FileUploadRequest.pb-c.obj" "Communication\PMR\IO\FileUploadResponse.pb-c.obj" "Communication\PMR\IO\GetFilesRequest.pb-c.obj" "Communication\PMR\IO\GetFilesResponse.pb-c.obj" "Communication\PMR\IO\GetStorageInfoRequest.pb-c.obj" "Communication\PMR\IO\GetStorageInfoResponse.pb-c.obj" "Communication\PMR\IO\KillProcessRequest.pb-c.obj" "Communication\PMR\IO\KillProcessResponse.pb-c.obj" "Communication\PMR\Printing\AbortJobRequest.pb-c.obj" + -$(RM) "Communication\PMR\Printing\AbortJobResponse.pb-c.obj" "Communication\PMR\Printing\CurrentJobRequest.pb-c.obj" "Communication\PMR\Printing\CurrentJobResponse.pb-c.obj" "Communication\PMR\Printing\DispenserLiquidType.pb-c.obj" "Communication\PMR\Printing\DispenserStepDivision.pb-c.obj" "Communication\PMR\Printing\JobBrushStop.pb-c.obj" "Communication\PMR\Printing\JobDescriptionFileBrushStop.pb-c.obj" "Communication\PMR\Printing\JobDescriptionFileSegment.pb-c.obj" "Communication\PMR\Printing\JobDispenser.pb-c.obj" "Communication\PMR\Printing\JobRequest.pb-c.obj" "Communication\PMR\Printing\JobResponse.pb-c.obj" "Communication\PMR\Printing\JobSegment.pb-c.obj" "Communication\PMR\Printing\JobSpool.pb-c.obj" "Communication\PMR\Printing\JobSpoolType.pb-c.obj" "Communication\PMR\Printing\JobStatus.pb-c.obj" "Communication\PMR\Printing\JobTicket.pb-c.obj" "Communication\PMR\Printing\JobUploadStrategy.pb-c.obj" "Communication\PMR\Printing\JobWindingMethod.pb-c.obj" "Communication\PMR\Printing\ProcessParameters.pb-c.obj" + -$(RM) "Communication\PMR\Printing\ResumeCurrentJobRequest.pb-c.obj" "Communication\PMR\Printing\ResumeCurrentJobResponse.pb-c.obj" "Communication\PMR\Printing\UploadProcessParametersRequest.pb-c.obj" "Communication\PMR\Printing\UploadProcessParametersResponse.pb-c.obj" "Communication\PMR\Stubs\CalculateRequest.pb-c.obj" "Communication\PMR\Stubs\CalculateResponse.pb-c.obj" "Communication\PMR\Stubs\ProgressRequest.pb-c.obj" "Communication\PMR\Stubs\ProgressResponse.pb-c.obj" "Communication\PMR\Stubs\StubAbortJobRequest.pb-c.obj" "Communication\PMR\Stubs\StubAbortJobResponse.pb-c.obj" "Communication\PMR\Stubs\StubCartridgeReadRequest.pb-c.obj" "Communication\PMR\Stubs\StubCartridgeReadResponse.pb-c.obj" "Communication\PMR\Stubs\StubCartridgeWriteRequest.pb-c.obj" "Communication\PMR\Stubs\StubCartridgeWriteResponse.pb-c.obj" "Communication\PMR\Stubs\StubDancerPositionRequest.pb-c.obj" "Communication\PMR\Stubs\StubDancerPositionResponse.pb-c.obj" "Communication\PMR\Stubs\StubDispenserRequest.pb-c.obj" + -$(RM) "Communication\PMR\Stubs\StubDispenserResponse.pb-c.obj" "Communication\PMR\Stubs\StubExtFlashReadRequest.pb-c.obj" "Communication\PMR\Stubs\StubExtFlashReadResponse.pb-c.obj" "Communication\PMR\Stubs\StubExtFlashReadWordsRequest.pb-c.obj" "Communication\PMR\Stubs\StubExtFlashReadWordsResponse.pb-c.obj" "Communication\PMR\Stubs\StubExtFlashWriteRequest.pb-c.obj" "Communication\PMR\Stubs\StubExtFlashWriteResponse.pb-c.obj" "Communication\PMR\Stubs\StubExtFlashWriteWordsRequest.pb-c.obj" "Communication\PMR\Stubs\StubExtFlashWriteWordsResponse.pb-c.obj" "Communication\PMR\Stubs\StubF3Gpo01WriteRequest.pb-c.obj" "Communication\PMR\Stubs\StubF3Gpo01WriteResponse.pb-c.obj" "Communication\PMR\Stubs\StubFPGAReadBackRegRequest.pb-c.obj" "Communication\PMR\Stubs\StubFPGAReadBackRegResponse.pb-c.obj" "Communication\PMR\Stubs\StubFPGAReadVersionRequest.pb-c.obj" "Communication\PMR\Stubs\StubFPGAReadVersionResponse.pb-c.obj" "Communication\PMR\Stubs\StubFpgaReadRegRequest.pb-c.obj" "Communication\PMR\Stubs\StubFpgaReadRegResponse.pb-c.obj" + -$(RM) "Communication\PMR\Stubs\StubFpgaWriteRegRequest.pb-c.obj" "Communication\PMR\Stubs\StubFpgaWriteRegResponse.pb-c.obj" "Communication\PMR\Stubs\StubGPIOInputSetupRequest.pb-c.obj" "Communication\PMR\Stubs\StubGPIOInputSetupResponse.pb-c.obj" "Communication\PMR\Stubs\StubGPIOReadBitRequest.pb-c.obj" "Communication\PMR\Stubs\StubGPIOReadBitResponse.pb-c.obj" "Communication\PMR\Stubs\StubGPIOReadByteRequest.pb-c.obj" "Communication\PMR\Stubs\StubGPIOReadByteResponse.pb-c.obj" "Communication\PMR\Stubs\StubGPIOWriteBitRequest.pb-c.obj" "Communication\PMR\Stubs\StubGPIOWriteBitResponse.pb-c.obj" "Communication\PMR\Stubs\StubGPIOWriteByteRequest.pb-c.obj" "Communication\PMR\Stubs\StubGPIOWriteByteResponse.pb-c.obj" "Communication\PMR\Stubs\StubHWVersionRequest.pb-c.obj" "Communication\PMR\Stubs\StubHWVersionResponse.pb-c.obj" "Communication\PMR\Stubs\StubHeaterRequest.pb-c.obj" "Communication\PMR\Stubs\StubHeaterResponse.pb-c.obj" "Communication\PMR\Stubs\StubHeatingTestPollRequest.pb-c.obj" "Communication\PMR\Stubs\StubHeatingTestPollResponse.pb-c.obj" + -$(RM) "Communication\PMR\Stubs\StubHeatingTestRequest.pb-c.obj" "Communication\PMR\Stubs\StubHeatingTestResponse.pb-c.obj" "Communication\PMR\Stubs\StubI2CReadBytesRequest.pb-c.obj" "Communication\PMR\Stubs\StubI2CReadBytesResponse.pb-c.obj" "Communication\PMR\Stubs\StubI2CRequest.pb-c.obj" "Communication\PMR\Stubs\StubI2CResponse.pb-c.obj" "Communication\PMR\Stubs\StubI2CWriteBytesRequest.pb-c.obj" "Communication\PMR\Stubs\StubI2CWriteBytesResponse.pb-c.obj" "Communication\PMR\Stubs\StubIntADCReadRequest.pb-c.obj" "Communication\PMR\Stubs\StubIntADCReadResponse.pb-c.obj" "Communication\PMR\Stubs\StubJobRequest.pb-c.obj" "Communication\PMR\Stubs\StubJobResponse.pb-c.obj" "Communication\PMR\Stubs\StubL6470DriverRequest.pb-c.obj" "Communication\PMR\Stubs\StubL6470DriverResponse.pb-c.obj" "Communication\PMR\Stubs\StubMidTankPressureSensorRequest.pb-c.obj" "Communication\PMR\Stubs\StubMidTankPressureSensorResponse.pb-c.obj" "Communication\PMR\Stubs\StubMotorHomeMarkRequest.pb-c.obj" "Communication\PMR\Stubs\StubMotorHomeMarkResponse.pb-c.obj" + -$(RM) "Communication\PMR\Stubs\StubMotorInitRequest.pb-c.obj" "Communication\PMR\Stubs\StubMotorInitResponse.pb-c.obj" "Communication\PMR\Stubs\StubMotorMovRequest.pb-c.obj" "Communication\PMR\Stubs\StubMotorMovResponse.pb-c.obj" "Communication\PMR\Stubs\StubMotorPositionRequest.pb-c.obj" "Communication\PMR\Stubs\StubMotorPositionResponse.pb-c.obj" "Communication\PMR\Stubs\StubMotorRequest.pb-c.obj" "Communication\PMR\Stubs\StubMotorResponse.pb-c.obj" "Communication\PMR\Stubs\StubMotorRunRequest.pb-c.obj" "Communication\PMR\Stubs\StubMotorRunResponse.pb-c.obj" "Communication\PMR\Stubs\StubMotorRunStepTickRequest.pb-c.obj" "Communication\PMR\Stubs\StubMotorRunStepTickResponse.pb-c.obj" "Communication\PMR\Stubs\StubMotorSpeedRequest.pb-c.obj" "Communication\PMR\Stubs\StubMotorSpeedResponse.pb-c.obj" "Communication\PMR\Stubs\StubMotorStatusRequest.pb-c.obj" "Communication\PMR\Stubs\StubMotorStatusResponse.pb-c.obj" "Communication\PMR\Stubs\StubMotorStopRequest.pb-c.obj" "Communication\PMR\Stubs\StubMotorStopResponse.pb-c.obj" + -$(RM) "Communication\PMR\Stubs\StubOptLimitSwitchRequest.pb-c.obj" "Communication\PMR\Stubs\StubOptLimitSwitchResponse.pb-c.obj" "Communication\PMR\Stubs\StubReadEmbeddedVersionRequest.pb-c.obj" "Communication\PMR\Stubs\StubReadEmbeddedVersionResponse.pb-c.obj" "Communication\PMR\Stubs\StubRealTimeUsageRequest.pb-c.obj" "Communication\PMR\Stubs\StubRealTimeUsageResponse.pb-c.obj" "Communication\PMR\Stubs\StubSpeedSensorRequest.pb-c.obj" "Communication\PMR\Stubs\StubSpeedSensorResponse.pb-c.obj" "Communication\PMR\Stubs\StubSteperMotorRequest.pb-c.obj" "Communication\PMR\Stubs\StubSteperMotorResponse.pb-c.obj" "Communication\PMR\Stubs\StubTempSensorRequest.pb-c.obj" "Communication\PMR\Stubs\StubTempSensorResponse.pb-c.obj" "Communication\PMR\Stubs\StubTivaReadRegRequest.pb-c.obj" "Communication\PMR\Stubs\StubTivaReadRegResponse.pb-c.obj" "Communication\PMR\Stubs\StubTivaWriteRegRequest.pb-c.obj" "Communication\PMR\Stubs\StubTivaWriteRegResponse.pb-c.obj" "Communication\PMR\Stubs\StubValveRequest.pb-c.obj" + -$(RM) "Communication\PMR\Stubs\StubValveResponse.pb-c.obj" "Drivers\ADC_Sampling\ADC.obj" "Drivers\FPGA\FPGA.obj" "Drivers\FPGA\FPGA_SPI_Comm.obj" "Drivers\FPGA\FPGA_SSI_Comm.obj" "Drivers\FPGA\FPGA_GPIO\FPGA_GPIO.obj" "Drivers\FPGA\FPGA_INTERRUPTS\FPGA_Interrupts.obj" "Drivers\FPGA\Full_Vme\FPGA_Programming_Up.obj" "Drivers\FPGA\Full_Vme\ispvme\hardware.obj" "Drivers\FPGA\Full_Vme\ispvme\ispvm_ui.obj" "Drivers\FPGA\Full_Vme\ispvme\ivm_core.obj" "Drivers\FPGA\Moters_Driver\L6470.obj" "Drivers\Flash_Memory\FATFS\Control_File_System.obj" "Drivers\Flash_Memory\FATFS\cc932.obj" "Drivers\Flash_Memory\FATFS\fatfs_port_mx66l51235f.obj" "Drivers\Flash_Memory\FATFS\ff.obj" "Drivers\Flash_Memory\FATFS\mx66l51235f.obj" "Drivers\Flash_Memory\FATFS\spi_flash.obj" "Drivers\Flash_Memory\Flash_Memory.obj" "Drivers\Heater\ADS1220.obj" "Drivers\Heater\Heater.obj" "Drivers\Heater\TemperatureSensor.obj" "Drivers\I2C_Communication\ADC_MUX\ADC_MUX.obj" "Drivers\I2C_Communication\DAC\Blower.obj" "Drivers\I2C_Communication\Dispensers_EEPROM_MUX\Disp_EEPROM_MUX.obj" + -$(RM) "Drivers\I2C_Communication\I2C.obj" "Drivers\I2C_Communication\I2C_Comm.obj" "Drivers\I2C_Communication\RFID_NFC\NFC_I2C\NFC_I2C.obj" "Drivers\I2C_Communication\RFID_NFC\PN7150\PN7150.obj" "Drivers\I2C_Communication\Thermo_K\MCP9600.obj" "Drivers\Motors\Motor.obj" "Drivers\Motors\MotorActions.obj" "Drivers\On_Chip_Flash\Flashstore.obj" "Drivers\SPI\SPI_Comm.obj" "Drivers\SSI_Comm\Dancer\Dancer.obj" "Drivers\SSI_Comm\SSI_Comm.obj" "Drivers\SSI_Comm\Speed_Sensor\Speed_Sensor.obj" "Drivers\USB_Communication\USBCDCD.obj" "Drivers\Uart_Comm\Uart.obj" "Drivers\Valves\Valve.obj" "Drivers\flash_ram\FlashProgram.obj" "Modules\AlarmHandling\AlarmHandling.obj" "Modules\Control\DriverWithCallbackExample.obj" "Modules\Control\MillisecTask.obj" "Modules\Control\PIDAlgo.obj" "Modules\Control\control.obj" "Modules\Diagnostics\DiagnosticActions.obj" "Modules\Diagnostics\Diagnostics.obj" "Modules\Diagnostics\DiagnosticsHoming.obj" "Modules\Diagnostics\DiagnosticsJogging.obj" "Modules\General\GeneralHardware.obj" + -$(RM) "Modules\General\buttons.obj" "Modules\General\process.obj" "Modules\Heaters\Heaters_bit.obj" "Modules\Heaters\Heaters_init.obj" "Modules\Heaters\Heaters_maint.obj" "Modules\Heaters\Heaters_print.obj" "Modules\IDS\IDS_BIT.obj" "Modules\IDS\IDS_dispenser.obj" "Modules\IDS\IDS_init.obj" "Modules\IDS\IDS_maint.obj" "Modules\IDS\IDS_print.obj" "Modules\Stubs_Handler\Calculate.obj" "Modules\Stubs_Handler\Progress.obj" "Modules\Stubs_Handler\StubRealTimeUsage.obj" "Modules\Stubs_Handler\Stub_Cartridge.obj" "Modules\Stubs_Handler\Stub_Dancer.obj" "Modules\Stubs_Handler\Stub_Dispenser.obj" "Modules\Stubs_Handler\Stub_ExtFlash.obj" "Modules\Stubs_Handler\Stub_FPGARWReg.obj" "Modules\Stubs_Handler\Stub_FPGAReadBackReg.obj" "Modules\Stubs_Handler\Stub_FPGAReadVersion.obj" "Modules\Stubs_Handler\Stub_GPIO.obj" "Modules\Stubs_Handler\Stub_HW_Version.obj" "Modules\Stubs_Handler\Stub_Heater.obj" "Modules\Stubs_Handler\Stub_I2C.obj" "Modules\Stubs_Handler\Stub_IntADC.obj" "Modules\Stubs_Handler\Stub_L6470.obj" + -$(RM) "Modules\Stubs_Handler\Stub_MidTankPressureSensor.obj" "Modules\Stubs_Handler\Stub_Motor.obj" "Modules\Stubs_Handler\Stub_OptLimitSwitch.obj" "Modules\Stubs_Handler\Stub_ReadEmbeddedVersion.obj" "Modules\Stubs_Handler\Stub_SpeedSensor.obj" "Modules\Stubs_Handler\Stub_Status.obj" "Modules\Stubs_Handler\Stub_SteperMotor.obj" "Modules\Stubs_Handler\Stub_TempSensor.obj" "Modules\Stubs_Handler\Stub_TivaReg.obj" "Modules\Stubs_Handler\Stub_Valve.obj" "Modules\Stubs_Handler\User_Leds.obj" "Modules\Stubs_Handler\temperature_sensor.obj" "Modules\Thread\ThreadLoad.obj" "Modules\Thread\Thread_BIT.obj" "Modules\Thread\Thread_Winder.obj" "Modules\Thread\Thread_init.obj" "Modules\Thread\Thread_maint.obj" "Modules\Thread\Thread_print.obj" "Modules\Waste\Waste_BIT.obj" "Modules\Waste\Waste_init.obj" "Modules\Waste\Waste_maint.obj" "Modules\Waste\Waste_print.obj" "StateMachines\Initialization\InitSequence.obj" "StateMachines\Printing\JobSTM.obj" "StateMachines\Printing\PrintingSTM.obj" + -$(RM) "Main.d" "delay.d" "Common\SWUpdate\FileSystem.d" "Common\SWUpdate\FirmwareUpgrade.d" "Common\SW_Info\SW_Info.d" "Common\Software_CRC\sw_crc.d" "Common\Sys_PinOut_Config\MCU_MAIN_pinout.d" "Common\Sys_PinOut_Config\Pin.d" "Common\Sys_PinOut_Config\Pin_config.d" "Common\Utilities\Update.d" "Common\Utilities\Utils.d" "Common\Utilities\idle_task.d" "Common\Utilities\ustdlib.d" "Common\protobuf-c\protobuf-c.d" "Common\report\distributor.d" "Common\report\filter.d" "Common\report\reportInit.d" "Communication\CommunicationTask.d" "Communication\Connection.d" "Communication\Container.d" "Communication\PMR\Common\ErrorCode.pb-c.d" "Communication\PMR\Common\ErrorResponse.pb-c.d" "Communication\PMR\Common\MessageContainer.pb-c.d" "Communication\PMR\Common\MessageType.pb-c.d" "Communication\PMR\Connection\ConnectRequest.pb-c.d" "Communication\PMR\Connection\ConnectResponse.pb-c.d" "Communication\PMR\Connection\DeviceInformation.pb-c.d" "Communication\PMR\Connection\DisconnectRequest.pb-c.d" "Communication\PMR\Connection\DisconnectResponse.pb-c.d" + -$(RM) "Communication\PMR\Connection\KeepAliveRequest.pb-c.d" "Communication\PMR\Connection\KeepAliveResponse.pb-c.d" "Communication\PMR\Debugging\DebugLogCategory.pb-c.d" "Communication\PMR\Debugging\StartDebugLogRequest.pb-c.d" "Communication\PMR\Debugging\StartDebugLogResponse.pb-c.d" "Communication\PMR\Debugging\StopDebugLogRequest.pb-c.d" "Communication\PMR\Debugging\StopDebugLogResponse.pb-c.d" "Communication\PMR\Diagnostics\DataFileFrame.pb-c.d" "Communication\PMR\Diagnostics\DiagnosticsMonitors.pb-c.d" "Communication\PMR\Diagnostics\DigitalInterfaceState.pb-c.d" "Communication\PMR\Diagnostics\DispenserAbortHomingRequest.pb-c.d" "Communication\PMR\Diagnostics\DispenserAbortHomingResponse.pb-c.d" "Communication\PMR\Diagnostics\DispenserAbortJoggingRequest.pb-c.d" "Communication\PMR\Diagnostics\DispenserAbortJoggingResponse.pb-c.d" "Communication\PMR\Diagnostics\DispenserHomingRequest.pb-c.d" "Communication\PMR\Diagnostics\DispenserHomingResponse.pb-c.d" "Communication\PMR\Diagnostics\DispenserJoggingRequest.pb-c.d" + -$(RM) "Communication\PMR\Diagnostics\DispenserJoggingResponse.pb-c.d" "Communication\PMR\Diagnostics\DoubleArray.pb-c.d" "Communication\PMR\Diagnostics\Event.pb-c.d" "Communication\PMR\Diagnostics\EventType.pb-c.d" "Communication\PMR\Diagnostics\HeaterState.pb-c.d" "Communication\PMR\Diagnostics\HeaterType.pb-c.d" "Communication\PMR\Diagnostics\InterfaceIOs.pb-c.d" "Communication\PMR\Diagnostics\MotorAbortHomingRequest.pb-c.d" "Communication\PMR\Diagnostics\MotorAbortHomingResponse.pb-c.d" "Communication\PMR\Diagnostics\MotorAbortJoggingRequest.pb-c.d" "Communication\PMR\Diagnostics\MotorAbortJoggingResponse.pb-c.d" "Communication\PMR\Diagnostics\MotorDirection.pb-c.d" "Communication\PMR\Diagnostics\MotorHomingRequest.pb-c.d" "Communication\PMR\Diagnostics\MotorHomingResponse.pb-c.d" "Communication\PMR\Diagnostics\MotorJoggingRequest.pb-c.d" "Communication\PMR\Diagnostics\MotorJoggingResponse.pb-c.d" "Communication\PMR\Diagnostics\ResolveEventRequest.pb-c.d" "Communication\PMR\Diagnostics\ResolveEventResponse.pb-c.d" + -$(RM) "Communication\PMR\Diagnostics\SetBlowerStateRequest.pb-c.d" "Communication\PMR\Diagnostics\SetBlowerStateResponse.pb-c.d" "Communication\PMR\Diagnostics\SetComponentValueRequest.pb-c.d" "Communication\PMR\Diagnostics\SetComponentValueResponse.pb-c.d" "Communication\PMR\Diagnostics\SetDigitalOutRequest.pb-c.d" "Communication\PMR\Diagnostics\SetDigitalOutResponse.pb-c.d" "Communication\PMR\Diagnostics\SetHeaterStateRequest.pb-c.d" "Communication\PMR\Diagnostics\SetHeaterStateResponse.pb-c.d" "Communication\PMR\Diagnostics\SetValveStateRequest.pb-c.d" "Communication\PMR\Diagnostics\SetValveStateResponse.pb-c.d" "Communication\PMR\Diagnostics\StartDiagnosticsRequest.pb-c.d" "Communication\PMR\Diagnostics\StartDiagnosticsResponse.pb-c.d" "Communication\PMR\Diagnostics\StartEventsNotificationRequest.pb-c.d" "Communication\PMR\Diagnostics\StartEventsNotificationResponse.pb-c.d" "Communication\PMR\Diagnostics\StopDiagnosticsRequest.pb-c.d" "Communication\PMR\Diagnostics\StopDiagnosticsResponse.pb-c.d" + -$(RM) "Communication\PMR\Diagnostics\StopEventsNotificationRequest.pb-c.d" "Communication\PMR\Diagnostics\StopEventsNotificationResponse.pb-c.d" "Communication\PMR\Diagnostics\ThreadAbortJoggingRequest.pb-c.d" "Communication\PMR\Diagnostics\ThreadAbortJoggingResponse.pb-c.d" "Communication\PMR\Diagnostics\ThreadJoggingRequest.pb-c.d" "Communication\PMR\Diagnostics\ThreadJoggingResponse.pb-c.d" "Communication\PMR\Diagnostics\ValueComponent.pb-c.d" "Communication\PMR\Diagnostics\ValueComponentState.pb-c.d" "Communication\PMR\Diagnostics\ValveState.pb-c.d" "Communication\PMR\Diagnostics\ValveStateCode.pb-c.d" "Communication\PMR\Diagnostics\ValveType.pb-c.d" "Communication\PMR\EmbeddedParameters\AlarmHandlingItem.pb-c.d" "Communication\PMR\EmbeddedParameters\AlarmParameters.pb-c.d" "Communication\PMR\EmbeddedParameters\AlarmSourceType.pb-c.d" "Communication\PMR\EmbeddedParameters\ConfigurationParameters.pb-c.d" "Communication\PMR\EmbeddedParameters\DispenserData.pb-c.d" "Communication\PMR\EmbeddedParameters\DispenserRunningData.pb-c.d" + -$(RM) "Communication\PMR\FirmwareUpgrade\ActivateVersionRequest.pb-c.d" "Communication\PMR\FirmwareUpgrade\ActivateVersionResponse.pb-c.d" "Communication\PMR\FirmwareUpgrade\ValidateVersionRequest.pb-c.d" "Communication\PMR\FirmwareUpgrade\ValidateVersionResponse.pb-c.d" "Communication\PMR\FirmwareUpgrade\VersionFileDescriptor.pb-c.d" "Communication\PMR\FirmwareUpgrade\VersionFileDestination.pb-c.d" "Communication\PMR\FirmwareUpgrade\VersionPackageDescriptor.pb-c.d" "Communication\PMR\Hardware\HardwareBlower.pb-c.d" "Communication\PMR\Hardware\HardwareBlowerType.pb-c.d" "Communication\PMR\Hardware\HardwareBreakSensor.pb-c.d" "Communication\PMR\Hardware\HardwareBreakSensorType.pb-c.d" "Communication\PMR\Hardware\HardwareConfiguration.pb-c.d" "Communication\PMR\Hardware\HardwareDancer.pb-c.d" "Communication\PMR\Hardware\HardwareDancerType.pb-c.d" "Communication\PMR\Hardware\HardwareDispenser.pb-c.d" "Communication\PMR\Hardware\HardwareDispenserType.pb-c.d" "Communication\PMR\Hardware\HardwareMotor.pb-c.d" + -$(RM) "Communication\PMR\Hardware\HardwareMotorType.pb-c.d" "Communication\PMR\Hardware\HardwarePidControl.pb-c.d" "Communication\PMR\Hardware\HardwarePidControlType.pb-c.d" "Communication\PMR\Hardware\HardwareSpeedSensor.pb-c.d" "Communication\PMR\Hardware\HardwareSpeedSensorType.pb-c.d" "Communication\PMR\Hardware\HardwareWinder.pb-c.d" "Communication\PMR\Hardware\HardwareWinderType.pb-c.d" "Communication\PMR\Hardware\SystemResetRequest.pb-c.d" "Communication\PMR\Hardware\SystemResetResponse.pb-c.d" "Communication\PMR\Hardware\UploadHardwareConfigurationRequest.pb-c.d" "Communication\PMR\Hardware\UploadHardwareConfigurationResponse.pb-c.d" "Communication\PMR\IO\CreateRequest.pb-c.d" "Communication\PMR\IO\CreateResponse.pb-c.d" "Communication\PMR\IO\DeleteRequest.pb-c.d" "Communication\PMR\IO\DeleteResponse.pb-c.d" "Communication\PMR\IO\ExecuteProcessRequest.pb-c.d" "Communication\PMR\IO\ExecuteProcessResponse.pb-c.d" "Communication\PMR\IO\FileAttribute.pb-c.d" "Communication\PMR\IO\FileChunkDownloadRequest.pb-c.d" + -$(RM) "Communication\PMR\IO\FileChunkDownloadResponse.pb-c.d" "Communication\PMR\IO\FileChunkUploadRequest.pb-c.d" "Communication\PMR\IO\FileChunkUploadResponse.pb-c.d" "Communication\PMR\IO\FileDownloadRequest.pb-c.d" "Communication\PMR\IO\FileDownloadResponse.pb-c.d" "Communication\PMR\IO\FileInfo.pb-c.d" "Communication\PMR\IO\FileUploadRequest.pb-c.d" "Communication\PMR\IO\FileUploadResponse.pb-c.d" "Communication\PMR\IO\GetFilesRequest.pb-c.d" "Communication\PMR\IO\GetFilesResponse.pb-c.d" "Communication\PMR\IO\GetStorageInfoRequest.pb-c.d" "Communication\PMR\IO\GetStorageInfoResponse.pb-c.d" "Communication\PMR\IO\KillProcessRequest.pb-c.d" "Communication\PMR\IO\KillProcessResponse.pb-c.d" "Communication\PMR\Printing\AbortJobRequest.pb-c.d" "Communication\PMR\Printing\AbortJobResponse.pb-c.d" "Communication\PMR\Printing\CurrentJobRequest.pb-c.d" "Communication\PMR\Printing\CurrentJobResponse.pb-c.d" "Communication\PMR\Printing\DispenserLiquidType.pb-c.d" "Communication\PMR\Printing\DispenserStepDivision.pb-c.d" + -$(RM) "Communication\PMR\Printing\JobBrushStop.pb-c.d" "Communication\PMR\Printing\JobDescriptionFileBrushStop.pb-c.d" "Communication\PMR\Printing\JobDescriptionFileSegment.pb-c.d" "Communication\PMR\Printing\JobDispenser.pb-c.d" "Communication\PMR\Printing\JobRequest.pb-c.d" "Communication\PMR\Printing\JobResponse.pb-c.d" "Communication\PMR\Printing\JobSegment.pb-c.d" "Communication\PMR\Printing\JobSpool.pb-c.d" "Communication\PMR\Printing\JobSpoolType.pb-c.d" "Communication\PMR\Printing\JobStatus.pb-c.d" "Communication\PMR\Printing\JobTicket.pb-c.d" "Communication\PMR\Printing\JobUploadStrategy.pb-c.d" "Communication\PMR\Printing\JobWindingMethod.pb-c.d" "Communication\PMR\Printing\ProcessParameters.pb-c.d" "Communication\PMR\Printing\ResumeCurrentJobRequest.pb-c.d" "Communication\PMR\Printing\ResumeCurrentJobResponse.pb-c.d" "Communication\PMR\Printing\UploadProcessParametersRequest.pb-c.d" "Communication\PMR\Printing\UploadProcessParametersResponse.pb-c.d" "Communication\PMR\Stubs\CalculateRequest.pb-c.d" + -$(RM) "Communication\PMR\Stubs\CalculateResponse.pb-c.d" "Communication\PMR\Stubs\ProgressRequest.pb-c.d" "Communication\PMR\Stubs\ProgressResponse.pb-c.d" "Communication\PMR\Stubs\StubAbortJobRequest.pb-c.d" "Communication\PMR\Stubs\StubAbortJobResponse.pb-c.d" "Communication\PMR\Stubs\StubCartridgeReadRequest.pb-c.d" "Communication\PMR\Stubs\StubCartridgeReadResponse.pb-c.d" "Communication\PMR\Stubs\StubCartridgeWriteRequest.pb-c.d" "Communication\PMR\Stubs\StubCartridgeWriteResponse.pb-c.d" "Communication\PMR\Stubs\StubDancerPositionRequest.pb-c.d" "Communication\PMR\Stubs\StubDancerPositionResponse.pb-c.d" "Communication\PMR\Stubs\StubDispenserRequest.pb-c.d" "Communication\PMR\Stubs\StubDispenserResponse.pb-c.d" "Communication\PMR\Stubs\StubExtFlashReadRequest.pb-c.d" "Communication\PMR\Stubs\StubExtFlashReadResponse.pb-c.d" "Communication\PMR\Stubs\StubExtFlashReadWordsRequest.pb-c.d" "Communication\PMR\Stubs\StubExtFlashReadWordsResponse.pb-c.d" "Communication\PMR\Stubs\StubExtFlashWriteRequest.pb-c.d" + -$(RM) "Communication\PMR\Stubs\StubExtFlashWriteResponse.pb-c.d" "Communication\PMR\Stubs\StubExtFlashWriteWordsRequest.pb-c.d" "Communication\PMR\Stubs\StubExtFlashWriteWordsResponse.pb-c.d" "Communication\PMR\Stubs\StubF3Gpo01WriteRequest.pb-c.d" "Communication\PMR\Stubs\StubF3Gpo01WriteResponse.pb-c.d" "Communication\PMR\Stubs\StubFPGAReadBackRegRequest.pb-c.d" "Communication\PMR\Stubs\StubFPGAReadBackRegResponse.pb-c.d" "Communication\PMR\Stubs\StubFPGAReadVersionRequest.pb-c.d" "Communication\PMR\Stubs\StubFPGAReadVersionResponse.pb-c.d" "Communication\PMR\Stubs\StubFpgaReadRegRequest.pb-c.d" "Communication\PMR\Stubs\StubFpgaReadRegResponse.pb-c.d" "Communication\PMR\Stubs\StubFpgaWriteRegRequest.pb-c.d" "Communication\PMR\Stubs\StubFpgaWriteRegResponse.pb-c.d" "Communication\PMR\Stubs\StubGPIOInputSetupRequest.pb-c.d" "Communication\PMR\Stubs\StubGPIOInputSetupResponse.pb-c.d" "Communication\PMR\Stubs\StubGPIOReadBitRequest.pb-c.d" "Communication\PMR\Stubs\StubGPIOReadBitResponse.pb-c.d" + -$(RM) "Communication\PMR\Stubs\StubGPIOReadByteRequest.pb-c.d" "Communication\PMR\Stubs\StubGPIOReadByteResponse.pb-c.d" "Communication\PMR\Stubs\StubGPIOWriteBitRequest.pb-c.d" "Communication\PMR\Stubs\StubGPIOWriteBitResponse.pb-c.d" "Communication\PMR\Stubs\StubGPIOWriteByteRequest.pb-c.d" "Communication\PMR\Stubs\StubGPIOWriteByteResponse.pb-c.d" "Communication\PMR\Stubs\StubHWVersionRequest.pb-c.d" "Communication\PMR\Stubs\StubHWVersionResponse.pb-c.d" "Communication\PMR\Stubs\StubHeaterRequest.pb-c.d" "Communication\PMR\Stubs\StubHeaterResponse.pb-c.d" "Communication\PMR\Stubs\StubHeatingTestPollRequest.pb-c.d" "Communication\PMR\Stubs\StubHeatingTestPollResponse.pb-c.d" "Communication\PMR\Stubs\StubHeatingTestRequest.pb-c.d" "Communication\PMR\Stubs\StubHeatingTestResponse.pb-c.d" "Communication\PMR\Stubs\StubI2CReadBytesRequest.pb-c.d" "Communication\PMR\Stubs\StubI2CReadBytesResponse.pb-c.d" "Communication\PMR\Stubs\StubI2CRequest.pb-c.d" "Communication\PMR\Stubs\StubI2CResponse.pb-c.d" + -$(RM) "Communication\PMR\Stubs\StubI2CWriteBytesRequest.pb-c.d" "Communication\PMR\Stubs\StubI2CWriteBytesResponse.pb-c.d" "Communication\PMR\Stubs\StubIntADCReadRequest.pb-c.d" "Communication\PMR\Stubs\StubIntADCReadResponse.pb-c.d" "Communication\PMR\Stubs\StubJobRequest.pb-c.d" "Communication\PMR\Stubs\StubJobResponse.pb-c.d" "Communication\PMR\Stubs\StubL6470DriverRequest.pb-c.d" "Communication\PMR\Stubs\StubL6470DriverResponse.pb-c.d" "Communication\PMR\Stubs\StubMidTankPressureSensorRequest.pb-c.d" "Communication\PMR\Stubs\StubMidTankPressureSensorResponse.pb-c.d" "Communication\PMR\Stubs\StubMotorHomeMarkRequest.pb-c.d" "Communication\PMR\Stubs\StubMotorHomeMarkResponse.pb-c.d" "Communication\PMR\Stubs\StubMotorInitRequest.pb-c.d" "Communication\PMR\Stubs\StubMotorInitResponse.pb-c.d" "Communication\PMR\Stubs\StubMotorMovRequest.pb-c.d" "Communication\PMR\Stubs\StubMotorMovResponse.pb-c.d" "Communication\PMR\Stubs\StubMotorPositionRequest.pb-c.d" "Communication\PMR\Stubs\StubMotorPositionResponse.pb-c.d" + -$(RM) "Communication\PMR\Stubs\StubMotorRequest.pb-c.d" "Communication\PMR\Stubs\StubMotorResponse.pb-c.d" "Communication\PMR\Stubs\StubMotorRunRequest.pb-c.d" "Communication\PMR\Stubs\StubMotorRunResponse.pb-c.d" "Communication\PMR\Stubs\StubMotorRunStepTickRequest.pb-c.d" "Communication\PMR\Stubs\StubMotorRunStepTickResponse.pb-c.d" "Communication\PMR\Stubs\StubMotorSpeedRequest.pb-c.d" "Communication\PMR\Stubs\StubMotorSpeedResponse.pb-c.d" "Communication\PMR\Stubs\StubMotorStatusRequest.pb-c.d" "Communication\PMR\Stubs\StubMotorStatusResponse.pb-c.d" "Communication\PMR\Stubs\StubMotorStopRequest.pb-c.d" "Communication\PMR\Stubs\StubMotorStopResponse.pb-c.d" "Communication\PMR\Stubs\StubOptLimitSwitchRequest.pb-c.d" "Communication\PMR\Stubs\StubOptLimitSwitchResponse.pb-c.d" "Communication\PMR\Stubs\StubReadEmbeddedVersionRequest.pb-c.d" "Communication\PMR\Stubs\StubReadEmbeddedVersionResponse.pb-c.d" "Communication\PMR\Stubs\StubRealTimeUsageRequest.pb-c.d" "Communication\PMR\Stubs\StubRealTimeUsageResponse.pb-c.d" + -$(RM) "Communication\PMR\Stubs\StubSpeedSensorRequest.pb-c.d" "Communication\PMR\Stubs\StubSpeedSensorResponse.pb-c.d" "Communication\PMR\Stubs\StubSteperMotorRequest.pb-c.d" "Communication\PMR\Stubs\StubSteperMotorResponse.pb-c.d" "Communication\PMR\Stubs\StubTempSensorRequest.pb-c.d" "Communication\PMR\Stubs\StubTempSensorResponse.pb-c.d" "Communication\PMR\Stubs\StubTivaReadRegRequest.pb-c.d" "Communication\PMR\Stubs\StubTivaReadRegResponse.pb-c.d" "Communication\PMR\Stubs\StubTivaWriteRegRequest.pb-c.d" "Communication\PMR\Stubs\StubTivaWriteRegResponse.pb-c.d" "Communication\PMR\Stubs\StubValveRequest.pb-c.d" "Communication\PMR\Stubs\StubValveResponse.pb-c.d" "Drivers\ADC_Sampling\ADC.d" "Drivers\FPGA\FPGA.d" "Drivers\FPGA\FPGA_SPI_Comm.d" "Drivers\FPGA\FPGA_SSI_Comm.d" "Drivers\FPGA\FPGA_GPIO\FPGA_GPIO.d" "Drivers\FPGA\FPGA_INTERRUPTS\FPGA_Interrupts.d" "Drivers\FPGA\Full_Vme\FPGA_Programming_Up.d" "Drivers\FPGA\Full_Vme\ispvme\hardware.d" "Drivers\FPGA\Full_Vme\ispvme\ispvm_ui.d" "Drivers\FPGA\Full_Vme\ispvme\ivm_core.d" + -$(RM) "Drivers\FPGA\Moters_Driver\L6470.d" "Drivers\Flash_Memory\FATFS\Control_File_System.d" "Drivers\Flash_Memory\FATFS\cc932.d" "Drivers\Flash_Memory\FATFS\fatfs_port_mx66l51235f.d" "Drivers\Flash_Memory\FATFS\ff.d" "Drivers\Flash_Memory\FATFS\mx66l51235f.d" "Drivers\Flash_Memory\FATFS\spi_flash.d" "Drivers\Flash_Memory\Flash_Memory.d" "Drivers\Heater\ADS1220.d" "Drivers\Heater\Heater.d" "Drivers\Heater\TemperatureSensor.d" "Drivers\I2C_Communication\ADC_MUX\ADC_MUX.d" "Drivers\I2C_Communication\DAC\Blower.d" "Drivers\I2C_Communication\Dispensers_EEPROM_MUX\Disp_EEPROM_MUX.d" "Drivers\I2C_Communication\I2C.d" "Drivers\I2C_Communication\I2C_Comm.d" "Drivers\I2C_Communication\RFID_NFC\NFC_I2C\NFC_I2C.d" "Drivers\I2C_Communication\RFID_NFC\PN7150\PN7150.d" "Drivers\I2C_Communication\Thermo_K\MCP9600.d" "Drivers\Motors\Motor.d" "Drivers\Motors\MotorActions.d" "Drivers\On_Chip_Flash\Flashstore.d" "Drivers\SPI\SPI_Comm.d" "Drivers\SSI_Comm\Dancer\Dancer.d" "Drivers\SSI_Comm\SSI_Comm.d" "Drivers\SSI_Comm\Speed_Sensor\Speed_Sensor.d" + -$(RM) "Drivers\USB_Communication\USBCDCD.d" "Drivers\Uart_Comm\Uart.d" "Drivers\Valves\Valve.d" "Drivers\flash_ram\FlashProgram.d" "Modules\AlarmHandling\AlarmHandling.d" "Modules\Control\DriverWithCallbackExample.d" "Modules\Control\MillisecTask.d" "Modules\Control\PIDAlgo.d" "Modules\Control\control.d" "Modules\Diagnostics\DiagnosticActions.d" "Modules\Diagnostics\Diagnostics.d" "Modules\Diagnostics\DiagnosticsHoming.d" "Modules\Diagnostics\DiagnosticsJogging.d" "Modules\General\GeneralHardware.d" "Modules\General\buttons.d" "Modules\General\process.d" "Modules\Heaters\Heaters_bit.d" "Modules\Heaters\Heaters_init.d" "Modules\Heaters\Heaters_maint.d" "Modules\Heaters\Heaters_print.d" "Modules\IDS\IDS_BIT.d" "Modules\IDS\IDS_dispenser.d" "Modules\IDS\IDS_init.d" "Modules\IDS\IDS_maint.d" "Modules\IDS\IDS_print.d" "Modules\Stubs_Handler\Calculate.d" "Modules\Stubs_Handler\Progress.d" "Modules\Stubs_Handler\StubRealTimeUsage.d" "Modules\Stubs_Handler\Stub_Cartridge.d" "Modules\Stubs_Handler\Stub_Dancer.d" + -$(RM) "Modules\Stubs_Handler\Stub_Dispenser.d" "Modules\Stubs_Handler\Stub_ExtFlash.d" "Modules\Stubs_Handler\Stub_FPGARWReg.d" "Modules\Stubs_Handler\Stub_FPGAReadBackReg.d" "Modules\Stubs_Handler\Stub_FPGAReadVersion.d" "Modules\Stubs_Handler\Stub_GPIO.d" "Modules\Stubs_Handler\Stub_HW_Version.d" "Modules\Stubs_Handler\Stub_Heater.d" "Modules\Stubs_Handler\Stub_I2C.d" "Modules\Stubs_Handler\Stub_IntADC.d" "Modules\Stubs_Handler\Stub_L6470.d" "Modules\Stubs_Handler\Stub_MidTankPressureSensor.d" "Modules\Stubs_Handler\Stub_Motor.d" "Modules\Stubs_Handler\Stub_OptLimitSwitch.d" "Modules\Stubs_Handler\Stub_ReadEmbeddedVersion.d" "Modules\Stubs_Handler\Stub_SpeedSensor.d" "Modules\Stubs_Handler\Stub_Status.d" "Modules\Stubs_Handler\Stub_SteperMotor.d" "Modules\Stubs_Handler\Stub_TempSensor.d" "Modules\Stubs_Handler\Stub_TivaReg.d" "Modules\Stubs_Handler\Stub_Valve.d" "Modules\Stubs_Handler\User_Leds.d" "Modules\Stubs_Handler\temperature_sensor.d" "Modules\Thread\ThreadLoad.d" "Modules\Thread\Thread_BIT.d" + -$(RM) "Modules\Thread\Thread_Winder.d" "Modules\Thread\Thread_init.d" "Modules\Thread\Thread_maint.d" "Modules\Thread\Thread_print.d" "Modules\Waste\Waste_BIT.d" "Modules\Waste\Waste_init.d" "Modules\Waste\Waste_maint.d" "Modules\Waste\Waste_print.d" "StateMachines\Initialization\InitSequence.d" "StateMachines\Printing\JobSTM.d" "StateMachines\Printing\PrintingSTM.d" -@echo 'Finished clean' -@echo ' ' pre-build: - -"../../../Visual_Studio/Build/Debug/proto-tc.exe" -i ../../../PMR/Messages -o ../Communication/PMR -l C -c"Common,Connection,Diagnostics,Hardware,Printing,Debugging,Stubs,IO" + -"../../../Visual_Studio/Build/Debug/proto-tc.exe" -i ../../../PMR/Messages -o ../Communication/PMR -l C -c"Common,Connection,Diagnostics,Hardware,Printing,Debugging,Stubs,IO,FirmwareUpgrade,EmbeddedParameters" -@echo ' ' post-build: - -"C:/TI/ccsv7/utils/tiobj2bin/tiobj2bin" "Embedded.out" "Embedded.bin" "C:/TI/ccsv7/tools/compiler/ti-cgt-arm_16.9.4.LTS/bin/armofd" "C:/TI/ccsv7/tools/compiler/ti-cgt-arm_16.9.4.LTS/bin/armhex" "C:/TI/ccsv7/utils/tiobj2bin/mkhex4bin" + -"C:/ti/ccsv7/utils/tiobj2bin/tiobj2bin" "Embedded.out" "Embedded.bin" "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/bin/armofd" "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/bin/armhex" "C:/ti/ccsv7/utils/tiobj2bin/mkhex4bin" -@echo ' ' .PHONY: all clean dependents diff --git a/Software/Embedded_SW/Embedded/debug_w_pmr/sources.mk b/Software/Embedded_SW/Embedded/debug_w_pmr/sources.mk index d36805b60..20fa167ed 100644 --- a/Software/Embedded_SW/Embedded/debug_w_pmr/sources.mk +++ b/Software/Embedded_SW/Embedded/debug_w_pmr/sources.mk @@ -136,6 +136,7 @@ Communication/PMR/Common \ Communication/PMR/Connection \ Communication/PMR/Debugging \ Communication/PMR/Diagnostics \ +Communication/PMR/EmbeddedParameters \ Communication/PMR/FirmwareUpgrade \ Communication/PMR/Hardware \ Communication/PMR/IO \ @@ -145,7 +146,8 @@ Drivers/ADC_Sampling \ Drivers/FPGA \ Drivers/FPGA/FPGA_GPIO \ Drivers/FPGA/FPGA_INTERRUPTS \ -Drivers/FPGA/JTAG_VME/slim_vme_8051 \ +Drivers/FPGA/Full_Vme \ +Drivers/FPGA/Full_Vme/ispvme \ Drivers/FPGA/Moters_Driver \ Drivers/Flash_Memory/FATFS \ Drivers/Flash_Memory \ @@ -154,7 +156,8 @@ Drivers/I2C_Communication/ADC_MUX \ Drivers/I2C_Communication/DAC \ Drivers/I2C_Communication/Dispensers_EEPROM_MUX \ Drivers/I2C_Communication \ -Drivers/I2C_Communication/I2C_Switch \ +Drivers/I2C_Communication/RFID_NFC/NFC_I2C \ +Drivers/I2C_Communication/RFID_NFC/PN7150 \ Drivers/I2C_Communication/Thermo_K \ Drivers/Motors \ Drivers/On_Chip_Flash \ @@ -165,6 +168,7 @@ Drivers/SSI_Comm/Speed_Sensor \ Drivers/USB_Communication \ Drivers/Uart_Comm \ Drivers/Valves \ +Drivers/flash_ram \ Modules/AlarmHandling \ Modules/Control \ Modules/Diagnostics \ @@ -174,5 +178,6 @@ Modules/IDS \ Modules/Stubs_Handler \ Modules/Thread \ Modules/Waste \ +StateMachines/Initialization \ StateMachines/Printing \ diff --git a/Software/Embedded_SW/Embedded/debug_w_pmr/subdir_rules.mk b/Software/Embedded_SW/Embedded/debug_w_pmr/subdir_rules.mk index c561e0787..31c7e347f 100644 --- a/Software/Embedded_SW/Embedded/debug_w_pmr/subdir_rules.mk +++ b/Software/Embedded_SW/Embedded/debug_w_pmr/subdir_rules.mk @@ -6,13 +6,13 @@ SHELL = cmd.exe # Each subdirectory must supply rules for building sources it contributes build-306001487: - @$(MAKE) -Onone -f subdir_rules.mk build-306001487-inproc + @$(MAKE) --no-print-directory -Onone -f subdir_rules.mk build-306001487-inproc build-306001487-inproc: ../Embedded.cfg - @echo 'Building file: $<' + @echo 'Building file: "$<"' @echo 'Invoking: XDCtools' - "C:/TI/xdctools_3_32_00_06_core/xs" --xdcpath="C:/ti/tirtos_tivac_2_16_00_08/packages;C:/ti/tirtos_tivac_2_16_00_08/products/tidrivers_tivac_2_16_00_08/packages;C:/ti/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages;C:/ti/tirtos_tivac_2_16_00_08/products/ndk_2_25_00_09/packages;C:/ti/tirtos_tivac_2_16_00_08/products/uia_2_00_05_50/packages;C:/ti/tirtos_tivac_2_16_00_08/products/ns_1_11_00_10/packages;C:/ti/TivaWare_C_Series-2.1.2.111;C:/TI/ccsv7/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.M4F -p ti.platforms.tiva:TM4C129XNCZAD -r release -c "C:/TI/ccsv7/tools/compiler/ti-cgt-arm_16.9.4.LTS" --compileOptions "-mv7M4 --code_state=16 --float_support=FPv4SPD16 -me" "$<" - @echo 'Finished building: $<' + "C:/ti/xdctools_3_32_02_25_core/xs" --xdcpath="C:/ti/TivaWare_C_Series-2.1.2.111;C:/ti/ccsv7/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.M4F -p ti.platforms.tiva:TM4C129XNCZAD -r release -c "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS" --compileOptions "-mv7M4 --code_state=16 --float_support=FPv4SPD16 -me" "$<" + @echo 'Finished building: "$<"' @echo ' ' configPkg/linker.cmd: build-306001487 ../Embedded.cfg @@ -20,17 +20,17 @@ configPkg/compiler.opt: build-306001487 configPkg/: build-306001487 Main.obj: ../Main.c $(GEN_OPTS) | $(GEN_HDRS) - @echo 'Building file: $<' + @echo 'Building file: "$<"' @echo 'Invoking: ARM Compiler' - "C:/TI/ccsv7/tools/compiler/ti-cgt-arm_16.9.4.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -Ooff --opt_for_speed=0 --include_path="C:/ti/tirtos_tivac_2_16_00_08/products/ndk_2_25_00_09/packages/ti/ndk/inc/bsd" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Common/protobuf-c" --include_path="C:/Tango/Software/Embedded_SW/Embedded" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication/PMR/Hardware" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication/PMR/Printing" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication/PMR/Common" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication/PMR" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Common" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Modules" --include_path="C:/ti/TivaWare_C_Series-2.1.2.111" --include_path="C:/ti/xdctools_3_32_00_06_core/include" --include_path="C:/ti/tirtos_tivac_2_16_00_08/products/TivaWare_C_Series-2.1.1.71b" --include_path="C:/ti/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages/ti/sysbios/posix" --include_path="C:/ti/tirtos_tivac_2_16_00_08/products/tidrivers_tivac_2_16_00_08" --include_path="C:/TI/ccsv7/tools/compiler/ti-cgt-arm_16.9.4.LTS/include" --define=ENABLE_LFN --define=DEBUG_TEST_FUNCTIONS --define=TARGET_IS_TM4C129_RA0 --define=ccs="ccs" --define=ccs --define=TIVAWARE --define=PART_TM4C129XNCZAD -g --gcc --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="Main.d_raw" $(GEN_OPTS__FLAG) "$<" - @echo 'Finished building: $<' + "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -Ooff --opt_for_speed=0 --include_path="/products/ndk_2_25_00_09/packages/ti/ndk/inc/bsd" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Common/protobuf-c" --include_path="C:/Tango/Software/Embedded_SW/Embedded" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication/PMR/Hardware" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication/PMR/Printing" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication/PMR/Common" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication/PMR/Debugging" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication/PMR" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Common" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Modules" --include_path="C:/ti/TivaWare_C_Series-2.1.2.111" --include_path="C:/ti/xdctools_3_32_00_06_core/include" --include_path="/products/TivaWare_C_Series-2.1.1.71b" --include_path="/products/bios_6_45_01_29/packages/ti/sysbios/posix" --include_path="/products/tidrivers_tivac_2_16_00_08" --include_path="C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include" --define=ENABLE_LFN --define=DEBUG_TEST_FUNCTIONS --define=TARGET_IS_TM4C129_RA0 --define=ccs="ccs" --define=ccs --define=TIVAWARE --define=PART_TM4C129XNCZAD -g --gcc --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="Main.d_raw" $(GEN_OPTS__FLAG) "$<" + @echo 'Finished building: "$<"' @echo ' ' delay.obj: ../delay.c $(GEN_OPTS) | $(GEN_HDRS) - @echo 'Building file: $<' + @echo 'Building file: "$<"' @echo 'Invoking: ARM Compiler' - "C:/TI/ccsv7/tools/compiler/ti-cgt-arm_16.9.4.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -Ooff --opt_for_speed=0 --include_path="C:/ti/tirtos_tivac_2_16_00_08/products/ndk_2_25_00_09/packages/ti/ndk/inc/bsd" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Common/protobuf-c" --include_path="C:/Tango/Software/Embedded_SW/Embedded" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication/PMR/Hardware" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication/PMR/Printing" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication/PMR/Common" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication/PMR" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Common" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Modules" --include_path="C:/ti/TivaWare_C_Series-2.1.2.111" --include_path="C:/ti/xdctools_3_32_00_06_core/include" --include_path="C:/ti/tirtos_tivac_2_16_00_08/products/TivaWare_C_Series-2.1.1.71b" --include_path="C:/ti/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages/ti/sysbios/posix" --include_path="C:/ti/tirtos_tivac_2_16_00_08/products/tidrivers_tivac_2_16_00_08" --include_path="C:/TI/ccsv7/tools/compiler/ti-cgt-arm_16.9.4.LTS/include" --define=ENABLE_LFN --define=DEBUG_TEST_FUNCTIONS --define=TARGET_IS_TM4C129_RA0 --define=ccs="ccs" --define=ccs --define=TIVAWARE --define=PART_TM4C129XNCZAD -g --gcc --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="delay.d_raw" $(GEN_OPTS__FLAG) "$<" - @echo 'Finished building: $<' + "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -Ooff --opt_for_speed=0 --include_path="/products/ndk_2_25_00_09/packages/ti/ndk/inc/bsd" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Common/protobuf-c" --include_path="C:/Tango/Software/Embedded_SW/Embedded" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication/PMR/Hardware" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication/PMR/Printing" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication/PMR/Common" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication/PMR/Debugging" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication/PMR" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Communication" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Common" --include_path="C:/Tango/Software/Embedded_SW/Embedded/Modules" --include_path="C:/ti/TivaWare_C_Series-2.1.2.111" --include_path="C:/ti/xdctools_3_32_00_06_core/include" --include_path="/products/TivaWare_C_Series-2.1.1.71b" --include_path="/products/bios_6_45_01_29/packages/ti/sysbios/posix" --include_path="/products/tidrivers_tivac_2_16_00_08" --include_path="C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.6.LTS/include" --define=ENABLE_LFN --define=DEBUG_TEST_FUNCTIONS --define=TARGET_IS_TM4C129_RA0 --define=ccs="ccs" --define=ccs --define=TIVAWARE --define=PART_TM4C129XNCZAD -g --gcc --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="delay.d_raw" $(GEN_OPTS__FLAG) "$<" + @echo 'Finished building: "$<"' @echo ' ' diff --git a/Software/Stubs Collection/stubs/HeatersEnd.cs b/Software/Stubs Collection/stubs/HeatersEnd.cs new file mode 100644 index 000000000..d190cb255 --- /dev/null +++ b/Software/Stubs Collection/stubs/HeatersEnd.cs @@ -0,0 +1,16 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs; + +public void OnExecute(StubManager stubManager) +{ + var response = stubManager.Run("StubHeaterRequest" ,0xff, false, 0);//call the function HeatersEnd(); +} \ No newline at end of file diff --git a/Software/Stubs Collection/stubs/technician view files/lp4 Tech Board.tpf b/Software/Stubs Collection/stubs/technician view files/lp4 Tech Board.tpf index c21ab80ed..e12fb818b 100644 --- a/Software/Stubs Collection/stubs/technician view files/lp4 Tech Board.tpf +++ b/Software/Stubs Collection/stubs/technician view files/lp4 Tech Board.tpf @@ -124,7 +124,7 @@ DryerAirHeater 0 - 23.74 + 24.919999999999998 false false true @@ -143,7 +143,7 @@ DryerMainHeater 0 - 77.21 + 31.02 false false true @@ -162,7 +162,7 @@ DryerSecondaryHeater 0 - -2 + 30.74 false false true @@ -181,7 +181,7 @@ HeaterZone3 0 - 86.1 + 8.5 false false true @@ -200,7 +200,7 @@ HeaterZone2 0 - 70.73 + 21.709999999999997 false false true @@ -219,7 +219,7 @@ HeaterZone1 0 - 77.05 + 20.58 false false true @@ -238,7 +238,7 @@ MixerHeater 0 - 49.069999999999993 + 200.97 false false true @@ -257,7 +257,7 @@ HeaterZone4 0 - 89.149999999999991 + 21.819999999999997 false false true @@ -276,7 +276,7 @@ HeaterZone5 0 - 93.05 + 22 false false true @@ -295,7 +295,7 @@ HeaterZone6 0 - 77.28 + 21.119999999999997 false false true @@ -1313,7 +1313,7 @@ HeaterZone4 0 - 89.149999999999991 + 21.819999999999997 false false true @@ -1332,7 +1332,7 @@ HeaterZone1 0 - 77.05 + 20.58 false false true @@ -1351,7 +1351,7 @@ HeaterZone3 0 - 86.1 + 8.5 false false true @@ -1370,7 +1370,7 @@ HeaterZone5 0 - 93.05 + 22 false false true @@ -1389,7 +1389,7 @@ MixerHeater 0 - 49.069999999999993 + 200.97 false false true @@ -1408,7 +1408,7 @@ HeaterZone2 0 - 70.73 + 21.709999999999997 false false true @@ -1427,7 +1427,7 @@ HeaterZone6 0 - 77.28 + 21.119999999999997 false false true @@ -1446,7 +1446,7 @@ DryerAirHeater 0 - 23.74 + 24.919999999999998 false false true @@ -1526,7 +1526,7 @@ HeaterZone3 0 - 86.1 + 8.5 false false true @@ -1545,7 +1545,7 @@ HeaterZone4 0 - 89.149999999999991 + 21.819999999999997 false false true @@ -1564,7 +1564,7 @@ HeaterZone5 0 - 93.05 + 22 false false true @@ -1713,5 +1713,5 @@ - 0 + 3 \ No newline at end of file -- cgit v1.3.1 From 500041ed670482cfd422f72b632e12f86e92b939 Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Wed, 6 Mar 2019 16:19:14 +0200 Subject: fix bug : reading channel of internal A/d > 15 --- .../Embedded/Drivers/ADC_Sampling/ADC.c | 54 +++++++++++----------- .../Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c | 4 +- 2 files changed, 29 insertions(+), 29 deletions(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.c b/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.c index ce84d7eb6..9518e9791 100644 --- a/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.c +++ b/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.c @@ -91,26 +91,26 @@ void ADCAcquireStop(void) //MillisecStop // Physical ADC connected channels in the TIVA //***************************************************************************** -#define CHAN_AIR_PRESSURE_1 ADC_CTL_CH0 -#define CHAN_AIR_PRESSURE_2 ADC_CTL_CH1 -#define CHAN_DISPENSE_PRESSURE_1 ADC_CTL_CH2 -#define CHAN_DISPENSE_PRESSURE_2 ADC_CTL_CH3 -#define CHAN_DISPENSE_PRESSURE_3 ADC_CTL_CH4 -#define CHAN_DISPENSE_PRESSURE_4 ADC_CTL_CH5 -#define CHAN_DISPENSE_PRESSURE_5 ADC_CTL_CH6 -#define CHAN_DISPENSE_PRESSURE_6 ADC_CTL_CH7 -#define CHAN_DISPENSE_PRESSURE_7 ADC_CTL_CH8 -#define CHAN_DISPENSE_PRESSURE_8 ADC_CTL_CH9 -#define CHAN_VOCSENS ADC_CTL_CH10 -#define CHAN_SPARE1 ADC_CTL_CH11 -#define CHAN_SPARE2 ADC_CTL_CH12 -#define CHAN_LEFT_DANCER_1 ADC_CTL_CH13 -#define CHAN_LEFT_DANCER_2 ADC_CTL_CH14 -#define CHAN_RIGHT_DANCER ADC_CTL_CH15 -#define CHAN_DRYER_CURRENT_1 ADC_CTL_CH16 //Dryer Heater 2 -#define CHAN_DRYER_CURRENT_2 ADC_CTL_CH17 //Dryer Heater 1 -#define CHAN_DRYER_CURRENT_3 ADC_CTL_CH18 -#define CHAN_3V3_FPGA ADC_CTL_CH19 +#define CHAN_AIR_PRESSURE_1 0//ADC_CTL_CH0 +#define CHAN_AIR_PRESSURE_2 1//ADC_CTL_CH1 +#define CHAN_DISPENSE_PRESSURE_1 2//ADC_CTL_CH2 +#define CHAN_DISPENSE_PRESSURE_2 3//ADC_CTL_CH3 +#define CHAN_DISPENSE_PRESSURE_3 4//ADC_CTL_CH4 +#define CHAN_DISPENSE_PRESSURE_4 5//ADC_CTL_CH5 +#define CHAN_DISPENSE_PRESSURE_5 6//ADC_CTL_CH6 +#define CHAN_DISPENSE_PRESSURE_6 7//ADC_CTL_CH7 +#define CHAN_DISPENSE_PRESSURE_7 8//ADC_CTL_CH8 +#define CHAN_DISPENSE_PRESSURE_8 9//ADC_CTL_CH9 +#define CHAN_VOCSENS 10//ADC_CTL_CH10 +#define CHAN_SPARE1 11//ADC_CTL_CH11 +#define CHAN_SPARE2 12//ADC_CTL_CH12 +#define CHAN_LEFT_DANCER_1 13//ADC_CTL_CH13 +#define CHAN_LEFT_DANCER_2 14//ADC_CTL_CH14 +#define CHAN_RIGHT_DANCER 15//ADC_CTL_CH15 +#define CHAN_DRYER_CURRENT_2 16//ADC_CTL_CH16 //Dryer Heater 2 +#define CHAN_DRYER_CURRENT_1 17//ADC_CTL_CH17 //Dryer Heater 1 +#define CHAN_DRYER_CURRENT_3 18//ADC_CTL_CH18 +#define CHAN_3V3_FPGA 19//ADC_CTL_CH19 /* Connected with pull down to reg GND ADC_CTL_CH20 Connected with pull down to reg GND ADC_CTL_CH21 @@ -209,10 +209,10 @@ uint32_t ADC_TriggerCollection(void) // (called by MillisecLoop) // ADC Data get for a single data read // //***************************************************************************** -uint32_t ADC_GetReading(int DataItemId) // // ADC Data get for a single data read +uint32_t ADC_GetReading(int DataItemId) // 0 - 19 // ADC Data get for a single data read { int bufnotinuse; - //assert (DataItemId Date: Wed, 6 Mar 2019 18:11:12 +0200 Subject: current added to the diagnostics data. added protobuf parameters compiled. --- .../PMR/Diagnostics/DiagnosticsMonitors.pb-c.c | 110 ++++++++++++++++++++- .../PMR/Diagnostics/DiagnosticsMonitors.pb-c.h | 18 +++- .../ConfigurationParameters.pb-c.c | 45 ++++++++- .../ConfigurationParameters.pb-c.h | 8 +- .../Embedded/Modules/Diagnostics/Diagnostics.c | 23 +++++ .../PMR/Messages/Debugging/DebugLogCategory.proto | 2 +- 6 files changed, 197 insertions(+), 9 deletions(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.c index 3bbdcdd8c..2a5974162 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.c @@ -52,7 +52,7 @@ void diagnostics_monitors__free_unpacked assert(message->base.descriptor == &diagnostics_monitors__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } -static const ProtobufCFieldDescriptor diagnostics_monitors__field_descriptors[55] = +static const ProtobufCFieldDescriptor diagnostics_monitors__field_descriptors[63] = { { "Dancer1Angle", @@ -714,6 +714,102 @@ static const ProtobufCFieldDescriptor diagnostics_monitors__field_descriptors[55 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, + { + "DrierZone1HeaterCurrent", + 56, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(DiagnosticsMonitors, n_drierzone1heatercurrent), + offsetof(DiagnosticsMonitors, drierzone1heatercurrent), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "DrierZone2HeaterCurrent", + 57, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(DiagnosticsMonitors, n_drierzone2heatercurrent), + offsetof(DiagnosticsMonitors, drierzone2heatercurrent), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "HeadZone1HeaterCurrent", + 58, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(DiagnosticsMonitors, n_headzone1heatercurrent), + offsetof(DiagnosticsMonitors, headzone1heatercurrent), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "HeadZone2HeaterCurrent", + 59, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(DiagnosticsMonitors, n_headzone2heatercurrent), + offsetof(DiagnosticsMonitors, headzone2heatercurrent), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "HeadZone3HeaterCurrent", + 60, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(DiagnosticsMonitors, n_headzone3heatercurrent), + offsetof(DiagnosticsMonitors, headzone3heatercurrent), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "HeadZone4HeaterCurrent", + 61, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(DiagnosticsMonitors, n_headzone4heatercurrent), + offsetof(DiagnosticsMonitors, headzone4heatercurrent), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "HeadZone5_6HeaterCurrent", + 62, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(DiagnosticsMonitors, n_headzone5_6heatercurrent), + offsetof(DiagnosticsMonitors, headzone5_6heatercurrent), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "Mixer1HeaterCurrent", + 63, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(DiagnosticsMonitors, n_mixer1heatercurrent), + offsetof(DiagnosticsMonitors, mixer1heatercurrent), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, }; static const unsigned diagnostics_monitors__field_indices_by_name[] = { 38, /* field[38] = BlowerVoltage */ @@ -741,6 +837,8 @@ static const unsigned diagnostics_monitors__field_indices_by_name[] = { 23, /* field[23] = DispensersLinearPositions */ 21, /* field[21] = DispensersMotorsFrequency */ 24, /* field[24] = DispensersPressure */ + 55, /* field[55] = DrierZone1HeaterCurrent */ + 56, /* field[56] = DrierZone2HeaterCurrent */ 19, /* field[19] = DryerAirFlow */ 4, /* field[4] = DryerMotor */ 16, /* field[16] = DryerZone1Temperature */ @@ -750,11 +848,16 @@ static const unsigned diagnostics_monitors__field_indices_by_name[] = { 14, /* field[14] = FeederTension */ 25, /* field[25] = FilterDeltaPressure */ 13, /* field[13] = HeadAirFlow */ + 57, /* field[57] = HeadZone1HeaterCurrent */ 10, /* field[10] = HeadZone1Temperature */ + 58, /* field[58] = HeadZone2HeaterCurrent */ 11, /* field[11] = HeadZone2Temperature */ + 59, /* field[59] = HeadZone3HeaterCurrent */ 12, /* field[12] = HeadZone3Temperature */ + 60, /* field[60] = HeadZone4HeaterCurrent */ 35, /* field[35] = HeadZone4Temperature */ 36, /* field[36] = HeadZone5Temperature */ + 61, /* field[61] = HeadZone5_6HeaterCurrent */ 37, /* field[37] = HeadZone6Temperature */ 47, /* field[47] = MidTank1Level */ 48, /* field[48] = MidTank2Level */ @@ -764,6 +867,7 @@ static const unsigned diagnostics_monitors__field_indices_by_name[] = { 52, /* field[52] = MidTank6Level */ 53, /* field[53] = MidTank7Level */ 54, /* field[54] = MidTank8Level */ + 62, /* field[62] = Mixer1HeaterCurrent */ 9, /* field[9] = MixerTemperature */ 5, /* field[5] = PollerMotor */ 15, /* field[15] = PullerTension */ @@ -775,7 +879,7 @@ static const unsigned diagnostics_monitors__field_indices_by_name[] = { static const ProtobufCIntRange diagnostics_monitors__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 55 } + { 0, 63 } }; const ProtobufCMessageDescriptor diagnostics_monitors__descriptor = { @@ -785,7 +889,7 @@ const ProtobufCMessageDescriptor diagnostics_monitors__descriptor = "DiagnosticsMonitors", "", sizeof(DiagnosticsMonitors), - 55, + 63, diagnostics_monitors__field_descriptors, diagnostics_monitors__field_indices_by_name, 1, diagnostics_monitors__number_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.h index 5917ffd76..13ebbaf21 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DiagnosticsMonitors.pb-c.h @@ -137,10 +137,26 @@ struct _DiagnosticsMonitors double *midtank7level; size_t n_midtank8level; double *midtank8level; + size_t n_drierzone1heatercurrent; + double *drierzone1heatercurrent; + size_t n_drierzone2heatercurrent; + double *drierzone2heatercurrent; + size_t n_headzone1heatercurrent; + double *headzone1heatercurrent; + size_t n_headzone2heatercurrent; + double *headzone2heatercurrent; + size_t n_headzone3heatercurrent; + double *headzone3heatercurrent; + size_t n_headzone4heatercurrent; + double *headzone4heatercurrent; + size_t n_headzone5_6heatercurrent; + double *headzone5_6heatercurrent; + size_t n_mixer1heatercurrent; + double *mixer1heatercurrent; }; #define DIAGNOSTICS_MONITORS__INIT \ { PROTOBUF_C_MESSAGE_INIT (&diagnostics_monitors__descriptor) \ - , 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL } + , 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL } /* DiagnosticsMonitors methods */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.c index 5e36720c9..b5e08ea1f 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.c @@ -52,7 +52,7 @@ void configuration_parameters__free_unpacked assert(message->base.descriptor == &configuration_parameters__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } -static const ProtobufCFieldDescriptor configuration_parameters__field_descriptors[18] = +static const ProtobufCFieldDescriptor configuration_parameters__field_descriptors[21] = { { "BreakSensorLimit", @@ -270,6 +270,42 @@ static const ProtobufCFieldDescriptor configuration_parameters__field_descriptor 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, + { + "DispenserPresegmentWFCF", + 19, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(ConfigurationParameters, has_dispenserpresegmentwfcf), + offsetof(ConfigurationParameters, dispenserpresegmentwfcf), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "StartHeatingOnInitSequence", + 20, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(ConfigurationParameters, has_startheatingoninitsequence), + offsetof(ConfigurationParameters, startheatingoninitsequence), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "GeneralParameters", + 21, + PROTOBUF_C_LABEL_REPEATED, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(ConfigurationParameters, n_generalparameters), + offsetof(ConfigurationParameters, generalparameters), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, }; static const unsigned configuration_parameters__field_indices_by_name[] = { 13, /* field[13] = ACHeatersLowerOperationLimit */ @@ -283,18 +319,21 @@ static const unsigned configuration_parameters__field_indices_by_name[] = { 10, /* field[10] = DispenserBuildPressureLimit */ 9, /* field[9] = DispenserBuildPressureSpeed */ 11, /* field[11] = DispenserBuildPressureTimeout */ + 18, /* field[18] = DispenserPresegmentWFCF */ + 20, /* field[20] = GeneralParameters */ 6, /* field[6] = InitialDispenserPressure */ 8, /* field[8] = InitialDispenserTimeLag */ 7, /* field[7] = InitialDispenserTimeout */ 17, /* field[17] = MidTankPressureCorrection */ 5, /* field[5] = OpenValveTimeout */ 2, /* field[2] = OverHeatCountLimit */ + 19, /* field[19] = StartHeatingOnInitSequence */ 3, /* field[3] = UnderHeatCountLimit */ }; static const ProtobufCIntRange configuration_parameters__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 18 } + { 0, 21 } }; const ProtobufCMessageDescriptor configuration_parameters__descriptor = { @@ -304,7 +343,7 @@ const ProtobufCMessageDescriptor configuration_parameters__descriptor = "ConfigurationParameters", "", sizeof(ConfigurationParameters), - 18, + 21, configuration_parameters__field_descriptors, configuration_parameters__field_indices_by_name, 1, configuration_parameters__number_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.h index 307352efd..3911bbcb1 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/EmbeddedParameters/ConfigurationParameters.pb-c.h @@ -62,10 +62,16 @@ struct _ConfigurationParameters uint32_t dcheatersupperoperationlimit; protobuf_c_boolean has_midtankpressurecorrection; double midtankpressurecorrection; + protobuf_c_boolean has_dispenserpresegmentwfcf; + double dispenserpresegmentwfcf; + protobuf_c_boolean has_startheatingoninitsequence; + protobuf_c_boolean startheatingoninitsequence; + size_t n_generalparameters; + double *generalparameters; }; #define CONFIGURATION_PARAMETERS__INIT \ { PROTOBUF_C_MESSAGE_INIT (&configuration_parameters__descriptor) \ - , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,NULL } /* ConfigurationParameters methods */ diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c index 72dd92d54..45db83b83 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c @@ -92,6 +92,7 @@ double dryerzone3temperature[DIAGNOSTICS_LIMIT]; double dispensermotorfrequency[MAX_SYSTEM_DISPENSERS][DIAGNOSTICS_LIMIT]; double dispenserspressure[MAX_SYSTEM_DISPENSERS][DIAGNOSTICS_LIMIT]; double MidTankpressure[MAX_SYSTEM_DISPENSERS][1]; +double HeatersCurrent[NUM_OF_HEATERS][1]; DoubleArray DispenserFreq[MAX_SYSTEM_DISPENSERS]; DoubleArray DiagnosticsDispenserPressure[MAX_SYSTEM_DISPENSERS]; @@ -347,6 +348,10 @@ void Diagnostic100msecCollection(void) dispenserspressure[i][DiagnosticsIndex] = GetDispenserPressure(i); //Read_MidTank_Pressure_Sensor MidTankpressure[i][0] = Get_MidTank_Pressure_Sensor(i); } + for (i=0;i Date: Thu, 7 Mar 2019 14:05:05 +0200 Subject: Add the functiomn Lubricant_2Way_Valve --- Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c | 2 +- Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h | 2 +- Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c | 18 ++++++++++++++++++ Software/Embedded_SW/Embedded/Drivers/Valves/Valve.h | 2 ++ 4 files changed, 22 insertions(+), 2 deletions(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c index 30355b2c7..8efa3998f 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c @@ -21,7 +21,7 @@ int FPGA_Test() { GP_Out_01 Gpo_01; - Gpo_01.bits.F3_GPO_LED4 = 1; + Gpo_01.bits.F3_LUBRICANT_VALVE = 1; Gpo_01.bits.F3_GPO_LED3 = 1; Gpo_01.bits.F3_GPO_LED2 = 0; Gpo_01.bits.F3_GPO_LED1 = 1; diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h index 1196356a7..5bc0d5071 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h @@ -1064,7 +1064,7 @@ typedef union { struct { - bool F3_GPO_LED4 : 1; //0 + bool F3_LUBRICANT_VALVE : 1; //0 //F3_GPO_LED4 bool F3_GPO_LED3 : 1; //1 bool F3_GPO_LED2 : 1; //2 bool F3_GPO_LED1 : 1; //3 diff --git a/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c b/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c index 162e4f990..af7cb9731 100644 --- a/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c +++ b/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c @@ -378,3 +378,21 @@ uint32_t Control3WayValvesWithCallback (Valves_t _ValveId, bool direction, callb return Valve3WayControlId[_ValveId]; } + +uint8_t Lubricant_2Way_Valve(bool Direction) +{ + uint8_t Status = OK; + + if(Direction == OPEN) + { + F3_GPO_01_bus |= BIT0; + } + else //Direction = CLOSE + { + + F3_GPO_01_bus &= ~(BIT0); + } + return Status; +} + + diff --git a/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.h b/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.h index df20d05ff..0ac65cb34 100644 --- a/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.h +++ b/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.h @@ -61,4 +61,6 @@ void SetAllDispensersValves(bool Direction); uint32_t FPGA_GetDispenserValveBusyOCD(uint32_t ValveId, uint32_t dummy); void FPGA_GetAllDispensersValveBusyOCD(); // MillisecLoop // OCD - Over Current Detection uint32_t Control3WayValvesWithCallback (Valves_t _ValveId, bool direction, callback_fptr callback); //direction: MidTank_Dispenser or Dispenser_Mixer + +uint8_t Lubricant_2Way_Valve(bool Direction); #endif /* DRIVERS_VALVES_VALVE_H_ */ -- cgit v1.3.1 From 7256fe1c07cf5ecbe485c3cdac238b88dfc2cd1d Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Thu, 7 Mar 2019 17:08:42 +0200 Subject: Add system fans + read the tacho of the new small drawer fans --- Software/Embedded_SW/Embedded/DataDef.h | 26 +++++ Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c | 105 ++++++++++++++++----- .../Embedded/Modules/Control/MillisecTask.c | 12 ++- .../Embedded/Modules/Control/MillisecTask.h | 1 + 4 files changed, 118 insertions(+), 26 deletions(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/DataDef.h b/Software/Embedded_SW/Embedded/DataDef.h index cf137a00a..4601e971b 100644 --- a/Software/Embedded_SW/Embedded/DataDef.h +++ b/Software/Embedded_SW/Embedded/DataDef.h @@ -243,6 +243,32 @@ typedef enum CART3 = 3, }CARTREGE; */ + +typedef struct +{ + bool DRAWER_BIG; //bit 0 + bool DRAWER_SMALL0;//bit 1 + bool DRAWER_SMALL1;//bit 2 + bool DRAWER_SMALL2;//bit 3 + bool DRAWER_SMALL3;//bit 4 + bool SYSTEM_FAN0; //bit 5 + bool SYSTEM_FAN1; //bit 6 + bool SYSTEM_FAN2; //bit 7 +}FANS_STATUS; + +enum +{ + DRAWER_B, + DRAWER_S0, + DRAWER_S1, + DRAWER_S2, + DRAWER_S3, + SYSTEM_0, + SYSTEM_1, + SYSTEM_2, + MAX_FANS, +}FANS_ID; + //--------------------- #define MaxFlashWords 128 //1K #define MaxFlashBytes MaxFlashWords*4 //4K Byte diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c index 8efa3998f..454e82c28 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c @@ -9,6 +9,7 @@ #include "FPGA_Rename.h" #include "FPGA_COMM.h" +#include #include "driverlib/sysctl.h" //for SysCtlDelay #include @@ -191,20 +192,29 @@ uint32_t Calculate_Tacho_Fan_Speed(uint32_t OSC_IN, uint8_t PPR, uint16_t Presca } +uint32_t Fans_Speed_RPM[MAX_FANS]; + -uint32_t Read_Fans_Tacho() +FANS_STATUS Read_Fans_Tacho() { - uint32_t Status = 0; - uint32_t Drawer_Fan_Speed_RPM = 0; + FANS_STATUS Fans_Status; + #ifndef EVALUATION_BOARD // The big Fan in the drawer - Drawer_Fan_Speed_RPM = Calculate_Tacho_Fan_Speed(29166666, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg0); - - if( Drawer_Fan_Speed_RPM < 1000 ) // need to work around 3000 RPM - Status|= 0x01;// not working / Low Speed + Fans_Speed_RPM[DRAWER_B] = Calculate_Tacho_Fan_Speed(29166666, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg0); + Fans_Speed_RPM[DRAWER_S0] = Calculate_Tacho_Fan_Speed(29166666, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg1); + Fans_Speed_RPM[DRAWER_S1] = Calculate_Tacho_Fan_Speed(29166666, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg2); + Fans_Speed_RPM[DRAWER_S2] = Calculate_Tacho_Fan_Speed(29166666, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg3); + Fans_Speed_RPM[DRAWER_S3] = Calculate_Tacho_Fan_Speed(29166666, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg4); + Fans_Speed_RPM[SYSTEM_0] = Calculate_Tacho_Fan_Speed(29166666, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg5); + Fans_Speed_RPM[SYSTEM_1] = Calculate_Tacho_Fan_Speed(29166666, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg6); + Fans_Speed_RPM[SYSTEM_2] = Calculate_Tacho_Fan_Speed(29166666, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg7); + + if( Fans_Speed_RPM[DRAWER_B] < 1000 ) // need to work around 3000 RPM + Fans_Status.DRAWER_BIG = ERROR;// not working / Low Speed else - Status&= ~0x01;//working (Speed ~0x400) + Fans_Status.DRAWER_BIG = OK;//working (Speed ~0x400) // The 4 small Fans in the drawer // F1_gpi_FANS @@ -212,7 +222,10 @@ uint32_t Read_Fans_Tacho() // “1” Fan working if (F1_gpi_FANS == 0x0F ) { - Status&= ~(0x0F<<1);//working + Fans_Status.DRAWER_SMALL0 = OK;//working + Fans_Status.DRAWER_SMALL1 = OK;//working + Fans_Status.DRAWER_SMALL2 = OK;//working + Fans_Status.DRAWER_SMALL3 = OK;//working } else { @@ -221,28 +234,72 @@ uint32_t Read_Fans_Tacho() bool F1_FAN3_TACH = (F1_gpi_FANS & 0x04)>>0x02; bool F1_FAN4_TACH = (F1_gpi_FANS & 0x08)>>0x03; - if( F1_FAN1_TACH == 0) // Small Fan in the drawer - Status|= (0x01<<1);// not working + if(( Fans_Speed_RPM[DRAWER_S0] < 3000 ) && ( F1_FAN1_TACH == 0)) // need to work around 5000 RPM + { + Fans_Status.DRAWER_SMALL0 = ERROR;/// not working / Low Speed + } else - Status&= ~(0x01<<1);//working + { + Fans_Status.DRAWER_SMALL0 = OK;//working (Speed ~0x400) + } - if( F1_FAN2_TACH == 0) // Small Fan in the drawer - Status|= (0x01<<2);// not working + if(( Fans_Speed_RPM[DRAWER_S1] < 3000 ) && ( F1_FAN2_TACH == 0)) // Small Fan in the drawer // need to work around 5000 RPM + { + Fans_Status.DRAWER_SMALL1 = ERROR;// not working / Low Speed + } else - Status&= ~(0x01<<2);//working - - if( F1_FAN3_TACH == 0) // Small Fan in the drawer - Status|= (0x01<<3);// not working + { + Fans_Status.DRAWER_SMALL1 = OK;//working (Speed ~0x400) + } + if(( Fans_Speed_RPM[DRAWER_S2] < 3000 ) && ( F1_FAN3_TACH == 0)) // Small Fan in the drawer // need to work around 5000 RPM + { + Fans_Status.DRAWER_SMALL2 = ERROR;// not working / Low Speed + } else - Status&= ~(0x01<<3);//working - - if( F1_FAN4_TACH == 0) // Small Fan in the drawer - Status|= (0x01<<4);// not working + { + Fans_Status.DRAWER_SMALL2 = OK;//working (Speed ~0x400) + } + if(( Fans_Speed_RPM[DRAWER_S3] < 3000 ) && ( F1_FAN4_TACH == 0)) // Small Fan in the drawer // need to work around 3050 RPM + { + Fans_Status.DRAWER_SMALL3 = ERROR;// not working / Low Speed + } else - Status&= ~(0x01<<4);//working + { + Fans_Status.DRAWER_SMALL3 = OK;//working (Speed ~0x400) < 1000 ) // need to work around 5000 RPM + } + + } + + if( Fans_Speed_RPM[SYSTEM_0] < 1000 ) // need to work around 3050 RPM + { + Fans_Status.SYSTEM_FAN0 = ERROR;// not working / Low Speed } + else + { + Fans_Status.SYSTEM_FAN0 = OK;//working (Speed ~0x400) + } + + if( Fans_Speed_RPM[SYSTEM_1] < 1000 ) // need to work around 3050 RPM + { + Fans_Status.SYSTEM_FAN1 = ERROR;// not working / Low Speed + } + else + { + Fans_Status.SYSTEM_FAN1 = OK;//working (Speed ~0x400) + } + + if( Fans_Speed_RPM[SYSTEM_2] < 1000 ) // need to work around 3050 RPM + { + Fans_Status.SYSTEM_FAN2 = ERROR;// not working / Low Speed + } + else + { + Fans_Status.SYSTEM_FAN2 = OK;//working (Speed ~0x400) + } + #endif - return Status; + + return Fans_Status; } //------------------------- WHS ---------------------- diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index db6624fd4..8e4a36e62 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -84,6 +84,8 @@ typedef struct MillisecMessage{ uint32_t Dancer_Data[NUM_OF_DANCERS] = {0}; float Speed_Data = 0; uint32_t DrawerFansStatus = 0; +uint32_t SystemFansStatus = 0; + bool watchdogCriticalAlarm = false; @@ -445,7 +447,7 @@ uint32_t MillisecLoop(uint32_t tick) } uint32_t MillisecLowLoop(uint32_t tick) { - uint8_t Motor_i,Disp_i,Heater_i; + uint8_t Motor_i,Disp_i,Heater_i,temp; TEMPERATURE_SENSOR_ID_ENUM Sensor_i; //static int temp=0; @@ -497,7 +499,9 @@ uint32_t MillisecLowLoop(uint32_t tick) //Read_MidTank_Pressure_Sensor(Disp_i); } FPGA_GetAllDispensersValveBusyOCD(); - DrawerFansStatus = Read_Fans_Tacho(); + temp = Read_Fans_Tacho(); + DrawerFansStatus = temp & 0x1F; + SystemFansStatus = temp & 0xE0; KeepAliveOneSecondCall(); for (Motor_i = 0;Motor_i < NUM_OF_MOTORS;Motor_i++) { @@ -617,6 +621,10 @@ uint32_t getDrawerFansStatus(void) { return DrawerFansStatus; } +uint32_t getSystemFansStatus(void) +{ + return SystemFansStatus; +} #ifdef HUNDRED_MICROSECONDS_DANCER_READ uint32_t DancerData[NUM_OF_DANCERS]; uint32_t Control_Read_Dancer_Position(HardwareDancerType DancerId, uint32_t Parameter1, uint32_t Parameter2) diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h index 61c7df7ee..7e2af1079 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h @@ -31,6 +31,7 @@ uint32_t getADCData(int DeviceId); */ float getSensorSpeedData(void); uint32_t getDrawerFansStatus(void); +uint32_t getSystemFansStatus(void); void MillisecInit(void); void MillisecStop(void); -- cgit v1.3.1 From db525669f8bcc4e1f911274dc53b6bf646eedff6 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Sun, 10 Mar 2019 12:13:12 +0200 Subject: suspend FAN checking pending tests. initial fix for dispensers storage --- .../Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 4 ++-- Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c | 13 ++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index 8e4a36e62..5fe242436 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -499,9 +499,9 @@ uint32_t MillisecLowLoop(uint32_t tick) //Read_MidTank_Pressure_Sensor(Disp_i); } FPGA_GetAllDispensersValveBusyOCD(); - temp = Read_Fans_Tacho(); + /*temp = Read_Fans_Tacho(); DrawerFansStatus = temp & 0x1F; - SystemFansStatus = temp & 0xE0; + SystemFansStatus = temp & 0xE0;*/ KeepAliveOneSecondCall(); for (Motor_i = 0;Motor_i < NUM_OF_MOTORS;Motor_i++) { diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c index 1e33b99ca..7978e77bb 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c @@ -223,6 +223,12 @@ void IDS_Dispenser_Content_Init (void) for(i=0;idispenserinfo[i],sizeof(DispenserRunningData)); + IDS_Dispenser_Data[i].has_consumedinnanolitter = true; + IDS_Dispenser_Data[i].has_totalconsumedinnanolitter = true; + IDS_Dispenser_Data[i].has_direction = true; + IDS_Dispenser_Data[i].has_microsteps = true; + IDS_Dispenser_Data[i].has_numberofrefills = true; + IDS_Dispenser_Data[i].has_nanolitterperpulse = true; } free (buffer); dispenser_data__free_unpacked(NULL,StoredDispenserData); @@ -239,12 +245,17 @@ void IDS_Dispenser_Content_Calculation (char DispenserId) TimerMotors_t HW_Motor_Id = DispenserIdToMotorId[DispenserId]; double consumedintimeframe = MotorDriverRequest[HW_Motor_Id].Speed*IDS_Dispenser_Data[DispenserId].microsteps* IDS_Dispenser_Data[DispenserId].nanolitterperpulse * dir; + //consumedintimeframe = 10+DispenserId; IDS_Dispenser_Data[DispenserId].consumedinnanolitter += consumedintimeframe; IDS_Dispenser_Data[DispenserId].totalconsumedinnanolitter += consumedintimeframe; if (DispenserId == 0) { - if (seconds_counter++>=3600) + if (seconds_counter++>=600)//3600) { + if (IDS_Dispenser_Data[DispenserId].consumedinnanolitter) + { + REPORT_MSG(IDS_Dispenser_Data[DispenserId].consumedinnanolitter,"Saving Dispenser Data" ); + } seconds_counter = 0; IDSDispenserData.n_dispenserinfo = MAX_SYSTEM_DISPENSERS; IDSDispenserData.dispenserinfo = dispenserdata; -- cgit v1.3.1 From d3c95b9e4f3e5d1068e2ee2692aae09d88784ec9 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Sun, 10 Mar 2019 12:14:29 +0200 Subject: version 1.3.7.84 --- Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c index c4f04254d..5d952c72a 100644 --- a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c +++ b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c @@ -20,7 +20,7 @@ typedef struct } TangoVersion_t; -TangoVersion_t _gTangoVersion = {1,3,7,81}; +TangoVersion_t _gTangoVersion = {1,3,7,84}; #define BUILD_DATE __DATE__ char Dat[50] = BUILD_DATE; char _gTangoName [MAX_STRING_LEN] = "Tango01 ";//d -- cgit v1.3.1 From 719d6a683c0f7bfdef232003385e5da14c4522e7 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Sun, 10 Mar 2019 12:28:26 +0200 Subject: dispenser info logs --- .../Embedded/Modules/IDS/IDS_dispenser.c | 3 + .../Stubs Collection/stubs/get dispenser data.cs | 73 ++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 Software/Stubs Collection/stubs/get dispenser data.cs (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c index 7978e77bb..2c50f8647 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c @@ -279,6 +279,7 @@ void IDS_Dispenser_Set_Flow_Params (char DispenserId,double nanolitterperpulse,c IDS_Dispenser_Data[DispenserId].nanolitterperpulse = nanolitterperpulse; IDS_Dispenser_Data[DispenserId].microsteps = microsteps; IDS_Dispenser_Data[DispenserId].direction = 1; + Report("IDS_Dispenser_Set_Flow_Params",__FILE__,DispenserId,(int)nanolitterperpulse,RpWarning,microsteps,0); } void IDS_Dispenser_RefillStarted (char DispenserId) { @@ -287,6 +288,7 @@ void IDS_Dispenser_RefillStarted (char DispenserId) IDS_Dispenser_Data[DispenserId].nanolitterperpulse = assumedFlow; IDS_Dispenser_Data[DispenserId].microsteps = 1; IDS_Dispenser_Data[DispenserId].direction = 0; + Report("IDS_Dispenser_RefillStarted",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)(assumedFlow*100),0); } void IDS_Dispenser_RefillEnded (char DispenserId) { @@ -294,6 +296,7 @@ void IDS_Dispenser_RefillEnded (char DispenserId) IDS_Dispenser_Data[DispenserId].numberofrefills++; IDS_Dispenser_Data[DispenserId].direction = 1; IDS_Dispenser_Data[DispenserId].consumedinnanolitter = 0; + Report("IDS_Dispenser_RefillEnded",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)IDS_Dispenser_Data[DispenserId].numberofrefills,0); } void IDS_Dispenser_MovingDirection (char DispenserId, bool direction) { diff --git a/Software/Stubs Collection/stubs/get dispenser data.cs b/Software/Stubs Collection/stubs/get dispenser data.cs new file mode 100644 index 000000000..126cc5ee2 --- /dev/null +++ b/Software/Stubs Collection/stubs/get dispenser data.cs @@ -0,0 +1,73 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.IO; +using Tango.Stubs; +using Google.Protobuf; +using System.IO; + +public void OnExecute(StubManager stubManager) +{ + +GetStorageInfoRequest getStorageInfoRequest = new GetStorageInfoRequest(); + var response = stubManager.Run(getStorageInfoRequest); + + +CreateRequest createRequest = new CreateRequest(); +createRequest.Attribute = Tango.PMR.IO.FileAttribute.Directory; +createRequest.Path = "0://Shlomo"; + var response1 = stubManager.Run(createRequest); + +DeleteRequest deleteRequest = new DeleteRequest(); +deleteRequest.Path = "0://Shlomo//Shlomo1.txt"; + var response5 = stubManager.Run(deleteRequest); +deleteRequest.Path = "0://Shlomo//Shlomo2.txt"; + response5 = stubManager.Run(deleteRequest); + + createRequest.Attribute = 0; +createRequest.Path = "0://Shlomo//Shlomo1.txt"; + response1 = stubManager.Run(createRequest); +createRequest.Attribute = 0; +createRequest.Path = "0://Shlomo//Shlomo2.txt"; + response1 = stubManager.Run(createRequest); + + +byte[] fileBytes = File.ReadAllBytes("C:\\FileSystemTests\\test.txt"); + +FileUploadRequest fileUploadRequest = new FileUploadRequest(); +fileUploadRequest.Path = "0://Shlomo//Shlomo1.txt"; +fileUploadRequest.Length = (int)fileBytes.Length; +FileUploadResponse response2 = stubManager.Run(fileUploadRequest); + +long chunk_size = response2.MaxChunkLength; + +FileStream fs = new FileStream("C:\\FileSystemTests\\test.txt",FileMode.Open); + +while (fs.Position < fs.Length) +{ + stubManager.Write("Position "+ fs.Position+ " Length "+ fs.Length +"\n\n"); + FileChunkUploadRequest fileChunkUploadRequest = new FileChunkUploadRequest(); + fileChunkUploadRequest.UploadID = response2.UploadID; + byte[] chunk = new byte[Math.Min(chunk_size,fs.Length - fs.Position)]; + fs.Read(chunk,0,chunk.Length); + fileChunkUploadRequest.Path = "0://Shlomo//Shlomo1.txt"; + fileChunkUploadRequest.Buffer = ByteString.CopyFrom(chunk); + var response3 = stubManager.Run(fileChunkUploadRequest); + //Thread.Sleep(2000); + +} + + +GetFilesRequest getFilesRequest = new GetFilesRequest(); +getFilesRequest.Path = "0://Shlomo"; + + var response4 = stubManager.Run(getFilesRequest); + + +} \ No newline at end of file -- cgit v1.3.1 From b9306bd57e04308d69ce46ed711fd12dfe0843e8 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Mon, 11 Mar 2019 10:15:20 +0200 Subject: version 1.3.7.88: send parameters on job request. no initial heating. removed some logs --- .../Embedded_SW/Embedded/Common/SW_Info/SW_Info.c | 2 +- Software/Embedded_SW/Embedded/DataDef.h | 2 +- .../Embedded_SW/Embedded/Drivers/Valves/Valve.c | 4 ++-- .../Embedded/Modules/IDS/IDS_dispenser.c | 24 +++++++++++----------- .../Embedded/Modules/Thread/Thread_Winder.c | 2 +- .../StateMachines/Initialization/InitSequence.c | 6 +++++- .../Embedded/StateMachines/Printing/JobSTM.c | 4 ++-- 7 files changed, 24 insertions(+), 20 deletions(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c index 5d952c72a..15e9fe828 100644 --- a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c +++ b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c @@ -20,7 +20,7 @@ typedef struct } TangoVersion_t; -TangoVersion_t _gTangoVersion = {1,3,7,84}; +TangoVersion_t _gTangoVersion = {1,3,7,88}; #define BUILD_DATE __DATE__ char Dat[50] = BUILD_DATE; char _gTangoName [MAX_STRING_LEN] = "Tango01 ";//d diff --git a/Software/Embedded_SW/Embedded/DataDef.h b/Software/Embedded_SW/Embedded/DataDef.h index 4601e971b..60a6dfe12 100644 --- a/Software/Embedded_SW/Embedded/DataDef.h +++ b/Software/Embedded_SW/Embedded/DataDef.h @@ -17,7 +17,7 @@ //#define DEMO_TEMPERATURE //#define TEST_LONGER_PID_THREAD //#define HUNDRED_MICROSECONDS_DANCER_READ - +#define NO_INITIAL_HEATING #define MAX_STRING_LEN 255 //Embedded version + filter.c #define MAX_ERR_SAMPLES 5 //Number of Samples before sending error diff --git a/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c b/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c index af7cb9731..3b1d53758 100644 --- a/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c +++ b/Software/Embedded_SW/Embedded/Drivers/Valves/Valve.c @@ -367,8 +367,8 @@ uint32_t Control3WayValvesWithCallback (Valves_t _ValveId, bool direction, callb Valve3WayControlId[_ValveId] = AddControlCallback( Valve3WayCallBackFunction, eOneSecond/*eHundredMillisecond*/, FPGA_GetDispenserValveBusyOCD,(IfTypeDisopenser*0x100+_ValveId), _ValveId, 0 ); if (Valve3WayControlId[_ValveId] == 0xFF) Report("Add control callback failed",__FILE__,__LINE__,(int)_ValveId,RpWarning,(int)Valve3WayControlId[_ValveId],0); - else - Report("Add control callback",__FILE__,__LINE__,(int)_ValveId,RpWarning,(int)Valve3WayControlId[_ValveId],0); + //else + // Report("Add control callback",__FILE__,__LINE__,(int)_ValveId,RpWarning,(int)Valve3WayControlId[_ValveId],0); EnableDisableDispenserValve(_ValveId, ENABLE); diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c index 2c50f8647..acaf19744 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c @@ -86,7 +86,7 @@ uint32_t IDS_Dispenser_Build_Pressure_Callback(uint32_t DispenserId, uint32_t Re uint32_t IDS_Dispenser_Build_Pressure(int DispenserId, callback_fptr callback) { DispenserCallback[DispenserId] = callback; - Report("Control3WayValvesWithCallback called ",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)0,0); + //Report("Control3WayValvesWithCallback called ",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)0,0); Control3WayValvesWithCallback ((Valves_t)DispenserId, CloseValve, NULL); //direction: MidTank_Dispenser or Dispenser_Mixer if (DispenserControlId[DispenserId] != 0xFF) @@ -97,7 +97,7 @@ uint32_t IDS_Dispenser_Build_Pressure_Callback(uint32_t DispenserId, uint32_t Re Report("Add control callback failed",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)DispenserControlId[DispenserId],0); else { - Report("Add control callback",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)DispenserControlId[DispenserId],0); + //Report("Add control callback",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)DispenserControlId[DispenserId],0); DispenserPrepareTime[DispenserId]=0; TimerMotors_t HW_Motor_Id = DispenserIdToMotorId[DispenserId]; MotorSetSpeed(HW_Motor_Id, DispenserPrepareSpeed); @@ -130,7 +130,7 @@ uint32_t IDS_Dispenser_Build_Pressure_Callback(uint32_t DispenserId, uint32_t Re uint32_t IDS_Dispenser_Close_Valve_And_Stop_Motor(int DispenserId, callback_fptr callback) { DispenserCallback[DispenserId] = callback; - Report("IDS_Dispenser_Close_Valve_And_Stop_Motor",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)msec_millisecondCounter,0); + //Report("IDS_Dispenser_Close_Valve_And_Stop_Motor",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)msec_millisecondCounter,0); Control3WayValvesWithCallback ((Valves_t)DispenserId, CloseValve, NULL); //direction: MidTank_Dispenser or Dispenser_Mixer if (DispenserControlId[DispenserId] != 0xFF) @@ -139,22 +139,22 @@ uint32_t IDS_Dispenser_Build_Pressure_Callback(uint32_t DispenserId, uint32_t Re DispenserControlId[DispenserId] = AddControlCallback( IDS_Dispenser_StopMotorCallback, CloseValveTimeout, TemplateDataReadCBFunction,DispenserId, DispenserId, 0 ); if (DispenserControlId[DispenserId] == 0xFF) Report("Add control callback failed",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)DispenserControlId[DispenserId],0); - else - Report("Add control callback",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)DispenserControlId[DispenserId],0); + //else + // Report("Add control callback",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)DispenserControlId[DispenserId],0); return OK; } uint32_t IDS_Dispenser_OpenValveCallback(uint32_t DispenserId, uint32_t ReadValue) { - Report("IDS_Dispenser_Start_Motor_and_Open_Valve Callback",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)msec_millisecondCounter,0); + //Report("IDS_Dispenser_Start_Motor_and_Open_Valve Callback",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)msec_millisecondCounter,0); if (SafeRemoveControlCallback(DispenserControlId[DispenserId], IDS_Dispenser_OpenValveCallback )==OK) DispenserControlId[DispenserId] = 0xFF; else Report("Remove control callback failed",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)DispenserControlId[DispenserId],0); - Report("Control3WayValvesWithCallback called ",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)0,0); + //Report("Control3WayValvesWithCallback called ",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)0,0); Control3WayValvesWithCallback (DispenserId, OpenValve, NULL); //direction: MidTank_Dispenser or Dispenser_Mixer if (DispenserCallback[DispenserId]) @@ -185,13 +185,13 @@ uint32_t IDS_Dispenser_Start_Motor_and_Open_Valve(int DispenserId, int MotorSpee CurrentDispenserSpeed[DispenserId] = MotorSpeed; if (DispenserControlId[DispenserId] != 0xFF) Report("Cannot Add control callback",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)DispenserControlId[DispenserId],0); - Report("IDS_Dispenser_Start_Motor_and_Open_Valve",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)msec_millisecondCounter,0); + //Report("IDS_Dispenser_Start_Motor_and_Open_Valve",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)msec_millisecondCounter,0); DispenserControlId[DispenserId] = AddControlCallback( IDS_Dispenser_OpenValveCallback, OpenValveTimeout, TemplateDataReadCBFunction,DispenserId, DispenserId, 0 ); if (DispenserControlId[DispenserId] == 0xFF) Report("Add control callback failed",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)DispenserControlId[DispenserId],0); - else - Report("Add control callback",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)DispenserControlId[DispenserId],0); + //else + // Report("Add control callback",__FILE__,__LINE__,(int)DispenserId,RpWarning,(int)DispenserControlId[DispenserId],0); } return OK; @@ -242,8 +242,7 @@ void IDS_Dispenser_Content_Calculation (char DispenserId) { assert (DispenserIdprocessparameters) + if (Ticket->processparameters) { if (HandleProcessParameters(Ticket->processparameters)!= OK) { @@ -623,7 +623,7 @@ void JobRequestFunc(MessageContainer* requestContainer) error = ERROR_CODE__INVALID_PARAMETER; usnprintf(ErrorMsg, 100, "Hardware Parameters Not Set"); } - }*/ + } REPORT_MSG(0,"Process parameters in job request are not handled. push separately for now"); if (Ticket->spool) { -- cgit v1.3.1 From eaeb19841e1d5195362ec1bd1fa8fb70557932cc Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Mon, 11 Mar 2019 12:09:05 +0200 Subject: Fix bug in fans status --- Software/Embedded_SW/Embedded/DataDef.h | 23 ++++++----- Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c | 44 +++++++++++----------- Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.h | 2 +- .../I2C_Communication/Dispensers_IO_Port/IO.c | 10 +++++ .../I2C_Communication/Dispensers_IO_Port/IO.h | 21 +++++++++++ 5 files changed, 68 insertions(+), 32 deletions(-) create mode 100644 Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispensers_IO_Port/IO.c create mode 100644 Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispensers_IO_Port/IO.h (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/DataDef.h b/Software/Embedded_SW/Embedded/DataDef.h index 4601e971b..1c09f1dd7 100644 --- a/Software/Embedded_SW/Embedded/DataDef.h +++ b/Software/Embedded_SW/Embedded/DataDef.h @@ -244,16 +244,21 @@ typedef enum }CARTREGE; */ -typedef struct + +typedef union { - bool DRAWER_BIG; //bit 0 - bool DRAWER_SMALL0;//bit 1 - bool DRAWER_SMALL1;//bit 2 - bool DRAWER_SMALL2;//bit 3 - bool DRAWER_SMALL3;//bit 4 - bool SYSTEM_FAN0; //bit 5 - bool SYSTEM_FAN1; //bit 6 - bool SYSTEM_FAN2; //bit 7 + struct + { + uint8_t DRAWER_BIG:1; //bit 0 + uint8_t DRAWER_SMALL0:1;//bit 1 + uint8_t DRAWER_SMALL1:1;//bit 2 + uint8_t DRAWER_SMALL2:1;//bit 3 + uint8_t DRAWER_SMALL3:1;//bit 4 + uint8_t SYSTEM_FAN0:1; //bit 5 + uint8_t SYSTEM_FAN1:1; //bit 6 + uint8_t SYSTEM_FAN2:1; //bit 7 + }bit; + uint8_t Uchar; }FANS_STATUS; enum diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c index 454e82c28..0b98891c5 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c @@ -195,7 +195,7 @@ uint32_t Calculate_Tacho_Fan_Speed(uint32_t OSC_IN, uint8_t PPR, uint16_t Presca uint32_t Fans_Speed_RPM[MAX_FANS]; -FANS_STATUS Read_Fans_Tacho() +uint8_t Read_Fans_Tacho() { FANS_STATUS Fans_Status; @@ -212,9 +212,9 @@ FANS_STATUS Read_Fans_Tacho() Fans_Speed_RPM[SYSTEM_2] = Calculate_Tacho_Fan_Speed(29166666, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg7); if( Fans_Speed_RPM[DRAWER_B] < 1000 ) // need to work around 3000 RPM - Fans_Status.DRAWER_BIG = ERROR;// not working / Low Speed + Fans_Status.bit.DRAWER_BIG = ERROR;// not working / Low Speed else - Fans_Status.DRAWER_BIG = OK;//working (Speed ~0x400) + Fans_Status.bit.DRAWER_BIG = OK;//working (Speed ~0x400) // The 4 small Fans in the drawer // F1_gpi_FANS @@ -222,10 +222,10 @@ FANS_STATUS Read_Fans_Tacho() // “1” Fan working if (F1_gpi_FANS == 0x0F ) { - Fans_Status.DRAWER_SMALL0 = OK;//working - Fans_Status.DRAWER_SMALL1 = OK;//working - Fans_Status.DRAWER_SMALL2 = OK;//working - Fans_Status.DRAWER_SMALL3 = OK;//working + Fans_Status.bit.DRAWER_SMALL0 = OK;//working + Fans_Status.bit.DRAWER_SMALL1 = OK;//working + Fans_Status.bit.DRAWER_SMALL2 = OK;//working + Fans_Status.bit.DRAWER_SMALL3 = OK;//working } else { @@ -236,70 +236,70 @@ FANS_STATUS Read_Fans_Tacho() if(( Fans_Speed_RPM[DRAWER_S0] < 3000 ) && ( F1_FAN1_TACH == 0)) // need to work around 5000 RPM { - Fans_Status.DRAWER_SMALL0 = ERROR;/// not working / Low Speed + Fans_Status.bit.DRAWER_SMALL0 = ERROR;/// not working / Low Speed } else { - Fans_Status.DRAWER_SMALL0 = OK;//working (Speed ~0x400) + Fans_Status.bit.DRAWER_SMALL0 = OK;//working (Speed ~0x400) } if(( Fans_Speed_RPM[DRAWER_S1] < 3000 ) && ( F1_FAN2_TACH == 0)) // Small Fan in the drawer // need to work around 5000 RPM { - Fans_Status.DRAWER_SMALL1 = ERROR;// not working / Low Speed + Fans_Status.bit.DRAWER_SMALL1 = ERROR;// not working / Low Speed } else { - Fans_Status.DRAWER_SMALL1 = OK;//working (Speed ~0x400) + Fans_Status.bit.DRAWER_SMALL1 = OK;//working (Speed ~0x400) } if(( Fans_Speed_RPM[DRAWER_S2] < 3000 ) && ( F1_FAN3_TACH == 0)) // Small Fan in the drawer // need to work around 5000 RPM { - Fans_Status.DRAWER_SMALL2 = ERROR;// not working / Low Speed + Fans_Status.bit.DRAWER_SMALL2 = ERROR;// not working / Low Speed } else { - Fans_Status.DRAWER_SMALL2 = OK;//working (Speed ~0x400) + Fans_Status.bit.DRAWER_SMALL2 = OK;//working (Speed ~0x400) } if(( Fans_Speed_RPM[DRAWER_S3] < 3000 ) && ( F1_FAN4_TACH == 0)) // Small Fan in the drawer // need to work around 3050 RPM { - Fans_Status.DRAWER_SMALL3 = ERROR;// not working / Low Speed + Fans_Status.bit.DRAWER_SMALL3 = ERROR;// not working / Low Speed } else { - Fans_Status.DRAWER_SMALL3 = OK;//working (Speed ~0x400) < 1000 ) // need to work around 5000 RPM + Fans_Status.bit.DRAWER_SMALL3 = OK;//working (Speed ~0x400) < 1000 ) // need to work around 5000 RPM } } if( Fans_Speed_RPM[SYSTEM_0] < 1000 ) // need to work around 3050 RPM { - Fans_Status.SYSTEM_FAN0 = ERROR;// not working / Low Speed + Fans_Status.bit.SYSTEM_FAN0 = ERROR;// not working / Low Speed } else { - Fans_Status.SYSTEM_FAN0 = OK;//working (Speed ~0x400) + Fans_Status.bit.SYSTEM_FAN0 = OK;//working (Speed ~0x400) } if( Fans_Speed_RPM[SYSTEM_1] < 1000 ) // need to work around 3050 RPM { - Fans_Status.SYSTEM_FAN1 = ERROR;// not working / Low Speed + Fans_Status.bit.SYSTEM_FAN1 = ERROR;// not working / Low Speed } else { - Fans_Status.SYSTEM_FAN1 = OK;//working (Speed ~0x400) + Fans_Status.bit.SYSTEM_FAN1 = OK;//working (Speed ~0x400) } if( Fans_Speed_RPM[SYSTEM_2] < 1000 ) // need to work around 3050 RPM { - Fans_Status.SYSTEM_FAN2 = ERROR;// not working / Low Speed + Fans_Status.bit.SYSTEM_FAN2 = ERROR;// not working / Low Speed } else { - Fans_Status.SYSTEM_FAN2 = OK;//working (Speed ~0x400) + Fans_Status.bit.SYSTEM_FAN2 = OK;//working (Speed ~0x400) } #endif - return Fans_Status; + return Fans_Status.Uchar; } //------------------------- WHS ---------------------- diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.h b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.h index 93e0046b6..1c2bbfb1a 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.h +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.h @@ -6,7 +6,7 @@ int FPGA_Test_ReadBack(unsigned char FPGA_NUM, unsigned short Value, unsigned sh int FPGA_ReadVersion(unsigned char FPGA_NUM, unsigned char *Version, unsigned char *Year, unsigned char *Month, unsigned char *Day); void FPGA_Init(); //void FPGA_Read_limit_Switches(void); -uint32_t Read_Fans_Tacho(); +uint8_t Read_Fans_Tacho(); //uint32_t WHS_Read_Blower_Tach(); diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispensers_IO_Port/IO.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispensers_IO_Port/IO.c new file mode 100644 index 000000000..4eb388d39 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispensers_IO_Port/IO.c @@ -0,0 +1,10 @@ +/* + * IO.c + * + * Created on: Mar 11, 2019 + * Author: avi + */ + + + + diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispensers_IO_Port/IO.h b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispensers_IO_Port/IO.h new file mode 100644 index 000000000..5f79c7bcd --- /dev/null +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispensers_IO_Port/IO.h @@ -0,0 +1,21 @@ +/* + * IO.h + * + * Created on: Mar 11, 2019 + * Author: avi + * + */ + + + + +#ifndef DRIVERS_I2C_COMMUNICATION_DISPENSERS_IO_PORT_IO_H_ +#define DRIVERS_I2C_COMMUNICATION_DISPENSERS_IO_PORT_IO_H_ + + /*===============================================================================================================* + I2C ADDRESS + *===============================================================================================================*/ + + + +#endif /* DRIVERS_I2C_COMMUNICATION_DISPENSERS_IO_PORT_IO_H_ */ -- cgit v1.3.1 From d21cba9cb26a379b1a654672b079cf72081a7dde Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Mon, 11 Mar 2019 18:17:19 +0200 Subject: Add support for Dispenser I2C I/O ports --- .../Dispenser_Card/EEPROM/Dispenser_EEPROM.c | 181 +++++++++++++++++++++ .../Dispenser_Card/EEPROM/Dispenser_EEPROM.h | 20 +++ .../Dispenser_Card/IO_Ports/Dispenser_IO.c | 10 ++ .../Dispenser_Card/IO_Ports/Dispenser_IO.h | 21 +++ .../Dispensers_EEPROM_MUX/Disp_EEPROM_MUX.c | 181 --------------------- .../Dispensers_EEPROM_MUX/Disp_EEPROM_MUX.h | 20 --- .../I2C_Communication/Dispensers_IO_Port/IO.c | 10 -- .../I2C_Communication/Dispensers_IO_Port/IO.h | 21 --- 8 files changed, 232 insertions(+), 232 deletions(-) create mode 100644 Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.c create mode 100644 Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.h create mode 100644 Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c create mode 100644 Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h delete mode 100644 Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispensers_EEPROM_MUX/Disp_EEPROM_MUX.c delete mode 100644 Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispensers_EEPROM_MUX/Disp_EEPROM_MUX.h delete mode 100644 Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispensers_IO_Port/IO.c delete mode 100644 Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispensers_IO_Port/IO.h (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.c new file mode 100644 index 000000000..5954560ef --- /dev/null +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.c @@ -0,0 +1,181 @@ +/* + * Dispensers_EEPROM_MUX.c + * + * Created on: Nov 1, 2018 + * Author: avi + */ + +#include +#include +#include +#include +#include +#include +#include +#include "inc/hw_memmap.h" +#include "inc/hw_types.h" +#include "drivers/I2C_Communication/I2C.h" +#include "StateMachines/Printing/PrintingSTM.h" +#include "driverlib/i2c.h" + +#define I2C_ID_DISP_EEPROM_MUX 0x04 +#define TCA9548A_ADDRESS 0xE2 // switch address +#define I2C_Slave_EEprom_Add 0xA0 //eeprom address - 32kByte & 128kByte +#define I2C_Slave_EEprom_Add_2 0xA2 //eeprom address - only in the eeprom of 128kByte + + + +#define Max_buf_size sizeof(Dispenser_struct[0].Write_Disp_EEPROM.Buf) + +/* +• Disp. S/N [5 dec. digits) +• Disp. Version [ 3 dec. digits) +• Disp. Content [C/M/Y/K/D/other special ink] +• Disp. calibration data: nL/Pulse (w/wo correlation to piston location) – TBD -Still under investigation. +• Piston location (amount of ink in the disp). [ 3 dec. digits – 100uL resolution]- Optional Only- currently will be stored in the main board EEPROM ! +• Disp. life time (# of operations cycles) – shall be used for performance statistical analysis. [ 4 dec. digits] Optional Only- currently will be stored in the main board EEPROM ! + +*/ + +uint8_t Write_Buf[Max_buf_size +2]; + + +uint32_t Select_EEprom_Mux_Channel(uint8_t Dispenser_ID) +{ + uint32_t status= OK; + + assert(Dispenser_ID < MAX_DISPENSER_NUM); + + Write_Buf[0] = 0x01 << Dispenser_ID; + + status = I2C_Write(I2C_ID_DISP_EEPROM_MUX, TCA9548A_ADDRESS, Write_Buf, 1); + + return status; +} + +uint32_t I2C_EEprom_Write_Ch(uint8_t Dispenser_ID, uint8_t EEprom_Add) +{ + uint32_t status= OK; + + uint8_t i = 0; + + + status |= Select_EEprom_Mux_Channel(Dispenser_ID); + + Write_Buf[0] = 0x00; + Write_Buf[1] = 0x00; + + for(i=0;i -#include -#include -#include -#include -#include -#include -#include "inc/hw_memmap.h" -#include "inc/hw_types.h" -#include "drivers/I2C_Communication/I2C.h" -#include "StateMachines/Printing/PrintingSTM.h" -#include "driverlib/i2c.h" - -#define I2C_ID_DISP_EEPROM_MUX 0x04 -#define TCA9548A_ADDRESS 0xE2 // switch address -#define I2C_Slave_EEprom_Add 0xA0 //eeprom address - 32kByte & 128kByte -#define I2C_Slave_EEprom_Add_2 0xA2 //eeprom address - only in the eeprom of 128kByte - - - -#define Max_buf_size sizeof(Dispenser_struct[0].Write_Disp_EEPROM.Buf) - -/* -• Disp. S/N [5 dec. digits) -• Disp. Version [ 3 dec. digits) -• Disp. Content [C/M/Y/K/D/other special ink] -• Disp. calibration data: nL/Pulse (w/wo correlation to piston location) – TBD -Still under investigation. -• Piston location (amount of ink in the disp). [ 3 dec. digits – 100uL resolution]- Optional Only- currently will be stored in the main board EEPROM ! -• Disp. life time (# of operations cycles) – shall be used for performance statistical analysis. [ 4 dec. digits] Optional Only- currently will be stored in the main board EEPROM ! - -*/ - -uint8_t Write_Buf[Max_buf_size +2]; - - -uint32_t Select_EEprom_Mux_Channel(uint8_t Dispenser_ID) -{ - uint32_t status= OK; - - assert(Dispenser_ID < MAX_DISPENSER_NUM); - - Write_Buf[0] = 0x01 << Dispenser_ID; - - status = I2C_Write(I2C_ID_DISP_EEPROM_MUX, TCA9548A_ADDRESS, Write_Buf, 1); - - return status; -} - -uint32_t I2C_EEprom_Write_Ch(uint8_t Dispenser_ID, uint8_t EEprom_Add) -{ - uint32_t status= OK; - - uint8_t i = 0; - - - status |= Select_EEprom_Mux_Channel(Dispenser_ID); - - Write_Buf[0] = 0x00; - Write_Buf[1] = 0x00; - - for(i=0;i Date: Mon, 11 Mar 2019 18:18:02 +0200 Subject: continue I2c Dispenser I/O --- .../Dispenser_Card/EEPROM/Dispenser_EEPROM.c | 28 ++----- .../Dispenser_Card/EEPROM/Dispenser_EEPROM.h | 4 +- .../Dispenser_Card/I2C_Dispenser_Card_Mux.c | 37 +++++++++ .../Dispenser_Card/I2C_Dispenser_Card_Mux.h | 16 ++++ .../Dispenser_Card/IO_Ports/Dispenser_IO.c | 97 ++++++++++++++++++++++ .../Dispenser_Card/IO_Ports/Dispenser_IO.h | 63 +++++++++++++- 6 files changed, 221 insertions(+), 24 deletions(-) create mode 100644 Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/I2C_Dispenser_Card_Mux.c create mode 100644 Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/I2C_Dispenser_Card_Mux.h (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.c index 5954560ef..0e32f664f 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.c @@ -17,9 +17,10 @@ #include "drivers/I2C_Communication/I2C.h" #include "StateMachines/Printing/PrintingSTM.h" #include "driverlib/i2c.h" +#include "drivers/I2C_Communication/Dispenser_Card/I2C_Dispenser_Card_Mux.h" + + -#define I2C_ID_DISP_EEPROM_MUX 0x04 -#define TCA9548A_ADDRESS 0xE2 // switch address #define I2C_Slave_EEprom_Add 0xA0 //eeprom address - 32kByte & 128kByte #define I2C_Slave_EEprom_Add_2 0xA2 //eeprom address - only in the eeprom of 128kByte @@ -40,18 +41,7 @@ uint8_t Write_Buf[Max_buf_size +2]; -uint32_t Select_EEprom_Mux_Channel(uint8_t Dispenser_ID) -{ - uint32_t status= OK; - - assert(Dispenser_ID < MAX_DISPENSER_NUM); - Write_Buf[0] = 0x01 << Dispenser_ID; - - status = I2C_Write(I2C_ID_DISP_EEPROM_MUX, TCA9548A_ADDRESS, Write_Buf, 1); - - return status; -} uint32_t I2C_EEprom_Write_Ch(uint8_t Dispenser_ID, uint8_t EEprom_Add) { @@ -60,7 +50,7 @@ uint32_t I2C_EEprom_Write_Ch(uint8_t Dispenser_ID, uint8_t EEprom_Add) uint8_t i = 0; - status |= Select_EEprom_Mux_Channel(Dispenser_ID); + status |= Select_Dispenser_Mux_Channel(Dispenser_ID); Write_Buf[0] = 0x00; Write_Buf[1] = 0x00; @@ -70,7 +60,7 @@ uint32_t I2C_EEprom_Write_Ch(uint8_t Dispenser_ID, uint8_t EEprom_Add) Write_Buf[i+2] = Dispenser_struct[Dispenser_ID].Write_Disp_EEPROM.Buf[i]; } - status |= I2C_Write(I2C_ID_DISP_EEPROM_MUX, EEprom_Add, Write_Buf, Max_buf_size+2); + status |= I2C_Write(I2C_ID_DISP_MUX, EEprom_Add, Write_Buf, Max_buf_size+2); return status; } @@ -79,12 +69,12 @@ uint32_t I2C_EEprom_Set_for_Read_Ch(uint8_t Dispenser_ID, uint8_t EEprom_Add) { uint32_t status= OK; - status |= Select_EEprom_Mux_Channel(Dispenser_ID); + status |= Select_Dispenser_Mux_Channel(Dispenser_ID); Write_Buf[0] = 0x00; Write_Buf[1] = 0x00; - status |= I2C_Write(I2C_ID_DISP_EEPROM_MUX, EEprom_Add, Write_Buf, 2); + status |= I2C_Write(I2C_ID_DISP_MUX, EEprom_Add, Write_Buf, 2); return status; } @@ -93,9 +83,9 @@ uint32_t I2C_EEprom_Read_Ch(uint8_t Dispenser_ID, uint8_t EEprom_Add) { uint32_t status= OK; - status |= Select_EEprom_Mux_Channel(Dispenser_ID); + status |= Select_Dispenser_Mux_Channel(Dispenser_ID); - status |= I2C_Read(I2C_ID_DISP_EEPROM_MUX, EEprom_Add + 1, Dispenser_struct[Dispenser_ID].Read_Disp_EEPROM.Buf, Max_buf_size); + status |= I2C_Read(I2C_ID_DISP_MUX, EEprom_Add + 1, Dispenser_struct[Dispenser_ID].Read_Disp_EEPROM.Buf, Max_buf_size); return status; } diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.h b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.h index fff154cbd..76eee82af 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.h +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.h @@ -8,7 +8,9 @@ #ifndef DRIVERS_I2C_COMMUNICATION_DISPENSERS_EEPROM_MUX_DISP_EEPROM_MUX_H_ #define DRIVERS_I2C_COMMUNICATION_DISPENSERS_EEPROM_MUX_DISP_EEPROM_MUX_H_ -uint32_t Select_EEprom_Mux_Channel(uint8_t Channel_ID); + + + uint32_t I2C_EEprom_Write_Ch(uint8_t Dispenser_ID); uint32_t I2C_EEprom_Set_for_Read_Ch(uint8_t Dispenser_ID);; uint32_t I2C_EEprom_Read_Ch(uint8_t Dispenser_ID); diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/I2C_Dispenser_Card_Mux.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/I2C_Dispenser_Card_Mux.c new file mode 100644 index 000000000..0d1ea4615 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/I2C_Dispenser_Card_Mux.c @@ -0,0 +1,37 @@ +/* + * I2C_Dispenser_Card_Mux.c + * + * Created on: Mar 11, 2019 + * Author: avi + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "inc/hw_memmap.h" +#include "inc/hw_types.h" +#include "drivers/I2C_Communication/I2C.h" +#include "StateMachines/Printing/PrintingSTM.h" +#include "driverlib/i2c.h" + + +uint32_t Select_Dispenser_Mux_Channel(uint8_t Dispenser_ID) +{ + uint32_t status= OK; + + uint8_t Write_Buf[1]; + + assert(Dispenser_ID < MAX_DISPENSER_NUM); + + Write_Buf[0] = 0x01 << Dispenser_ID; + + status = I2C_Write(I2C_ID_DISP_MUX, TCA9548A_ADDRESS, Write_Buf, 1); + + return status; +} + diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/I2C_Dispenser_Card_Mux.h b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/I2C_Dispenser_Card_Mux.h new file mode 100644 index 000000000..c424ba6fa --- /dev/null +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/I2C_Dispenser_Card_Mux.h @@ -0,0 +1,16 @@ +/* + * I2C_Dispenser_Card.h + * + * Created on: Mar 11, 2019 + * Author: avi + */ + +#ifndef DRIVERS_I2C_COMMUNICATION_DISPENSER_CARD_I2C_DISPENSER_CARD_MUX_H_ +#define DRIVERS_I2C_COMMUNICATION_DISPENSER_CARD_I2C_DISPENSER_CARD_MUX_H_ + +#define I2C_ID_DISP_MUX 0x04 +#define TCA9548A_ADDRESS 0xE2 // switch address + +uint32_t Select_Dispenser_Mux_Channel(uint8_t Channel_ID); + +#endif /* DRIVERS_I2C_COMMUNICATION_DISPENSER_CARD_I2C_DISPENSER_CARD_MUX_H_ */ diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c index 4eb388d39..150fc46c3 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c @@ -5,6 +5,103 @@ * Author: avi */ +#include +#include +#include +#include +#include +#include +#include "include.h" +#include "drivers/I2C_Communication/I2C.h" +#include "drivers/I2C_Communication/Dispenser_Card/I2C_Dispenser_Card_Mux.h" +uint8_t TCA9534Init(uint8_t Dispenser_ID, TCA9534Regs* Regs)//2 +{ + uint8_t status = PASSED; + + uint8_t Write_Buf[2]; + + Regs->Config.Uchar = TCA9534_All_INPUT; + + status |= Select_Dispenser_Mux_Channel(Dispenser_ID); + + Write_Buf[0] = TCA9534_CONFIG_REG; + Write_Buf[1] = Regs->Config.Uchar; + + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + + return status; + +} + +uint8_t TCA9534TestRelay(uint8_t Dispenser_ID, TCA9534Regs* Regs)//2 +{ + uint8_t status = PASSED; + + uint8_t Write_Buf[2]; + + Regs->Config.bit.RELAY_TEST = TCA9534_OUTPUT; + + status |= Select_Dispenser_Mux_Channel(Dispenser_ID); + + Write_Buf[0] = TCA9534_CONFIG_REG; + Write_Buf[1] = Regs->Config.Uchar; + + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + + Regs->Config.bit.RELAY_TEST = TCA9534_INPUT; + + return status; + +} + +uint8_t TCA9534ByPass(uint8_t Dispenser_ID, TCA9534Regs* Regs)//2 +{ + uint8_t status = PASSED; + + uint8_t Write_Buf[2]; + + Regs->Config.bit.BYPASS = TCA9534_OUTPUT; + + status |= Select_Dispenser_Mux_Channel(Dispenser_ID); + + Write_Buf[0] = TCA9534_CONFIG_REG; + Write_Buf[1] = Regs->Config.Uchar; + + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + + Regs->Config.bit.BYPASS = TCA9534_INPUT; + + return status; + +} + +// **************************************************************************** +uint8_t TCA9534SetReadInputReg(uint8_t Dispenser_ID, TCA9534Regs* Regs) +{ + uint8_t status = PASSED; + + uint8_t Write_Buf[1]; + + status |= Select_Dispenser_Mux_Channel(Dispenser_ID); + + Write_Buf[0] = TCA9534_INPUT_REG; + + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 1); + + + return status; +} + +uint8_t TCA9534ReadInputReg(uint8_t Dispenser_ID, TCA9534Regs* Regs) +{ + uint8_t status = PASSED; + + status |= Select_Dispenser_Mux_Channel(Dispenser_ID); + + status |= I2C_Read(I2C_ID_DISP_MUX, TCA9534_ADDRESS + 1, Regs->Input.Uchar, 1); + + return status; +} diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h index 5f79c7bcd..b40c25c2f 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h @@ -3,7 +3,7 @@ * * Created on: Mar 11, 2019 * Author: avi - * + * Remote 8-Bit I2C Low-Power I/O Expander With Interrupt Output and Configuration Registers */ @@ -12,10 +12,65 @@ #ifndef DRIVERS_I2C_COMMUNICATION_DISPENSERS_IO_PORT_IO_H_ #define DRIVERS_I2C_COMMUNICATION_DISPENSERS_IO_PORT_IO_H_ - /*===============================================================================================================* - I2C ADDRESS - *===============================================================================================================*/ +/************************** I2C Address ***************************************/ +#define TCA9534_ADDRESS 0x40 // I2C Address 0100 + ADDR + R/W - ADDR tied to GND (permanent) + +/************************** I2C Registers *************************************/ +#define TCA9534_INPUT_REG 0x00 // Input status register +#define TCA9534_OUTPUT_REG 0x01 // Output register to change state of output BIT set to 1, output set HIGH +#define TCA9534_POLARITY_REG 0x02 // Polarity inversion register. BIT '1' inverts input polarity of register 0x00 +#define TCA9534_CONFIG_REG 0x03 // Configuration register. BIT = '1' sets port to input BIT = '0' sets port to output + +#define TCA9534_INPUT 0x01 +#define TCA9534_OUTPUT 0x00 +#define TCA9534_All_INPUT 0xFF + + + +typedef struct +{ + uint8_t RELAY_ON :1;//bit 0 + uint8_t RELAY_TEST :1;//bit 1 + uint8_t BYPASS :1;//bit 2 + uint8_t DISP_UP :1;//bit 3 + uint8_t DISP_DOWN :1;//bit 4 + uint8_t OVER_PRESS :1;//bit 5 + uint8_t P6 :1;//bit 6 + uint8_t P7 :1;//bit 7 +}TCA9534_Pins; + +typedef union +{ + TCA9534_Pins bit; + uint8_t Uchar; +}TCA9534_uConfig; + +typedef union +{ + TCA9534_Pins bit; + uint8_t Uchar; +}TCA9534_uInput; + +typedef union +{ + TCA9534_Pins bit; + uint8_t Uchar; +}TCA9534_uOutput; + +typedef union +{ + TCA9534_Pins bit; + uint8_t Uchar; +}TCA9534_uPolarityInversion; + +typedef struct { + TCA9534_uInput Input; + TCA9534_uOutput Output; + TCA9534_uPolarityInversion PolarityInversion; + TCA9534_uConfig Config; +} TCA9534Regs; + #endif /* DRIVERS_I2C_COMMUNICATION_DISPENSERS_IO_PORT_IO_H_ */ -- cgit v1.3.1 From 96c8bd8c897b2620dd97b5d852e46ade86b6a4ee Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Mon, 11 Mar 2019 18:32:01 +0200 Subject: Disp I2C I/O --- .../Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c | 3 ++- Software/Embedded_SW/Embedded/Main.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c index 150fc46c3..e217aed67 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c @@ -5,7 +5,7 @@ * Author: avi */ -#include + #include #include #include @@ -14,6 +14,7 @@ #include "include.h" #include "drivers/I2C_Communication/I2C.h" #include "drivers/I2C_Communication/Dispenser_Card/I2C_Dispenser_Card_Mux.h" +#include uint8_t TCA9534Init(uint8_t Dispenser_ID, TCA9534Regs* Regs)//2 { diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c index f14ef8ff1..64f4380a8 100644 --- a/Software/Embedded_SW/Embedded/Main.c +++ b/Software/Embedded_SW/Embedded/Main.c @@ -58,7 +58,7 @@ #include "Drivers/I2C_Communication/I2C.h" -#include "Drivers/I2C_Communication/Dispensers_EEPROM_MUX/Disp_EEPROM_MUX.h" +//#include "Drivers/I2C_Communication/Dispensers_EEPROM_MUX/Disp_EEPROM_MUX.h" #include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" -- cgit v1.3.1 From 4ec50941fad8d22a0da82bce9f2b0d02dcd9f538 Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Tue, 12 Mar 2019 13:55:28 +0200 Subject: update dispenser I/O --- .../Dispenser_Card/IO_Ports/Dispenser_IO.c | 197 +++++++++++++++++---- .../Dispenser_Card/IO_Ports/Dispenser_IO.h | 46 ++--- Software/Embedded_SW/Embedded/Include.h | 1 + 3 files changed, 181 insertions(+), 63 deletions(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c index e217aed67..6aeb844d9 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c @@ -5,29 +5,28 @@ * Author: avi */ - #include -#include -#include #include -#include -#include "include.h" -#include "drivers/I2C_Communication/I2C.h" -#include "drivers/I2C_Communication/Dispenser_Card/I2C_Dispenser_Card_Mux.h" +#include +#include +#include #include +#include + -uint8_t TCA9534Init(uint8_t Dispenser_ID, TCA9534Regs* Regs)//2 +uint8_t TCA9534Init(uint8_t Dispenser_ID, TCA9534Regs* Regs)//1 { uint8_t status = PASSED; uint8_t Write_Buf[2]; - Regs->Config.Uchar = TCA9534_All_INPUT; - status |= Select_Dispenser_Mux_Channel(Dispenser_ID); + //Set all GPIO to Input + Regs->Config[Dispenser_ID].Uchar = TCA9534_All_INPUT; + Write_Buf[0] = TCA9534_CONFIG_REG; - Write_Buf[1] = Regs->Config.Uchar; + Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); @@ -35,74 +34,206 @@ uint8_t TCA9534Init(uint8_t Dispenser_ID, TCA9534Regs* Regs)//2 } -uint8_t TCA9534TestRelay(uint8_t Dispenser_ID, TCA9534Regs* Regs)//2 +// **************************************************************************** +uint8_t TCA9534SetReadInputReg(uint8_t Dispenser_ID)//2 set before read { uint8_t status = PASSED; - uint8_t Write_Buf[2]; - - Regs->Config.bit.RELAY_TEST = TCA9534_OUTPUT; + uint8_t Write_Buf[1]; status |= Select_Dispenser_Mux_Channel(Dispenser_ID); - Write_Buf[0] = TCA9534_CONFIG_REG; - Write_Buf[1] = Regs->Config.Uchar; + Write_Buf[0] = TCA9534_INPUT_REG; - status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 1); - Regs->Config.bit.RELAY_TEST = TCA9534_INPUT; return status; +} + +uint8_t TCA9534ReadInputReg(uint8_t Dispenser_ID, TCA9534Regs* Regs)//3 read +{ + uint8_t status = PASSED; + + status |= Select_Dispenser_Mux_Channel(Dispenser_ID); + status |= I2C_Read(I2C_ID_DISP_MUX, TCA9534_ADDRESS + 1, Regs->Input[Dispenser_ID].Uchar, 1); + + return status; } -uint8_t TCA9534ByPass(uint8_t Dispenser_ID, TCA9534Regs* Regs)//2 + +//----------------------------------------------------------------------------------------------------- +uint8_t TCA9534TestRelay(uint8_t Dispenser_ID, TCA9534Regs* Regs)//Set the test and check the relay_on { uint8_t status = PASSED; uint8_t Write_Buf[2]; - Regs->Config.bit.BYPASS = TCA9534_OUTPUT; - + //set Mux to the current dispenser Channel status |= Select_Dispenser_Mux_Channel(Dispenser_ID); + //Read the Realay_on pin + TCA9534SetReadInputReg(Dispenser_ID); + TCA9534ReadInputReg(Dispenser_ID, Regs); + if(Regs->Config[Dispenser_ID].bit.RELAY_ON != HIGH) + { + status |= FAILED; + } + + //Set RELAY_TEST to output: + Regs->Config[Dispenser_ID].bit.RELAY_TEST = TCA9534_OUTPUT; + Write_Buf[0] = TCA9534_CONFIG_REG; + Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + + + //Set the test pin to LOW + Regs->Output[Dispenser_ID].bit.RELAY_TEST = LOW; + Write_Buf[0] = TCA9534_OUTPUT_REG; + Write_Buf[1] = Regs->Output[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + + //deley + delayms(5); + + //Read the Realay_on pin + TCA9534SetReadInputReg(Dispenser_ID); + TCA9534ReadInputReg(Dispenser_ID, Regs); + if(Regs->Config[Dispenser_ID].bit.RELAY_ON != LOW) + { + status |= FAILED; + } + + //---------------------- test ByPass ---------------------- + //Set BYPASS to output: + Regs->Config[Dispenser_ID].bit.BYPASS = TCA9534_OUTPUT; + Write_Buf[0] = TCA9534_CONFIG_REG; + Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + + //Set the BYPASS pin to LOW + Regs->Output[Dispenser_ID].bit.BYPASS = LOW; + Write_Buf[0] = TCA9534_OUTPUT_REG; + Write_Buf[1] = Regs->Output[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + + //Read the Realay_on pin + TCA9534SetReadInputReg(Dispenser_ID); + TCA9534ReadInputReg(Dispenser_ID, Regs); + if(Regs->Config[Dispenser_ID].bit.RELAY_ON != HIGH) + { + status |= FAILED; + } + + //Set BYPASS to input: + Regs->Config[Dispenser_ID].bit.BYPASS = TCA9534_INPUT; Write_Buf[0] = TCA9534_CONFIG_REG; - Write_Buf[1] = Regs->Config.Uchar; + Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + + //Read the Realay_on pin + TCA9534SetReadInputReg(Dispenser_ID); + TCA9534ReadInputReg(Dispenser_ID, Regs); + if(Regs->Config[Dispenser_ID].bit.RELAY_ON != LOW) + { + status |= FAILED; + } + //--------------------------------------------------------- + + //Set RELAY_TEST to input: + Regs->Config[Dispenser_ID].bit.RELAY_TEST = TCA9534_INPUT; + Write_Buf[0] = TCA9534_CONFIG_REG; + Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); - Regs->Config.bit.BYPASS = TCA9534_INPUT; + //Read the Realay_on pin + TCA9534SetReadInputReg(Dispenser_ID); + TCA9534ReadInputReg(Dispenser_ID, Regs); + if(Regs->Config[Dispenser_ID].bit.RELAY_ON != HIGH) + { + status |= FAILED; + } return status; } -// **************************************************************************** -uint8_t TCA9534SetReadInputReg(uint8_t Dispenser_ID, TCA9534Regs* Regs) +uint8_t TCA9534ByPass(uint8_t Dispenser_ID, TCA9534Regs* Regs)//2 { uint8_t status = PASSED; - uint8_t Write_Buf[1]; + uint8_t Write_Buf[2]; + //set Mux to the current dispenser Channel status |= Select_Dispenser_Mux_Channel(Dispenser_ID); - Write_Buf[0] = TCA9534_INPUT_REG; + //Set BYPASS to output: + Regs->Config[Dispenser_ID].bit.BYPASS = TCA9534_OUTPUT; + Write_Buf[0] = TCA9534_CONFIG_REG; + Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); - status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 1); + //Set the BYPASS pin to LOW + Regs->Output[Dispenser_ID].bit.BYPASS = LOW; + Write_Buf[0] = TCA9534_OUTPUT_REG; + Write_Buf[1] = Regs->Output[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + //Set BYPASS to input: + Regs->Config[Dispenser_ID].bit.BYPASS = TCA9534_INPUT; + Write_Buf[0] = TCA9534_CONFIG_REG; + Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); return status; + } -uint8_t TCA9534ReadInputReg(uint8_t Dispenser_ID, TCA9534Regs* Regs) +bool Read_Notification_Disp_UP(uint8_t Dispenser_ID, TCA9534Regs* Regs) { - uint8_t status = PASSED; + return Regs->Input[Dispenser_ID].bit.DISP_UP; +} - status |= Select_Dispenser_Mux_Channel(Dispenser_ID); +bool Read_Notification_Disp_Down(uint8_t Dispenser_ID, TCA9534Regs* Regs) +{ + return Regs->Input[Dispenser_ID].bit.DISP_DOWN; +} - status |= I2C_Read(I2C_ID_DISP_MUX, TCA9534_ADDRESS + 1, Regs->Input.Uchar, 1); +bool Read_Notification_Realy_On(uint8_t Dispenser_ID, TCA9534Regs* Regs) +{ + return Regs->Input[Dispenser_ID].bit.RELAY_ON; +} + +bool Read_Notification_Over_Press(uint8_t Dispenser_ID, TCA9534Regs* Regs) +{ + return Regs->Input[Dispenser_ID].bit.OVER_PRESS; +} + +uint8_t test_IO() +{ + uint8_t status = PASSED; + + TCA9534Regs* Regs; + uint8_t i; + + for(i=0;i<8;i++) + { + status |= TCA9534Init(i, Regs); + status |= TCA9534SetReadInputReg(i); + status |= TCA9534ReadInputReg(i, Regs); + status |= TCA9534TestRelay(i, Regs); + status |= TCA9534ByPass(i, Regs); + Read_Notification_Disp_UP(i, Regs); + Read_Notification_Disp_Down(i, Regs); + Read_Notification_Realy_On(i, Regs); + Read_Notification_Over_Press(i, Regs); + } return status; } + + diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h index b40c25c2f..e0e511d5b 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h @@ -6,15 +6,10 @@ * Remote 8-Bit I2C Low-Power I/O Expander With Interrupt Output and Configuration Registers */ - - - #ifndef DRIVERS_I2C_COMMUNICATION_DISPENSERS_IO_PORT_IO_H_ #define DRIVERS_I2C_COMMUNICATION_DISPENSERS_IO_PORT_IO_H_ - - /************************** I2C Address ***************************************/ #define TCA9534_ADDRESS 0x40 // I2C Address 0100 + ADDR + R/W - ADDR tied to GND (permanent) @@ -28,8 +23,6 @@ #define TCA9534_OUTPUT 0x00 #define TCA9534_All_INPUT 0xFF - - typedef struct { uint8_t RELAY_ON :1;//bit 0 @@ -46,31 +39,24 @@ typedef union { TCA9534_Pins bit; uint8_t Uchar; -}TCA9534_uConfig; - -typedef union -{ - TCA9534_Pins bit; - uint8_t Uchar; -}TCA9534_uInput; - -typedef union -{ - TCA9534_Pins bit; - uint8_t Uchar; -}TCA9534_uOutput; - -typedef union -{ - TCA9534_Pins bit; - uint8_t Uchar; -}TCA9534_uPolarityInversion; +}TCA9534_union; typedef struct { - TCA9534_uInput Input; - TCA9534_uOutput Output; - TCA9534_uPolarityInversion PolarityInversion; - TCA9534_uConfig Config; + TCA9534_union Input[8]; + TCA9534_union Output[8]; + TCA9534_union PolarityInversion[8]; + TCA9534_union Config[8]; } TCA9534Regs; +uint8_t TCA9534Init(uint8_t Dispenser_ID, TCA9534Regs* Regs); +uint8_t TCA9534SetReadInputReg(uint8_t Dispenser_ID); +uint8_t TCA9534ReadInputReg(uint8_t Dispenser_ID, TCA9534Regs* Regs); +uint8_t TCA9534TestRelay(uint8_t Dispenser_ID, TCA9534Regs* Regs); +uint8_t TCA9534ByPass(uint8_t Dispenser_ID, TCA9534Regs* Regs); +bool Read_Notification_Disp_UP(uint8_t Dispenser_ID, TCA9534Regs* Regs); +bool Read_Notification_Disp_Down(uint8_t Dispenser_ID, TCA9534Regs* Regs); +bool Read_Notification_Realy_On(uint8_t Dispenser_ID, TCA9534Regs* Regs); +bool Read_Notification_Over_Press(uint8_t Dispenser_ID, TCA9534Regs* Regs); +uint8_t test_IO(); + #endif /* DRIVERS_I2C_COMMUNICATION_DISPENSERS_IO_PORT_IO_H_ */ diff --git a/Software/Embedded_SW/Embedded/Include.h b/Software/Embedded_SW/Embedded/Include.h index 6fe485b1e..bc0bb6bce 100644 --- a/Software/Embedded_SW/Embedded/Include.h +++ b/Software/Embedded_SW/Embedded/Include.h @@ -51,6 +51,7 @@ #include "Common/Utilities/Utils.h" #include "Common/report/report.h" #include "DataDef.h" +#include "delay.h" #define SYS_CLK_FREQ 120000000 -- cgit v1.3.1 From 0121b4d5a51a75b51cfb02dbc654af88cb7595b0 Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Tue, 12 Mar 2019 14:07:44 +0200 Subject: Add deley for every relay change in dispenser I/O --- .../I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c index 6aeb844d9..3721df198 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c @@ -118,6 +118,9 @@ uint8_t TCA9534TestRelay(uint8_t Dispenser_ID, TCA9534Regs* Regs)//Set the test Write_Buf[1] = Regs->Output[Dispenser_ID].Uchar; status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + //deley + delayms(5); + //Read the Realay_on pin TCA9534SetReadInputReg(Dispenser_ID); TCA9534ReadInputReg(Dispenser_ID, Regs); @@ -132,6 +135,9 @@ uint8_t TCA9534TestRelay(uint8_t Dispenser_ID, TCA9534Regs* Regs)//Set the test Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + //deley + delayms(5); + //Read the Realay_on pin TCA9534SetReadInputReg(Dispenser_ID); TCA9534ReadInputReg(Dispenser_ID, Regs); @@ -148,6 +154,9 @@ uint8_t TCA9534TestRelay(uint8_t Dispenser_ID, TCA9534Regs* Regs)//Set the test Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + //deley + delayms(5); + //Read the Realay_on pin TCA9534SetReadInputReg(Dispenser_ID); TCA9534ReadInputReg(Dispenser_ID, Regs); -- cgit v1.3.1 From f3a8ebb62df36dba6ade024a99de37e1120e4259 Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Wed, 13 Mar 2019 10:19:59 +0200 Subject: cahnge the LS_TYPE to LS_POLARITY to support the new dispenser card (Inversion LS polaity in old cards) --- Software/Embedded_SW/Embedded/DataDef.h | 12 ++-- .../Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h | 2 +- .../Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c | 68 +++++++++++----------- .../Dispenser_Card/EEPROM/Dispenser_EEPROM.c | 6 +- 4 files changed, 44 insertions(+), 44 deletions(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/DataDef.h b/Software/Embedded_SW/Embedded/DataDef.h index 0027a2aa1..3b62a0489 100644 --- a/Software/Embedded_SW/Embedded/DataDef.h +++ b/Software/Embedded_SW/Embedded/DataDef.h @@ -294,8 +294,8 @@ typedef union #define LIMIT 0 // Limit Switch #define NO_LIMIT 1 -#define MAGNETIC_LS_LIMIT 1 // Limit Switch -#define MAGNETIC_LS_NO_LIMIT 0 +//#define INVERSION_POLARITY_LIMIT 1 // Limit Switch +//#define INVERSION_POLARITY_NO_LIMIT 0 typedef enum @@ -309,9 +309,9 @@ typedef enum typedef enum { - OPTIC_LS = 0, - MAGNETIC_LS = 1, -}LS_TYPE; + DEFAULT_POLARITY = 0,//OPTIC_LS , MAGNETIC_LS CARD 2 + INVERSION_POLARITY = 1,//MAGNETIC_LS CARD 2 - must be 1 used for xor the polarity +}LS_POLARITY; typedef enum { @@ -339,7 +339,7 @@ typedef union typedef struct { DISP_TYPE Type; - LS_TYPE LS_Type; + LS_POLARITY LS_Polarity; DISP_EEPROM Write_Disp_EEPROM; DISP_EEPROM Read_Disp_EEPROM; LS_STATUS Status; diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h index 5bc0d5071..752773c0d 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h @@ -291,7 +291,7 @@ #define F1_Prescaler1_reg3 (*((volatile short *)(FPGA1_BASE | 0x3E4))) //Parameter for prescaler divisions - 3bit spi moto low duty cycle value for pmw #define F1_Prescaler1_reg4 (*((volatile short *)(FPGA1_BASE | 0x3E6))) //Parameter for prescaler divisions - 3bit spi moto high duty cycle value for pmw #define F1_Prescaler1_reg5 (*((volatile short *)(FPGA1_BASE | 0x3E8))) //Parameter for prescaler divisions - Parameter for prescaler divisions -amount of prescaled clocks for counter of signal All Tachos. ####8_Bit##### -#define F1_Prescaler1_reg6 (*((volatile short *)(FPGA1_BASE | 0x3EA))) //Parameter for prescaler divisions +#define F1_Prescaler1_reg6 (*((volatile short *)(FPGA1_BASE | 0x3EA))) //pre scaler for tacho A_To_A #define F1_Prescaler1_reg7 (*((volatile short *)(FPGA1_BASE | 0x3EC))) //Parameter for prescaler divisions #define F1_Prescaler1_reg8 (*((volatile short *)(FPGA1_BASE | 0x3EE))) //Parameter for prescaler divisions diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c index 06d35772e..05ad6bf74 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c @@ -137,10 +137,10 @@ void FPGA_Read_LS_Safty_Ind_Reg() for(i=0;i<8;i++) { - if((temp[i] < 3) && ( Dispenser_struct[i].LS_Type == OPTIC_LS)) + if((temp[i] < 3) && ( Dispenser_struct[i].LS_Polarity == DEFAULT_POLARITY)) Dispenser_struct[i].Status = LS_STATUS_ERROR; else - if((temp[i] > 1) && ( Dispenser_struct[i].LS_Type == MAGNETIC_LS)) + if((temp[i] > 1) && ( Dispenser_struct[i].LS_Polarity == INVERSION_POLARITY)) Dispenser_struct[i].Status = LS_STATUS_ERROR; else Dispenser_struct[i].Status = LS_STATUS_OK; @@ -252,139 +252,139 @@ bool FPGA_Read_limit_Switches(FPGA_GPI_ENUM Limit_Switch) break; /**/ case GPI_LS_DISPENSER_50_1: - LM_Status = LS_Dispenser_1_2.bits.F2_LS_DISPENSER_50_1 ^ Dispenser_struct[0].LS_Type; + LM_Status = LS_Dispenser_1_2.bits.F2_LS_DISPENSER_50_1 ^ Dispenser_struct[0].LS_Polarity; //LS_Dispenser_1_2.bits.F2_LS_DISPENSER_50_1 = NO_LIMIT; break; case GPI_LS_DISPENSER_DOWN_1: - LM_Status = LS_Dispenser_1_2.bits.F2_LS_DISPENSER_DOWN_1 ^ Dispenser_struct[0].LS_Type; + LM_Status = LS_Dispenser_1_2.bits.F2_LS_DISPENSER_DOWN_1 ^ Dispenser_struct[0].LS_Polarity; //LS_Dispenser_1_2.bits.F2_LS_DISPENSER_DOWN_1 = NO_LIMIT; break; case GPI_LS_DISPENSER_25_1: //LM_Status = LS_Dispenser_1_2.bits.F2_LS_DISPENSER_25_1 ^ Dispenser_struct[0].LS_Type; - LM_Status = ((~Dispenser_struct[0].LS_Type) & LS_Dispenser_1_2.bits.F2_LS_DISPENSER_25_1) | ((Dispenser_struct[0].LS_Type) & (~LS_Dispenser_1_2.bits.F2_LS_DISPENSER_75_1));//new dispenser use 75 old use 25 + LM_Status = ((~Dispenser_struct[0].LS_Polarity) & LS_Dispenser_1_2.bits.F2_LS_DISPENSER_25_1) | ((Dispenser_struct[0].LS_Polarity) & (~LS_Dispenser_1_2.bits.F2_LS_DISPENSER_75_1));//new dispenser use 75 old use 25 //LS_Dispenser_1_2.bits.F2_LS_DISPENSER_25_1 = NO_LIMIT; break; case GPI_LS_DISPENSER_UP_1: - LM_Status = LS_Dispenser_1_2.bits.F2_LS_DISPENSER_UP_1 ^ Dispenser_struct[0].LS_Type; + LM_Status = LS_Dispenser_1_2.bits.F2_LS_DISPENSER_UP_1 ^ Dispenser_struct[0].LS_Polarity; //LS_Dispenser_1_2.bits.F2_LS_DISPENSER_UP_1 = NO_LIMIT; break; case GPI_LS_DISPENSER_50_2: - LM_Status = LS_Dispenser_1_2.bits.F2_LS_DISPENSER_50_2 ^ Dispenser_struct[1].LS_Type; + LM_Status = LS_Dispenser_1_2.bits.F2_LS_DISPENSER_50_2 ^ Dispenser_struct[1].LS_Polarity; //LS_Dispenser_1_2.bits.F2_LS_DISPENSER_50_2 = NO_LIMIT; break; case GPI_LS_DISPENSER_DOWN_2: - LM_Status = LS_Dispenser_1_2.bits.F2_LS_DISPENSER_DOWN_2 ^ Dispenser_struct[1].LS_Type; + LM_Status = LS_Dispenser_1_2.bits.F2_LS_DISPENSER_DOWN_2 ^ Dispenser_struct[1].LS_Polarity; //LS_Dispenser_1_2.bits.F2_LS_DISPENSER_DOWN_2 = NO_LIMIT; break; case GPI_LS_DISPENSER_25_2: //LM_Status = LS_Dispenser_1_2.bits.F2_LS_DISPENSER_25_2 ^ Dispenser_struct[1].LS_Type; - LM_Status = ((~Dispenser_struct[1].LS_Type) & LS_Dispenser_1_2.bits.F2_LS_DISPENSER_25_2) | ((Dispenser_struct[1].LS_Type) & (~LS_Dispenser_1_2.bits.F2_LS_DISPENSER_75_2));//new dispenser use 75 old use 25 + LM_Status = ((~Dispenser_struct[1].LS_Polarity) & LS_Dispenser_1_2.bits.F2_LS_DISPENSER_25_2) | ((Dispenser_struct[1].LS_Polarity) & (~LS_Dispenser_1_2.bits.F2_LS_DISPENSER_75_2));//new dispenser use 75 old use 25 //LS_Dispenser_1_2.bits.F2_LS_DISPENSER_25_2 = NO_LIMIT; break; case GPI_LS_DISPENSER_UP_2: - LM_Status = LS_Dispenser_1_2.bits.F2_LS_DISPENSER_UP_2 ^ Dispenser_struct[1].LS_Type; + LM_Status = LS_Dispenser_1_2.bits.F2_LS_DISPENSER_UP_2 ^ Dispenser_struct[1].LS_Polarity; //LS_Dispenser_1_2.bits.F2_LS_DISPENSER_UP_2 = NO_LIMIT; break; case GPI_LS_DISPENSER_50_3: - LM_Status = LS_Dispenser_3_4.bits.F2_LS_DISPENSER_50_3 ^ Dispenser_struct[2].LS_Type; + LM_Status = LS_Dispenser_3_4.bits.F2_LS_DISPENSER_50_3 ^ Dispenser_struct[2].LS_Polarity; //LS_Dispenser_3_4.bits.F2_LS_DISPENSER_50_3 = NO_LIMIT; break; case GPI_LS_DISPENSER_DOWN_3: - LM_Status = LS_Dispenser_3_4.bits.F2_LS_DISPENSER_DOWN_3 ^ Dispenser_struct[2].LS_Type; + LM_Status = LS_Dispenser_3_4.bits.F2_LS_DISPENSER_DOWN_3 ^ Dispenser_struct[2].LS_Polarity; //LS_Dispenser_3_4.bits.F2_LS_DISPENSER_DOWN_3 = NO_LIMIT; break; case GPI_LS_DISPENSER_25_3: //LM_Status = LS_Dispenser_3_4.bits.F2_LS_DISPENSER_25_3 ^ Dispenser_struct[2].LS_Type; - LM_Status = ((~Dispenser_struct[2].LS_Type) & LS_Dispenser_3_4.bits.F2_LS_DISPENSER_25_3) | ((Dispenser_struct[2].LS_Type) & (~LS_Dispenser_3_4.bits.F2_LS_DISPENSER_75_3));//new dispenser use 75 old use 25 + LM_Status = ((~Dispenser_struct[2].LS_Polarity) & LS_Dispenser_3_4.bits.F2_LS_DISPENSER_25_3) | ((Dispenser_struct[2].LS_Polarity) & (~LS_Dispenser_3_4.bits.F2_LS_DISPENSER_75_3));//new dispenser use 75 old use 25 //LS_Dispenser_3_4.bits.F2_LS_DISPENSER_25_3 = NO_LIMIT; break; case GPI_LS_DISPENSER_UP_3: - LM_Status = LS_Dispenser_3_4.bits.F2_LS_DISPENSER_UP_3 ^ Dispenser_struct[2].LS_Type; + LM_Status = LS_Dispenser_3_4.bits.F2_LS_DISPENSER_UP_3 ^ Dispenser_struct[2].LS_Polarity; //LS_Dispenser_3_4.bits.F2_LS_DISPENSER_UP_3 = NO_LIMIT; break; case GPI_LS_DISPENSER_50_4: - LM_Status = LS_Dispenser_3_4.bits.F2_LS_DISPENSER_50_4 ^ Dispenser_struct[3].LS_Type; + LM_Status = LS_Dispenser_3_4.bits.F2_LS_DISPENSER_50_4 ^ Dispenser_struct[3].LS_Polarity; //LS_Dispenser_3_4.bits.F2_LS_DISPENSER_50_4 = NO_LIMIT; break; case GPI_LS_DISPENSER_DOWN_4: - LM_Status = LS_Dispenser_3_4.bits.F2_LS_DISPENSER_DOWN_4 ^ Dispenser_struct[3].LS_Type; + LM_Status = LS_Dispenser_3_4.bits.F2_LS_DISPENSER_DOWN_4 ^ Dispenser_struct[3].LS_Polarity; //LS_Dispenser_3_4.bits.F2_LS_DISPENSER_DOWN_4 = NO_LIMIT; break; case GPI_LS_DISPENSER_25_4: //LM_Status = LS_Dispenser_3_4.bits.F2_LS_DISPENSER_25_4 ^ Dispenser_struct[3].LS_Type; - LM_Status = ((~Dispenser_struct[3].LS_Type) & LS_Dispenser_3_4.bits.F2_LS_DISPENSER_25_4) | ((Dispenser_struct[3].LS_Type) & (~LS_Dispenser_3_4.bits.F2_LS_DISPENSER_75_4));//new dispenser use 75 old use 25 + LM_Status = ((~Dispenser_struct[3].LS_Polarity) & LS_Dispenser_3_4.bits.F2_LS_DISPENSER_25_4) | ((Dispenser_struct[3].LS_Polarity) & (~LS_Dispenser_3_4.bits.F2_LS_DISPENSER_75_4));//new dispenser use 75 old use 25 //LS_Dispenser_3_4.bits.F2_LS_DISPENSER_25_4 = NO_LIMIT; break; case GPI_LS_DISPENSER_UP_4: - LM_Status = LS_Dispenser_3_4.bits.F2_LS_DISPENSER_UP_4 ^ Dispenser_struct[3].LS_Type; + LM_Status = LS_Dispenser_3_4.bits.F2_LS_DISPENSER_UP_4 ^ Dispenser_struct[3].LS_Polarity; //LS_Dispenser_3_4.bits.F2_LS_DISPENSER_UP_4 = NO_LIMIT; break; case GPI_LS_DISPENSER_50_5: - LM_Status = LS_Dispenser_5_6.bits.F2_LS_DISPENSER_50_5 ^ Dispenser_struct[4].LS_Type; + LM_Status = LS_Dispenser_5_6.bits.F2_LS_DISPENSER_50_5 ^ Dispenser_struct[4].LS_Polarity; //LS_Dispenser_5_6.bits.F2_LS_DISPENSER_50_5 = NO_LIMIT; break; case GPI_LS_DISPENSER_DOWN_5: - LM_Status = LS_Dispenser_5_6.bits.F2_LS_DISPENSER_DOWN_5 ^ Dispenser_struct[4].LS_Type; + LM_Status = LS_Dispenser_5_6.bits.F2_LS_DISPENSER_DOWN_5 ^ Dispenser_struct[4].LS_Polarity; //LS_Dispenser_5_6.bits.F2_LS_DISPENSER_DOWN_5 = NO_LIMIT; break; case GPI_LS_DISPENSER_25_5: //LM_Status = LS_Dispenser_5_6.bits.F2_LS_DISPENSER_25_5 ^ Dispenser_struct[4].LS_Type; - LM_Status = ((~Dispenser_struct[4].LS_Type) & LS_Dispenser_5_6.bits.F2_LS_DISPENSER_25_5) | ((Dispenser_struct[4].LS_Type) & (~LS_Dispenser_5_6.bits.F2_LS_DISPENSER_75_5));//new dispenser use 75 old use 25 + LM_Status = ((~Dispenser_struct[4].LS_Polarity) & LS_Dispenser_5_6.bits.F2_LS_DISPENSER_25_5) | ((Dispenser_struct[4].LS_Polarity) & (~LS_Dispenser_5_6.bits.F2_LS_DISPENSER_75_5));//new dispenser use 75 old use 25 //LS_Dispenser_5_6.bits.F2_LS_DISPENSER_25_5 = NO_LIMIT; break; case GPI_LS_DISPENSER_UP_5: - LM_Status = LS_Dispenser_5_6.bits.F2_LS_DISPENSER_UP_5 ^ Dispenser_struct[4].LS_Type; + LM_Status = LS_Dispenser_5_6.bits.F2_LS_DISPENSER_UP_5 ^ Dispenser_struct[4].LS_Polarity; //LS_Dispenser_5_6.bits.F2_LS_DISPENSER_UP_5 = NO_LIMIT; break; case GPI_LS_DISPENSER_50_6: - LM_Status = LS_Dispenser_5_6.bits.F2_LS_DISPENSER_50_6 ^ Dispenser_struct[5].LS_Type; + LM_Status = LS_Dispenser_5_6.bits.F2_LS_DISPENSER_50_6 ^ Dispenser_struct[5].LS_Polarity; //LS_Dispenser_5_6.bits.F2_LS_DISPENSER_50_6 = NO_LIMIT; break; case GPI_LS_DISPENSER_DOWN_6: - LM_Status = LS_Dispenser_5_6.bits.F2_LS_DISPENSER_DOWN_6 ^ Dispenser_struct[5].LS_Type; + LM_Status = LS_Dispenser_5_6.bits.F2_LS_DISPENSER_DOWN_6 ^ Dispenser_struct[5].LS_Polarity; //LS_Dispenser_5_6.bits.F2_LS_DISPENSER_DOWN_6 = NO_LIMIT; break; case GPI_LS_DISPENSER_25_6: //LM_Status = LS_Dispenser_5_6.bits.F2_LS_DISPENSER_25_6 ^ Dispenser_struct[5].LS_Type; - LM_Status = ((~Dispenser_struct[5].LS_Type) & LS_Dispenser_5_6.bits.F2_LS_DISPENSER_25_6) | ((Dispenser_struct[5].LS_Type) & (~LS_Dispenser_5_6.bits.F2_LS_DISPENSER_75_6));//new dispenser use 75 old use 25 + LM_Status = ((~Dispenser_struct[5].LS_Polarity) & LS_Dispenser_5_6.bits.F2_LS_DISPENSER_25_6) | ((Dispenser_struct[5].LS_Polarity) & (~LS_Dispenser_5_6.bits.F2_LS_DISPENSER_75_6));//new dispenser use 75 old use 25 //LS_Dispenser_5_6.bits.F2_LS_DISPENSER_25_6 = NO_LIMIT; break; case GPI_LS_DISPENSER_UP_6: - LM_Status = LS_Dispenser_5_6.bits.F2_LS_DISPENSER_UP_6 ^ Dispenser_struct[5].LS_Type; + LM_Status = LS_Dispenser_5_6.bits.F2_LS_DISPENSER_UP_6 ^ Dispenser_struct[5].LS_Polarity; //LS_Dispenser_5_6.bits.F2_LS_DISPENSER_UP_6 = NO_LIMIT; break; case GPI_LS_DISPENSER_50_7: - LM_Status = LS_Dispenser_7_8.bits.F2_LS_DISPENSER_50_7 ^ Dispenser_struct[6].LS_Type; + LM_Status = LS_Dispenser_7_8.bits.F2_LS_DISPENSER_50_7 ^ Dispenser_struct[6].LS_Polarity; //LS_Dispenser_7_8.bits.F2_LS_DISPENSER_50_7 = NO_LIMIT; break; case GPI_LS_DISPENSER_DOWN_7: - LM_Status = LS_Dispenser_7_8.bits.F2_LS_DISPENSER_DOWN_7 ^ Dispenser_struct[6].LS_Type; + LM_Status = LS_Dispenser_7_8.bits.F2_LS_DISPENSER_DOWN_7 ^ Dispenser_struct[6].LS_Polarity; //LS_Dispenser_7_8.bits.F2_LS_DISPENSER_DOWN_7 = NO_LIMIT; break; case GPI_LS_DISPENSER_25_7: //LM_Status = LS_Dispenser_7_8.bits.F2_LS_DISPENSER_25_7 ^ Dispenser_struct[6].LS_Type; - LM_Status = ((~Dispenser_struct[6].LS_Type) & LS_Dispenser_7_8.bits.F2_LS_DISPENSER_25_7) | ((Dispenser_struct[6].LS_Type) & (~LS_Dispenser_7_8.bits.F2_LS_DISPENSER_75_7));//new dispenser use 75 old use 25 + LM_Status = ((~Dispenser_struct[6].LS_Polarity) & LS_Dispenser_7_8.bits.F2_LS_DISPENSER_25_7) | ((Dispenser_struct[6].LS_Polarity) & (~LS_Dispenser_7_8.bits.F2_LS_DISPENSER_75_7));//new dispenser use 75 old use 25 //LS_Dispenser_7_8.bits.F2_LS_DISPENSER_25_7 = NO_LIMIT; break; case GPI_LS_DISPENSER_UP_7: - LM_Status = LS_Dispenser_7_8.bits.F2_LS_DISPENSER_UP_7 ^ Dispenser_struct[6].LS_Type; + LM_Status = LS_Dispenser_7_8.bits.F2_LS_DISPENSER_UP_7 ^ Dispenser_struct[6].LS_Polarity; //LS_Dispenser_7_8.bits.F2_LS_DISPENSER_UP_7 = NO_LIMIT; break; case GPI_LS_DISPENSER_50_8: - LM_Status = LS_Dispenser_7_8.bits.F2_LS_DISPENSER_50_8 ^ Dispenser_struct[7].LS_Type; + LM_Status = LS_Dispenser_7_8.bits.F2_LS_DISPENSER_50_8 ^ Dispenser_struct[7].LS_Polarity; //LS_Dispenser_7_8.bits.F2_LS_DISPENSER_50_8 = NO_LIMIT; break; case GPI_LS_DISPENSER_DOWN_8: - LM_Status = LS_Dispenser_7_8.bits.F2_LS_DISPENSER_DOWN_8 ^ Dispenser_struct[7].LS_Type; + LM_Status = LS_Dispenser_7_8.bits.F2_LS_DISPENSER_DOWN_8 ^ Dispenser_struct[7].LS_Polarity; //LS_Dispenser_7_8.bits.F2_LS_DISPENSER_DOWN_8 = NO_LIMIT; break; case GPI_LS_DISPENSER_25_8: //LM_Status = LS_Dispenser_7_8.bits.F2_LS_DISPENSER_25_8 ^ Dispenser_struct[7].LS_Type; - LM_Status = ((~Dispenser_struct[7].LS_Type) & LS_Dispenser_7_8.bits.F2_LS_DISPENSER_25_8) | ((Dispenser_struct[7].LS_Type) & (~LS_Dispenser_7_8.bits.F2_LS_DISPENSER_75_8));//new dispenser use 75 old use 25 + LM_Status = ((~Dispenser_struct[7].LS_Polarity) & LS_Dispenser_7_8.bits.F2_LS_DISPENSER_25_8) | ((Dispenser_struct[7].LS_Polarity) & (~LS_Dispenser_7_8.bits.F2_LS_DISPENSER_75_8));//new dispenser use 75 old use 25 //LS_Dispenser_7_8.bits.F2_LS_DISPENSER_25_8 = NO_LIMIT; break; case GPI_LS_DISPENSER_UP_8: - LM_Status = LS_Dispenser_7_8.bits.F2_LS_DISPENSER_UP_8 ^ Dispenser_struct[7].LS_Type; + LM_Status = LS_Dispenser_7_8.bits.F2_LS_DISPENSER_UP_8 ^ Dispenser_struct[7].LS_Polarity; //LS_Dispenser_7_8.bits.F2_LS_DISPENSER_UP_8 = NO_LIMIT; break;/**/ case GPI_LS_DRYER_LID_OPEN: diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.c index 0e32f664f..a75ef5e40 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.c @@ -149,18 +149,18 @@ uint8_t Check_Dispenser_Type() if(status == I2C_MASTER_ERR_ADDR_ACK) { Dispenser_struct[i].Type = DISP_TYPE_WITHOUT_EEPROM; - Dispenser_struct[i].LS_Type = OPTIC_LS; + Dispenser_struct[i].LS_Polarity = DEFAULT_POLARITY; } else { Dispenser_struct[i].Type = DISP_TYPE_EEPROM32KB; - Dispenser_struct[i].LS_Type = MAGNETIC_LS; + Dispenser_struct[i].LS_Polarity = INVERSION_POLARITY; } } else { Dispenser_struct[i].Type = DISP_TYPE_EEPROM128KB; - Dispenser_struct[i].LS_Type = MAGNETIC_LS; + Dispenser_struct[i].LS_Polarity = DEFAULT_POLARITY; } } -- cgit v1.3.1 From 9edbff9afd0a9e6f2fc133b89f5746757928d9d2 Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Wed, 13 Mar 2019 14:07:02 +0200 Subject: Stub for dispenser GPIO --- .../Dispenser_Card/IO_Ports/Dispenser_IO.c | 63 ++++++++++++++++++---- .../Dispenser_Card/IO_Ports/Dispenser_IO.h | 5 +- Software/Embedded_SW/Embedded/Main.c | 3 +- .../Modules/Stubs_Handler/Stub_Dispenser.c | 47 +++++++++++++--- .../Embedded/Modules/Stubs_Handler/Stub_Heater.c | 1 + 5 files changed, 97 insertions(+), 22 deletions(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c index 3721df198..1b2fe3c29 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c @@ -3,6 +3,8 @@ * * Created on: Mar 11, 2019 * Author: avi + * + * ONLY FOR DISP_TYPE_EEPROM128KB !!!!!! */ #include @@ -64,7 +66,7 @@ uint8_t TCA9534ReadInputReg(uint8_t Dispenser_ID, TCA9534Regs* Regs)//3 read //----------------------------------------------------------------------------------------------------- -uint8_t TCA9534TestRelay(uint8_t Dispenser_ID, TCA9534Regs* Regs)//Set the test and check the relay_on +uint8_t TCA9534TestByPassTestRelay(uint8_t Dispenser_ID, TCA9534Regs* Regs)//Set the test and check the relay_on { uint8_t status = PASSED; @@ -169,7 +171,7 @@ uint8_t TCA9534TestRelay(uint8_t Dispenser_ID, TCA9534Regs* Regs)//Set the test } -uint8_t TCA9534ByPass(uint8_t Dispenser_ID, TCA9534Regs* Regs)//2 +uint8_t TCA9534TestRelay(uint8_t Dispenser_ID, TCA9534Regs* Regs, bool EnableTestRelay) { uint8_t status = PASSED; @@ -178,17 +180,56 @@ uint8_t TCA9534ByPass(uint8_t Dispenser_ID, TCA9534Regs* Regs)//2 //set Mux to the current dispenser Channel status |= Select_Dispenser_Mux_Channel(Dispenser_ID); - //Set BYPASS to output: - Regs->Config[Dispenser_ID].bit.BYPASS = TCA9534_OUTPUT; + if(EnableTestRelay) + { + //Set RELAY_TEST to output: + Regs->Config[Dispenser_ID].bit.RELAY_TEST = TCA9534_OUTPUT; + Write_Buf[0] = TCA9534_CONFIG_REG; + Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + + + //Set the RELAY_TEST pin to LOW + Regs->Output[Dispenser_ID].bit.RELAY_TEST = LOW; + Write_Buf[0] = TCA9534_OUTPUT_REG; + Write_Buf[1] = Regs->Output[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + } + + //Set RELAY_TEST to input: + Regs->Config[Dispenser_ID].bit.RELAY_TEST = TCA9534_INPUT; Write_Buf[0] = TCA9534_CONFIG_REG; Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); - //Set the BYPASS pin to LOW - Regs->Output[Dispenser_ID].bit.BYPASS = LOW; - Write_Buf[0] = TCA9534_OUTPUT_REG; - Write_Buf[1] = Regs->Output[Dispenser_ID].Uchar; - status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + return status; + +} + +uint8_t TCA9534ByPass(uint8_t Dispenser_ID, TCA9534Regs* Regs, bool EnableByPass) +{ + uint8_t status = PASSED; + + uint8_t Write_Buf[2]; + + //set Mux to the current dispenser Channel + status |= Select_Dispenser_Mux_Channel(Dispenser_ID); + + if(EnableByPass) + { + //Set BYPASS to output: + Regs->Config[Dispenser_ID].bit.BYPASS = TCA9534_OUTPUT; + Write_Buf[0] = TCA9534_CONFIG_REG; + Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + + + //Set the BYPASS pin to LOW + Regs->Output[Dispenser_ID].bit.BYPASS = LOW; + Write_Buf[0] = TCA9534_OUTPUT_REG; + Write_Buf[1] = Regs->Output[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + } //Set BYPASS to input: Regs->Config[Dispenser_ID].bit.BYPASS = TCA9534_INPUT; @@ -232,8 +273,8 @@ uint8_t test_IO() status |= TCA9534Init(i, Regs); status |= TCA9534SetReadInputReg(i); status |= TCA9534ReadInputReg(i, Regs); - status |= TCA9534TestRelay(i, Regs); - status |= TCA9534ByPass(i, Regs); + status |= TCA9534TestRelay(i, Regs,ENABLE); + status |= TCA9534ByPass(i, Regs,ENABLE); Read_Notification_Disp_UP(i, Regs); Read_Notification_Disp_Down(i, Regs); Read_Notification_Realy_On(i, Regs); diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h index e0e511d5b..2105434d2 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h @@ -51,8 +51,9 @@ typedef struct { uint8_t TCA9534Init(uint8_t Dispenser_ID, TCA9534Regs* Regs); uint8_t TCA9534SetReadInputReg(uint8_t Dispenser_ID); uint8_t TCA9534ReadInputReg(uint8_t Dispenser_ID, TCA9534Regs* Regs); -uint8_t TCA9534TestRelay(uint8_t Dispenser_ID, TCA9534Regs* Regs); -uint8_t TCA9534ByPass(uint8_t Dispenser_ID, TCA9534Regs* Regs); +uint8_t TCA9534TestRelay(uint8_t Dispenser_ID, TCA9534Regs* Regs, bool EnableTestRelay); +uint8_t TCA9534ByPass(uint8_t Dispenser_ID, TCA9534Regs* Regs, bool EnableByPass); +uint8_t TCA9534TestByPassTestRelay(uint8_t Dispenser_ID, TCA9534Regs* Regs); bool Read_Notification_Disp_UP(uint8_t Dispenser_ID, TCA9534Regs* Regs); bool Read_Notification_Disp_Down(uint8_t Dispenser_ID, TCA9534Regs* Regs); bool Read_Notification_Realy_On(uint8_t Dispenser_ID, TCA9534Regs* Regs); diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c index 64f4380a8..fc3d09402 100644 --- a/Software/Embedded_SW/Embedded/Main.c +++ b/Software/Embedded_SW/Embedded/Main.c @@ -58,13 +58,14 @@ #include "Drivers/I2C_Communication/I2C.h" -//#include "Drivers/I2C_Communication/Dispensers_EEPROM_MUX/Disp_EEPROM_MUX.h" +#include "Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.h" #include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" #include "drivers/Flash_Memory/FATFS/ff.h" #include "drivers/Flash_Memory/FATFS/Control_File_System.h" + //#define WATCHDOG //***************************************************************************** // diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Dispenser.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Dispenser.c index 7c0a4c980..0f9d9d418 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Dispenser.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Dispenser.c @@ -11,18 +11,18 @@ #include "drivers/adc_sampling/adc.h" #include "modules/ids/ids_ex.h" - +#include #include "Stub_Status.h" #include void Stub_DispenserRequest(MessageContainer* requestContainer) { - uint32_t status = NOT_SUPPORTED; + uint32_t status = PASSED; MessageContainer responseContainer; StubDispenserRequest* request = stub_dispenser_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); - +/* ADCAcquireInit(); SysCtlDelay(10000); ADCAcquireStart(0,1); @@ -32,9 +32,36 @@ void Stub_DispenserRequest(MessageContainer* requestContainer) ADC0SS0Handler(); SysCtlDelay(100000); +*/ + + TCA9534Regs* Regs; + + status |= TCA9534Init(request->dispenserid, Regs); + if(request->start == 1) + { + TCA9534ByPass(request->dispenserid, Regs,ENABLE); + } + else + TCA9534ByPass(request->dispenserid, Regs,DISABLE); + delayms(5); + + if(request->setdirection == 1) + { + TCA9534TestRelay(request->dispenserid, Regs,ENABLE); + } + else + TCA9534TestRelay(request->dispenserid, Regs,DISABLE); + + delayms(5); + if(request->setmicrostepdivision == 1) + TCA9534TestByPassTestRelay(request->dispenserid, Regs); + delayms(5); + if(request->setspeed == 1) + test_IO(); + delayms(5); //request->dispenserid //request->start //request->setdirection @@ -46,15 +73,19 @@ void Stub_DispenserRequest(MessageContainer* requestContainer) response.dispenserid = (uint32_t)((round)(CalculateDispenserPressure(0x00000004)));//CHAN_DISPENSE_PRESSURE_6); + + status |= TCA9534SetReadInputReg(request->dispenserid); + status |= TCA9534ReadInputReg(request->dispenserid, Regs); + - //response.dispenserid = request->dispenserid; + response.dispenserid = request->dispenserid; response.has_dispenserid = true; - //response.dispenserposition - response.has_dispenserposition = false; + response.dispenserposition = (Read_Notification_Disp_UP(request->dispenserid, Regs) << 8) | (Read_Notification_Disp_Down(request->dispenserid, Regs)); + response.has_dispenserposition = true; - //response.inkworninglevel - response.has_inkworninglevel = false; + response.inkworninglevel = (Read_Notification_Realy_On(request->dispenserid, Regs) << 8) | (Read_Notification_Over_Press(request->dispenserid, Regs)); + response.has_inkworninglevel = true; status_response(status,&response.status, &response.statusword ,&response.has_statusword); diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Heater.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Heater.c index 7735c9955..6848dd1cf 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Heater.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Heater.c @@ -22,6 +22,7 @@ #include "Drivers/Heater/Heater.h" #include "../control/control.h" #include "Drivers/Heater/TemperatureSensor.h" +#include "Modules/heaters/heaters_ex.h" void Stub_HeaterRequest(MessageContainer* requestContainer) { -- cgit v1.3.1 From b40a16bd00381b710196b2db6bad08e875d90184 Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Wed, 13 Mar 2019 14:28:15 +0200 Subject: update dispenser stub --- .../Dispenser_Card/IO_Ports/Dispenser_IO.c | 25 +++++++++++----------- .../Dispenser_Card/IO_Ports/Dispenser_IO.h | 10 +++++---- .../Modules/Stubs_Handler/Stub_Dispenser.c | 20 ++++++++--------- 3 files changed, 28 insertions(+), 27 deletions(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c index 1b2fe3c29..6d032fe64 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c @@ -15,7 +15,6 @@ #include #include - uint8_t TCA9534Init(uint8_t Dispenser_ID, TCA9534Regs* Regs)//1 { uint8_t status = PASSED; @@ -121,7 +120,7 @@ uint8_t TCA9534TestByPassTestRelay(uint8_t Dispenser_ID, TCA9534Regs* Regs)//Set status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); //deley - delayms(5); + delayms(Relay_Operate_time); //Read the Realay_on pin TCA9534SetReadInputReg(Dispenser_ID); @@ -138,7 +137,7 @@ uint8_t TCA9534TestByPassTestRelay(uint8_t Dispenser_ID, TCA9534Regs* Regs)//Set status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); //deley - delayms(5); + delayms(Relay_Operate_time); //Read the Realay_on pin TCA9534SetReadInputReg(Dispenser_ID); @@ -157,7 +156,7 @@ uint8_t TCA9534TestByPassTestRelay(uint8_t Dispenser_ID, TCA9534Regs* Regs)//Set status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); //deley - delayms(5); + delayms(Relay_Operate_time); //Read the Realay_on pin TCA9534SetReadInputReg(Dispenser_ID); @@ -265,20 +264,20 @@ uint8_t test_IO() { uint8_t status = PASSED; - TCA9534Regs* Regs; + TCA9534Regs Regs; uint8_t i; for(i=0;i<8;i++) { - status |= TCA9534Init(i, Regs); + status |= TCA9534Init(i, &Regs); status |= TCA9534SetReadInputReg(i); - status |= TCA9534ReadInputReg(i, Regs); - status |= TCA9534TestRelay(i, Regs,ENABLE); - status |= TCA9534ByPass(i, Regs,ENABLE); - Read_Notification_Disp_UP(i, Regs); - Read_Notification_Disp_Down(i, Regs); - Read_Notification_Realy_On(i, Regs); - Read_Notification_Over_Press(i, Regs); + status |= TCA9534ReadInputReg(i, &Regs); + status |= TCA9534TestRelay(i, &Regs, ENABLE); + status |= TCA9534ByPass(i, &Regs, ENABLE); + Read_Notification_Disp_UP(i, &Regs); + Read_Notification_Disp_Down(i, &Regs); + Read_Notification_Realy_On(i, &Regs); + Read_Notification_Over_Press(i, &Regs); } return status; diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h index 2105434d2..af1470da5 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.h @@ -11,7 +11,7 @@ /************************** I2C Address ***************************************/ -#define TCA9534_ADDRESS 0x40 // I2C Address 0100 + ADDR + R/W - ADDR tied to GND (permanent) +#define TCA9534_ADDRESS 0x40 // I2C Address 0100 + ADDR + R/W - ADDR tied to GND (permanent) /************************** I2C Registers *************************************/ #define TCA9534_INPUT_REG 0x00 // Input status register @@ -19,9 +19,11 @@ #define TCA9534_POLARITY_REG 0x02 // Polarity inversion register. BIT '1' inverts input polarity of register 0x00 #define TCA9534_CONFIG_REG 0x03 // Configuration register. BIT = '1' sets port to input BIT = '0' sets port to output -#define TCA9534_INPUT 0x01 -#define TCA9534_OUTPUT 0x00 -#define TCA9534_All_INPUT 0xFF +#define TCA9534_INPUT 0x01 +#define TCA9534_OUTPUT 0x00 +#define TCA9534_All_INPUT 0xFF + +#define Relay_Operate_time 5 //mSec typedef struct { diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Dispenser.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Dispenser.c index 0f9d9d418..eb1de19ad 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Dispenser.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Dispenser.c @@ -34,30 +34,30 @@ void Stub_DispenserRequest(MessageContainer* requestContainer) SysCtlDelay(100000); */ - TCA9534Regs* Regs; + TCA9534Regs Regs; - status |= TCA9534Init(request->dispenserid, Regs); + status |= TCA9534Init(request->dispenserid, &Regs); if(request->start == 1) { - TCA9534ByPass(request->dispenserid, Regs,ENABLE); + TCA9534ByPass(request->dispenserid, &Regs, ENABLE); } else - TCA9534ByPass(request->dispenserid, Regs,DISABLE); + TCA9534ByPass(request->dispenserid, &Regs, DISABLE); delayms(5); if(request->setdirection == 1) { - TCA9534TestRelay(request->dispenserid, Regs,ENABLE); + TCA9534TestRelay(request->dispenserid, &Regs,ENABLE); } else - TCA9534TestRelay(request->dispenserid, Regs,DISABLE); + TCA9534TestRelay(request->dispenserid, &Regs,DISABLE); delayms(5); if(request->setmicrostepdivision == 1) - TCA9534TestByPassTestRelay(request->dispenserid, Regs); + TCA9534TestByPassTestRelay(request->dispenserid, &Regs); delayms(5); if(request->setspeed == 1) test_IO(); @@ -75,16 +75,16 @@ void Stub_DispenserRequest(MessageContainer* requestContainer) status |= TCA9534SetReadInputReg(request->dispenserid); - status |= TCA9534ReadInputReg(request->dispenserid, Regs); + status |= TCA9534ReadInputReg(request->dispenserid, &Regs); response.dispenserid = request->dispenserid; response.has_dispenserid = true; - response.dispenserposition = (Read_Notification_Disp_UP(request->dispenserid, Regs) << 8) | (Read_Notification_Disp_Down(request->dispenserid, Regs)); + response.dispenserposition = (Read_Notification_Disp_UP(request->dispenserid, &Regs) << 8) | (Read_Notification_Disp_Down(request->dispenserid, &Regs)); response.has_dispenserposition = true; - response.inkworninglevel = (Read_Notification_Realy_On(request->dispenserid, Regs) << 8) | (Read_Notification_Over_Press(request->dispenserid, Regs)); + response.inkworninglevel = (Read_Notification_Realy_On(request->dispenserid, &Regs) << 8) | (Read_Notification_Over_Press(request->dispenserid, &Regs)); response.has_inkworninglevel = true; status_response(status,&response.status, &response.statusword ,&response.has_statusword); -- cgit v1.3.1 From 581fc5ccade02a541b9e9fff2ab8c34bf6deef2c Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Thu, 14 Mar 2019 23:56:45 +0200 Subject: version 1.3.7.9 --- .../Embedded_SW/Embedded/Common/SW_Info/SW_Info.c | 2 +- .../Embedded_SW/Embedded/Drivers/Motors/Motor.h | 1 + .../Embedded/Drivers/SSI_Comm/Dancer/Dancer.c | 5 + .../Embedded/Drivers/SSI_Comm/Dancer/Dancer.h | 1 + Software/Embedded_SW/Embedded/Embedded.cfg | 1 + .../Embedded/Modules/Control/MillisecTask.c | 4 +- .../Modules/Diagnostics/DiagnosticActions.c | 6 ++ .../Embedded/Modules/Heaters/Heaters_print.c | 4 + Software/Embedded_SW/Embedded/Modules/IDS/IDS.h | 1 - .../Embedded/Modules/IDS/IDS_dispenser.c | 10 +- Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h | 4 + .../Embedded_SW/Embedded/Modules/IDS/IDS_print.c | 27 +++++- .../Embedded/Modules/Thread/ThreadLoad.c | 34 +++---- .../Embedded/Modules/Thread/Thread_Winder.c | 25 +++-- .../Embedded/Modules/Thread/Thread_print.c | 4 +- .../Embedded/StateMachines/Printing/JobSTM.c | 105 +++++++++++---------- 16 files changed, 149 insertions(+), 85 deletions(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c index 15e9fe828..5efeaa71d 100644 --- a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c +++ b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c @@ -20,7 +20,7 @@ typedef struct } TangoVersion_t; -TangoVersion_t _gTangoVersion = {1,3,7,88}; +TangoVersion_t _gTangoVersion = {1,3,7,9}; #define BUILD_DATE __DATE__ char Dat[50] = BUILD_DATE; char _gTangoName [MAX_STRING_LEN] = "Tango01 ";//d diff --git a/Software/Embedded_SW/Embedded/Drivers/Motors/Motor.h b/Software/Embedded_SW/Embedded/Drivers/Motors/Motor.h index 7599c10db..ecc70765b 100644 --- a/Software/Embedded_SW/Embedded/Drivers/Motors/Motor.h +++ b/Software/Embedded_SW/Embedded/Drivers/Motors/Motor.h @@ -201,6 +201,7 @@ uint32_t MotorMovetoBreakSensor (TimerMotors_t _motorId,bool direction, uint32_t uint32_t MotorMovetoDancerPosition (TimerMotors_t _motorId,bool direction, uint32_t Freq,uint32_t DancerId,bool dancervaluedirection, callback_fptr callback,uint32_t timeout); uint32_t MotorAbortMovetoLimitSwitch (TimerMotors_t _motorId); uint32_t MotorMoveToStopper (TimerMotors_t _motorId,bool direction, uint32_t Speed, callback_fptr callback,uint32_t backlash,uint32_t timeout); +uint32_t MotorMovetoEncoderPosition (TimerMotors_t MotorId, callback_fptr callback,uint32_t timeout); uint32_t MotorGoTo(TimerMotors_t _motorIdn, uint32_t Steps); #endif /* DRIVERS_MOTOR_H_ */ diff --git a/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/Dancer/Dancer.c b/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/Dancer/Dancer.c index 6c692ed10..de2ceb698 100644 --- a/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/Dancer/Dancer.c +++ b/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/Dancer/Dancer.c @@ -84,6 +84,11 @@ uint32_t Read_Dryer_ENC_Position () FPGA_SSI_Dryer_ENC_Transnit(); return Dryer_ENC.Position; } +uint32_t Control_Read_Dryer_Position(HardwareDancerType DancerId, uint32_t Parameter1) +{ + return Dryer_ENC.Position; + //return SSI_enc.Position; +} void Loop_SSI() { diff --git a/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/Dancer/Dancer.h b/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/Dancer/Dancer.h index bc03b3e9e..7a843b1c1 100644 --- a/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/Dancer/Dancer.h +++ b/Software/Embedded_SW/Embedded/Drivers/SSI_Comm/Dancer/Dancer.h @@ -12,6 +12,7 @@ uint32_t Read_Dancer_Position (HardwareDancerType DancerId); uint32_t Control_Read_Dancer_Position(HardwareDancerType DancerId, uint32_t Parameter1, uint32_t Parameter2); uint32_t Read_Dryer_ENC_Position (); +uint32_t Control_Read_Dryer_Position(uint32_t DryerID, uint32_t Parameter1, uint32_t Parameter2); void Loop_SSI(); diff --git a/Software/Embedded_SW/Embedded/Embedded.cfg b/Software/Embedded_SW/Embedded/Embedded.cfg index ea7a370b8..89aff2c92 100644 --- a/Software/Embedded_SW/Embedded/Embedded.cfg +++ b/Software/Embedded_SW/Embedded/Embedded.cfg @@ -60,6 +60,7 @@ Program.global.timer1 = Hwi.create(37, "&MillisecInterrupt", hwi6Params); var hwi17Params = new Hwi.Params(); hwi17Params.instance.name = "timer3"; hwi17Params.arg = 3; +hwi17Params.priority = 96; Program.global.timer3 = Hwi.create(51, "&ScrewTimerInterrupt", hwi17Params); /* diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index 5fe242436..8e4a36e62 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -499,9 +499,9 @@ uint32_t MillisecLowLoop(uint32_t tick) //Read_MidTank_Pressure_Sensor(Disp_i); } FPGA_GetAllDispensersValveBusyOCD(); - /*temp = Read_Fans_Tacho(); + temp = Read_Fans_Tacho(); DrawerFansStatus = temp & 0x1F; - SystemFansStatus = temp & 0xE0;*/ + SystemFansStatus = temp & 0xE0; KeepAliveOneSecondCall(); for (Motor_i = 0;Motor_i < NUM_OF_MOTORS;Motor_i++) { diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c index e3f593924..425894857 100644 --- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c +++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c @@ -254,6 +254,12 @@ uint32_t SetDigitalOutRequestRequestFunc(MessageContainer* requestContainer) else Valve_Set(VALVE_MIXCHIP_WASTECH,0); break; + case INTERFACE_IOS__GPO_BLOWER_PWM: + if (request->value == true) + Control_Dryer_Fan(START,75);//use START or STOP, 0 - 100%(); + else + Control_Dryer_Fan(STOP,0);//use START or STOP, 0 - 100%(); + break; default: responseContainer.has_error = true; responseContainer.error = ERROR_CODE__GENERAL_ERROR; diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index 3f62fc3b6..a6fbe3ebc 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -782,6 +782,8 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) if (readValue > HeaterCmd[index].targettemperatue) { DeActivateHeater(index); + HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain,0); + HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary,0); } return ERROR; } @@ -795,6 +797,8 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) DeActivateHeater(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary); DeActivateHeater(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain); //Heaters OFF until coming into the proportional band + HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain,0); + HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary,0); return OK; } // if (readValue < ((HeaterCmd[index].targettemperatue * (100-HeaterControl[index].outputproportionalband))/100)) diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS.h b/Software/Embedded_SW/Embedded/Modules/IDS/IDS.h index d27fb7c56..e7e6f3ff6 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS.h +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS.h @@ -31,7 +31,6 @@ void IDS_Dispenser_Set_Flow_Params (char DispenserId,double NanoLitterPerPulse,c void IDS_Dispenser_RefillStarted (char DispenserId); void IDS_Dispenser_RefillEnded (char DispenserId); void IDS_Dispenser_MovingDirection (char DispenserId, bool direction); -uint32_t IDS_Dispenser_Build_Pressure(int DispenserId, callback_fptr callback); #endif //MODULES_IDS_IDS_H_ diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c index acaf19744..abfabe17d 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c @@ -62,10 +62,15 @@ uint32_t IdsGetMotorSpeed(uint32_t DispenserId) uint32_t IDS_Dispenser_Build_Pressure_Callback(uint32_t DispenserId, uint32_t ReadValue) { + uint32_t status; DispenserPrepareTime[DispenserId]+=DispenserPrepareTimeLag; if ((GetDispenserPressure(DispenserId)>=DispenserPreparePressure)||(DispenserPrepareTime[DispenserId]>=DispenserPrepareTimeout)) { + if (DispenserPrepareTime[DispenserId]>=DispenserPrepareTimeout) + status = ERROR; + else + status = OK; if (SafeRemoveControlCallback(DispenserControlId[DispenserId], IDS_Dispenser_Build_Pressure_Callback )==OK) DispenserControlId[DispenserId] = 0xFF; else @@ -76,11 +81,12 @@ uint32_t IDS_Dispenser_Build_Pressure_Callback(uint32_t DispenserId, uint32_t Re if (DispenserCallback[DispenserId]) { - DispenserCallback[DispenserId](DispenserId,ReadValue); + + DispenserCallback[DispenserId](DispenserId,status); DispenserCallback[DispenserId] = 0; } } - return OK; + return status; } uint32_t IDS_Dispenser_Build_Pressure(int DispenserId, callback_fptr callback) diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h index bf73ed7fa..b201e6611 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h @@ -39,6 +39,9 @@ uint32_t IDSSegmentState(void *JobDetails, int SegmentId); uint32_t IDSDistanceToSpoolState(void); uint32_t IDSEndState(void *JobDetails); +uint32_t IDS_StartLubrication(void); +uint32_t IDS_StopLubrication(void); + uint32_t IDS_DispenserPidRequestMessage(HardwarePidControl* request); uint32_t IDS_DispenserControlInit(); @@ -49,6 +52,7 @@ uint32_t IDS_Dispenser_Alarm_On (uint8_t deviceID); uint32_t IDS_Dispenser_Alarm_Off (uint8_t deviceID); uint32_t IDS_CheckDispenserLimitSwitch (LimitSwitchAlarms LS_Id); +uint32_t IDS_Dispenser_Build_Pressure(int DispenserId, callback_fptr callback); void IDS_Dispenser_SetTimeOutValues(uint32_t CloseTimeout, uint32_t OpenTimeout); void IDS_Dispenser_SetBackLashValues(double initialdispenserpressure, uint32_t initialdispensertimeout, uint32_t initialdispensertimelag); diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c index 2be233962..0a9d40a15 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c @@ -31,11 +31,12 @@ typedef struct PID_Config_Params m_params; }DispenserControlConfig_t; HardwarePidControl *DispensersControl;// = (HardwarePidControl *)GENHWCFG_MAP_IN_FLASH + 0x4000; - +#define LUBRICANT_DISPENSER 7 +#define MAX_DYE_DISPENSERS 7 int32_t DispenserSamples[MAX_SYSTEM_DISPENSERS][MAX_CONTROL_SAMPLES] = {0}; int DispenserSamplePointer[MAX_SYSTEM_DISPENSERS] = {0}; double DispenserNormalizedErrorCoEfficient[MAX_SYSTEM_DISPENSERS] = {0}; - +double lubricant_speed = 0.0; HardwarePidControlType ThreadDispenserIdToControlId[MAX_SYSTEM_DISPENSERS] = { HARDWARE_PID_CONTROL_TYPE__Dispenser1,HARDWARE_PID_CONTROL_TYPE__Dispenser2,HARDWARE_PID_CONTROL_TYPE__Dispenser3,HARDWARE_PID_CONTROL_TYPE__Dispenser4,HARDWARE_PID_CONTROL_TYPE__Dispenser5,HARDWARE_PID_CONTROL_TYPE__Dispenser6,HARDWARE_PID_CONTROL_TYPE__Dispenser7,HARDWARE_PID_CONTROL_TYPE__Dispenser8}; bool DispenserReady[MAX_SYSTEM_DISPENSERS] = {true}; @@ -160,6 +161,13 @@ void DispenserPrepareReady(void) if (JobTicket->segments[Segment_i]->brushstops[Brush_i]->dispensers[Dispenser_i]->nanolitterpersecond>0.0) { DispenserUsedInJob[DispenserId] = true; + if(DispenserId == LUBRICANT_DISPENSER) + { + lubricant_speed = JobTicket->segments[0]->brushstops[0]->dispensers[Dispenser_i]->nanolitterpersecond/ + JobTicket->segments[0]->brushstops[0]->dispensers[Dispenser_i]->nanoliterperpulse; + REPORT_MSG (lubricant_speed*100, "LUBRICANT_SPEED*100"); + } + } }//for dispenser }//if dispensers @@ -522,3 +530,18 @@ uint32_t IDSPreSegmentState(void *JobDetails, int SegmentId) return OK; } +uint32_t IDS_StartLubrication(void) +{ + IDS_Dispenser_Start_Motor_and_Open_Valve(LUBRICANT_DISPENSER,lubricant_speed,NULL); + Lubricant_2Way_Valve (START); + return OK; +} +uint32_t IDS_StopLubrication(void) +{ + if(DispenserUsedInJob[LUBRICANT_DISPENSER]) + { + IDS_Dispenser_Close_Valve_And_Stop_Motor(LUBRICANT_DISPENSER,IDS_Valve_EndValveReady); + Lubricant_2Way_Valve (STOP); + } + return OK; +} diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c index a82fe37e6..ff319918e 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c @@ -38,21 +38,21 @@ /* typedef enum { 0 THREAD_LOAD_INIT, - 1 THREAD_LOAD_REDUCE_HEAT, //HEATERS OFF, DRYER BLOWER OFF, BLOWER LOW, - 2 THREAD_LOAD_SET_LOAD_ARM_TO_START_POSITION,//USE NOTATION HOW MANY ROTATIONS IN THE DRYER, OR CHECK AGAINST STOPPER. MOVE SLOWLY - 3 THREAD_LOAD_CENTER_HEAD_ROCKERS, //puthead cleaning rockers to middle position - 4 THREAD_LOAD_OPEN_COVERS, //OPEN DYEING HEAD COVER AND DRYER LID + 1 THREAD_LOAD_REDUCE_HEAT, //HEATERS OFF, DRYER BLOWER OFF, BLOWER LOW, + 2 THREAD_LOAD_SET_LOAD_ARM_TO_START_POSITION, //USE NOTATION HOW MANY ROTATIONS IN THE DRYER, OR CHECK AGAINST STOPPER. MOVE SLOWLY + 3 THREAD_LOAD_CENTER_HEAD_ROCKERS, //puthead cleaning rockers to middle position + 4 THREAD_LOAD_OPEN_COVERS, //OPEN DYEING HEAD COVER AND DRYER LID 5 THREAD_LOAD_LIFT_DANCERS, - 6 THREAD_LOAD_LIFT_ROCKERS, //MACHINE IS READY. SEND MESSAGE, START TIMER TO CLOSE LIDS, WAIT FOR OPERATOR RESPONSE - 7 THREAD_LOAD_INITIAL_TENSION,//CHECK SPOOL PRESENCERUN WINDER UNTIL BREAK SENSOR IS IDENTIFIEING MOVEMENT FOR A SECOND + 6 THREAD_LOAD_LIFT_ROCKERS, //MACHINE IS READY. SEND MESSAGE, START TIMER TO CLOSE LIDS, WAIT FOR OPERATOR RESPONSE + 7 THREAD_LOAD_INITIAL_TENSION, //CHECK SPOOL PRESENCERUN WINDER UNTIL BREAK SENSOR IS IDENTIFIEING MOVEMENT FOR A SECOND 8 THREAD_LOAD_CLOSE_ROCKERS, - 9 THREAD_LOAD_CLOSE_DANCERS, //SEND DANCER MOTORS TO PRESET LOCATION, CHECK THAT THE DANCERS ARE ON THE THREAD + 9 THREAD_LOAD_CLOSE_DANCERS, //SEND DANCER MOTORS TO PRESET LOCATION, CHECK THAT THE DANCERS ARE ON THE THREAD 10 THREAD_LOAD_CLOSE_LIDS, 11 THREAD_LOAD_RESUME_HEATING, - 12 THREAD_LOAD_JOG_FEEDER_TO_MIDDLE_POINT,//JOG THE FEEDER MOTOR UNTIL THE FEEDER DANCER IS AT MIDDLE POSITION - 13 THREAD_LOAD_DRYER_LOADING, //START FEEDER PID, ROTATE LOADING ARM COUNTER THREAD DIRECTION X CIRCLES ACCORDING TO RML. FEEDER SPEED IS 40 - //KEEP NOTATION HOW MANY ROTATIONS IN THE DRYER - 14 THREAD_LOAD_JOG_THREAD, //JOG THREAD SHORTLY TO MAKE SURE SPOOL IS RUNNING. REPORT END OF LOADING + 12 THREAD_LOAD_JOG_FEEDER_TO_MIDDLE_POINT, //JOG THE FEEDER MOTOR UNTIL THE FEEDER DANCER IS AT MIDDLE POSITION + 13 THREAD_LOAD_DRYER_LOADING, //START FEEDER PID, ROTATE LOADING ARM COUNTER THREAD DIRECTION X CIRCLES ACCORDING TO RML. FEEDER SPEED IS 40 + //KEEP NOTATION HOW MANY ROTATIONS IN THE DRYER + 14 THREAD_LOAD_JOG_THREAD, //JOG THREAD SHORTLY TO MAKE SURE SPOOL IS RUNNING. REPORT END OF LOADING 15 THREAD_LOAD_END }THREAD_LOAD_STAGES_ENUM;*/ THREAD_LOAD_STAGES_ENUM LoadStages = THREAD_LOAD_INIT; @@ -222,9 +222,9 @@ else { LoadStages++; - if (LoadStages != THREAD_LOAD_INITIAL_TENSION) //on this satge we should wait for user call + if (LoadStages != THREAD_LOAD_INITIAL_TENSION) //on this stage we should wait for user call { - ThreadLoadStateMachine(LoadStages); + //ThreadLoadStateMachine(LoadStages); } } } @@ -340,7 +340,7 @@ { Control_Dryer_Fan(START,75);//use START or STOP, 0 - 100% LoadStages++; - ThreadLoadStateMachine(LoadStages); + //ThreadLoadStateMachine(LoadStages); } return OK; } @@ -371,7 +371,7 @@ LoadStages++; if (LoadStages != THREAD_LOAD_INITIAL_TENSION) //on this satge we should wait for user call { - ThreadLoadStateMachine(LoadStages); + //ThreadLoadStateMachine(LoadStages); } } } @@ -417,7 +417,7 @@ //Keep Notation How Many Rotations In The Dryer //LoadArmInfo.LoadArmBackLash = 0; - //LoadArmInfo.LoadArmRounds = 0xFF; + LoadArmInfo.LoadArmRounds = 0xFF; FileWrite(&LoadArmInfo, sizeof(LoadArmInfo),LoadArmPath); return OK; } @@ -428,7 +428,7 @@ ControlId = 0xFF; ThreadAbortJoggingFunc(); LoadStages++; - ThreadLoadStateMachine(LoadStages); + //ThreadLoadStateMachine(LoadStages); return OK; } uint32_t Thread_Load_Jog_Thread(void) diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index c598e0c55..0277d1daa 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -40,6 +40,8 @@ void ScrewsStartControlTimer (void); bool Winder_ScrewHoming = false; bool ScrewCurrentDirection = false; //holds current screw direction uint32_t ScrewDirectionChangeCounter = 1; //holds the current number of runs of the screw - will be used to build the cone +uint32_t ScrewChangeCounter = 0; +uint32_t ScrewChangeLimit = 0; uint32_t CalculationDirectionChangeCounter = 1; //holds the current number of runs of the screw - will be used to build the cone uint16_t WinderMotorSpeed[MAX_WINDER_SPEED_CALCULATION]; uint16_t WinderMotorSpeedCounter = 0; @@ -196,13 +198,17 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag) double RotationsPerSecond; int32_t Averagewinderspeed = 0; - TotalWinderSpeed-=WinderMotorSpeed[WinderMotorSpeedCounter]; - WinderMotorSpeed[WinderMotorSpeedCounter] = CurrentControlledSpeed[WINDER_MOTOR]; - TotalWinderSpeed+=WinderMotorSpeed[WinderMotorSpeedCounter]; - if (WinderMotorSpeedCounter++>=MAX_WINDER_SPEED_CALCULATION) + ScrewChangeCounter++; + if ((ScrewChangeCounter>3)&&(ScrewChangeCounter<(ScrewChangeLimit-2))) //do not take the winder speed near the limits { - WinderMotorSpeedCounter=0; - WinderMotorSpeedRollOver=true; + TotalWinderSpeed-=WinderMotorSpeed[WinderMotorSpeedCounter]; + WinderMotorSpeed[WinderMotorSpeedCounter] = CurrentControlledSpeed[WINDER_MOTOR]; + TotalWinderSpeed+=WinderMotorSpeed[WinderMotorSpeedCounter]; + if (WinderMotorSpeedCounter++>=MAX_WINDER_SPEED_CALCULATION) + { + WinderMotorSpeedCounter=0; + WinderMotorSpeedRollOver=true; + } } if (ScrewDirectionChangeCounter == CalculationDirectionChangeCounter) @@ -260,7 +266,7 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag) //Report(TempScrewStr,__FILE__,__LINE__,0,RpWarning,0, 0); //Report(ScrewStr,__FILE__,__LINE__,ScrewCurrentDirection,RpWarning,CalculationDirectionChangeCounter, 0); //REPORT_MSG(temp , "new winder speed"); - Report("new winder speed",__FILE__,__LINE__,temp,RpWarning,ScrewSpeed,0); + Report("new winder speed",__FILE__,ScrewNumberOfSteps,temp,RpWarning,ScrewSpeed,0); } /********************************************************************************/ @@ -397,6 +403,7 @@ void ScrewsStartControlTimer (void) //ROM_TimerConfigure(Screw_timerBase, TIMER_CFG_PERIODIC); // 32 bits Timer TimerEnable(Screw_timerBase, TIMER_A); ROM_IntEnable(INT_TIMER3A); + //IntPrioritySet(Screw_timerBase, 0x40); ROM_TimerIntEnable(Screw_timerBase, TIMER_TIMA_TIMEOUT); ROM_TimerLoadSet(Screw_timerBase, TIMER_A,(int)1200000/*10 millisec*/ ); Report("ScrewsStartControlTimer direction,speed ", __FILE__,__LINE__,ScrewCurrentDirection, RpMessage, ScrewSpeed, 0); @@ -410,9 +417,11 @@ void ScrewTimerInterrupt(int ARG0) if (SCREW_TimerActivated == true) { + ROM_TimerLoadSet(Screw_timerBase, TIMER_A,(int)ScrewRunningTime); MotorSetDirection (HARDWARE_MOTOR_TYPE__MOTO_SCREW, ScrewCurrentDirection); MotorSetSpeedDirect(HARDWARE_MOTOR_TYPE__MOTO_SCREW,ScrewSpeed); - ROM_TimerLoadSet(Screw_timerBase, TIMER_A,(int)ScrewRunningTime); + ScrewChangeCounter = 0; + ScrewChangeLimit = ScrewRunningTime/12000000; ScrewDirectionChangeCounter++; } else diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 6a8474438..f4dc6a170 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -30,6 +30,7 @@ #include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" #include "modules/heaters/heaters.h" #include "modules/General/process.h" +#include "modules/ids/ids_ex.h" #include "Modules/AlarmHandling/AlarmHandling.h" #include "Control/MillisecTask.h" @@ -708,6 +709,7 @@ uint32_t ThreadPreSegmentState(void *JobDetails, uint32_t SegmentId) MotorSetDirection((TimerMotors_t)HARDWARE_MOTOR_TYPE__MOTO_LLOADING,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_LLOADING].directionthreadwize); MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_LLOADING, 1); } + IDS_StartLubrication(); } // activate control fr all motors //set speed for both rocker motors @@ -807,7 +809,7 @@ char Endstr[150]; } MotorStop(HARDWARE_MOTOR_TYPE__MOTO_RLOADING,Hard_Hiz); MotorStop(HARDWARE_MOTOR_TYPE__MOTO_LLOADING,Hard_Hiz); - + IDS_StopLubrication(); return OK; } diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c index 8c3d127ab..05ed98abd 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c @@ -587,70 +587,73 @@ void JobRequestFunc(MessageContainer* requestContainer) ErrorCode error = ERROR_CODE__NONE; JobEndReasonEnum JobAlarmReason = JOB_OK; - JobRequest* request = job_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); - if (request != NULL) - { - ustrncpy (JobToken, requestContainer->token,36); - previousJobLength = 0.0; - JobTicket *Ticket = request->jobticket; - int TicketSize = job_ticket__get_packed_size(Ticket); - if (TicketSize >= MAX_TICKET_SIZE) - { - LOG_ERROR (TicketSize, "job ticket message too long"); - status = FAILED; - error = ERROR_CODE__BAD_CRC; - usnprintf(ErrorMsg, 100, "job ticket message too long"); - } - else + if (JobActive == false) + { + JobRequest* request = job_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + if (request != NULL) { - //memcpy(CurrentJob, Ticket,TicketSize); - CurrentJob = Ticket; - if (CurrentRequest!= NULL) - job_request__free_unpacked(CurrentRequest,NULL); - CurrentRequest = request; - - status = PASSED; - JobEndReason = JOB_OK; - JobAlarmReason = AlarmHandlingPrepareJob(CurrentJob); - if (JobAlarmReason ==OK) + ustrncpy (JobToken, requestContainer->token,36); + previousJobLength = 0.0; + JobTicket *Ticket = request->jobticket; + int TicketSize = job_ticket__get_packed_size(Ticket); + if (TicketSize >= MAX_TICKET_SIZE) { -#warning Process parameters in job request are not handled. push separately for now - if (Ticket->processparameters) + LOG_ERROR (TicketSize, "job ticket message too long"); + status = FAILED; + error = ERROR_CODE__BAD_CRC; + usnprintf(ErrorMsg, 100, "job ticket message too long"); + } + else + { + //memcpy(CurrentJob, Ticket,TicketSize); + CurrentJob = Ticket; + if (CurrentRequest!= NULL) + job_request__free_unpacked(CurrentRequest,NULL); + CurrentRequest = request; + + status = PASSED; + JobEndReason = JOB_OK; + JobAlarmReason = AlarmHandlingPrepareJob(CurrentJob); + if (JobAlarmReason ==OK) { - if (HandleProcessParameters(Ticket->processparameters)!= OK) + #warning Process parameters in job request are not handled. push separately for now + if (Ticket->processparameters) { - status = FAILED; - error = ERROR_CODE__INVALID_PARAMETER; - usnprintf(ErrorMsg, 100, "Hardware Parameters Not Set"); + if (HandleProcessParameters(Ticket->processparameters)!= OK) + { + status = FAILED; + error = ERROR_CODE__INVALID_PARAMETER; + usnprintf(ErrorMsg, 100, "Hardware Parameters Not Set"); + } } - } - REPORT_MSG(0,"Process parameters in job request are not handled. push separately for now"); - if (Ticket->spool) - { - if (InternalWindingConfigMessage(Ticket->spool)!= OK) + REPORT_MSG(0,"Process parameters in job request are not handled. push separately for now"); + if (Ticket->spool) { - status = FAILED; - error = ERROR_CODE__INVALID_PARAMETER; - usnprintf(ErrorMsg, 100, "spool parameters error"); + if (InternalWindingConfigMessage(Ticket->spool)!= OK) + { + status = FAILED; + error = ERROR_CODE__INVALID_PARAMETER; + usnprintf(ErrorMsg, 100, "spool parameters error"); + } } - } + } + else + { + status = FAILED; + error = JobError_to_ErrorCode[JobAlarmReason]; + usnprintf(ErrorMsg, 100, "Existing alarms prevent running"); + } } - else + if (status == PASSED) { - status = FAILED; - error = JobError_to_ErrorCode[JobAlarmReason]; - usnprintf(ErrorMsg, 100, "Existing alarms prevent running"); + Report("Job Request ",__FILE__,__LINE__,Ticket->processparameters->dyeingspeed,RpWarning,Ticket->n_segments, Ticket->intersegmentlength); + StartJob(CurrentJob); } } - if (status == PASSED) - { - Report("Job Request ",__FILE__,__LINE__,Ticket->processparameters->dyeingspeed,RpWarning,Ticket->n_segments, Ticket->intersegmentlength); - StartJob(CurrentJob); - } + else + status = FAILED; } - else - status = FAILED; JobResponse response = JOB_RESPONSE__INIT; JobStatus jobStatus = JOB_STATUS__INIT; -- cgit v1.3.1 From 0e214df453878313d70065f68679a5a0267b0591 Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Sun, 17 Mar 2019 09:43:29 +0200 Subject: fix bug (typo) in the address of F1_GPO_02_bus, F1_Tacho_reg8 , F1_Tacho_reg9 --- Software/Embedded_SW/Embedded/DataDef.h | 2 + Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c | 46 ++++++++--- Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.h | 2 +- .../Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h | 6 +- .../Dispenser_Card/IO_Ports/Dispenser_IO.c | 21 ++--- Software/Embedded_SW/Embedded/Main.c | 2 + .../Embedded/Modules/Control/MillisecTask.c | 2 +- Software/Stubs Collection/stubs/NewSpeedSensor.cs | 45 +++++++++++ .../stubs/new dispenser card GPIO.cs | 90 ++++++++++++++++++++++ 9 files changed, 193 insertions(+), 23 deletions(-) create mode 100644 Software/Stubs Collection/stubs/NewSpeedSensor.cs create mode 100644 Software/Stubs Collection/stubs/new dispenser card GPIO.cs (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/DataDef.h b/Software/Embedded_SW/Embedded/DataDef.h index 3b62a0489..a85ea7024 100644 --- a/Software/Embedded_SW/Embedded/DataDef.h +++ b/Software/Embedded_SW/Embedded/DataDef.h @@ -141,6 +141,8 @@ enum //#define FPGA_Reg_Size_Bits 16 +#define FPGA_Freq 29166667 + #define MIDTANK_DIRECTION 0 #define MIXER_DIRECTION 1 diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c index 0b98891c5..b5525252c 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c @@ -202,14 +202,14 @@ uint8_t Read_Fans_Tacho() #ifndef EVALUATION_BOARD // The big Fan in the drawer - Fans_Speed_RPM[DRAWER_B] = Calculate_Tacho_Fan_Speed(29166666, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg0); - Fans_Speed_RPM[DRAWER_S0] = Calculate_Tacho_Fan_Speed(29166666, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg1); - Fans_Speed_RPM[DRAWER_S1] = Calculate_Tacho_Fan_Speed(29166666, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg2); - Fans_Speed_RPM[DRAWER_S2] = Calculate_Tacho_Fan_Speed(29166666, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg3); - Fans_Speed_RPM[DRAWER_S3] = Calculate_Tacho_Fan_Speed(29166666, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg4); - Fans_Speed_RPM[SYSTEM_0] = Calculate_Tacho_Fan_Speed(29166666, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg5); - Fans_Speed_RPM[SYSTEM_1] = Calculate_Tacho_Fan_Speed(29166666, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg6); - Fans_Speed_RPM[SYSTEM_2] = Calculate_Tacho_Fan_Speed(29166666, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg7); + Fans_Speed_RPM[DRAWER_B] = Calculate_Tacho_Fan_Speed(FPGA_Freq, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg0); + Fans_Speed_RPM[DRAWER_S0] = Calculate_Tacho_Fan_Speed(FPGA_Freq, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg1); + Fans_Speed_RPM[DRAWER_S1] = Calculate_Tacho_Fan_Speed(FPGA_Freq, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg2); + Fans_Speed_RPM[DRAWER_S2] = Calculate_Tacho_Fan_Speed(FPGA_Freq, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg3); + Fans_Speed_RPM[DRAWER_S3] = Calculate_Tacho_Fan_Speed(FPGA_Freq, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg4); + Fans_Speed_RPM[SYSTEM_0] = Calculate_Tacho_Fan_Speed(FPGA_Freq, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg5); + Fans_Speed_RPM[SYSTEM_1] = Calculate_Tacho_Fan_Speed(FPGA_Freq, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg6); + Fans_Speed_RPM[SYSTEM_2] = Calculate_Tacho_Fan_Speed(FPGA_Freq, 0X02, F1_Prescaler1_reg5, F1_Tacho_reg7); if( Fans_Speed_RPM[DRAWER_B] < 1000 ) // need to work around 3000 RPM Fans_Status.bit.DRAWER_BIG = ERROR;// not working / Low Speed @@ -342,7 +342,7 @@ uint32_t Read_Dryer_Fan_Tacho() uint32_t Drayer_Fan_Speed_RPM = 0; - Drayer_Fan_Speed_RPM = Calculate_Tacho_Fan_Speed(29166666, 12, F1_Prescaler1_reg5, F1_Tacho_reg8); + Drayer_Fan_Speed_RPM = Calculate_Tacho_Fan_Speed(FPGA_Freq, 12, F1_Prescaler1_reg5, F1_Tacho_reg8); return Drayer_Fan_Speed_RPM; @@ -398,3 +398,31 @@ void Machine_Idle_Breathing_Led() //if (Ten_msTick) } } + +uint32_t Read_Speed_Sensor_TypeII(uint32_t Counter, uint32_t Prescaler) +/* Counter - Increase the number to higher resolution * + * Prescaler - Deccrease the number to higher resolution*/ +{ + + uint32_t Speed_Hz; + + F1_Prescaler1_reg6 = Prescaler; + F1_gpo_cnt_A_reg = Counter; + + uint32_t i,temp,temp1; + for(i = 0 ; i< 10000; i++) + { + temp = F1_Tacho_reg9; + temp1 = FPGA_Freq; + temp1*=Counter; + temp1/=temp; + temp1/=Prescaler; + Speed_Hz = temp1; + //Speed_Hz = (FPGA_Freq * Counter) /(temp * Prescaler); + delayms(100); + } + #warning change the speed from Hz to Cm/Sec + + return Speed_Hz; +} + diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.h b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.h index 1c2bbfb1a..c3c427933 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.h +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.h @@ -15,7 +15,7 @@ void Control_Dryer_Fan_PWM(uint8_t PWM_Command_Precent); void Machine_Idle_Breathing_Led(); uint32_t Read_Dryer_Fan_Tacho(); - +uint32_t Read_Speed_Sensor_TypeII(uint32_t Counter, uint32_t Prescaler); #endif //FPGA_H diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h index 752773c0d..9ddbbe485 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h @@ -147,9 +147,9 @@ #define F1_LDANCER1_ROTENC_DATA_p_TX (*((volatile short *)(FPGA1_BASE | 0x1CE))) //This register triggers a TX transmission //FPGA VER 050219 -#define F1_GPO_02_bus (*((volatile short *)(FPGA3_BASE | 0x1D0))) //General purpose GPIO register -#define F1_Tacho_reg8 (*((volatile short *)(FPGA3_BASE | 0x1E0))) //This Register stores the Tacho counter -#define F1_Tacho_reg9 (*((volatile short *)(FPGA3_BASE | 0x1E2))) //This Register stores the Tacho counter A to A +#define F1_GPO_02_bus (*((volatile short *)(FPGA1_BASE | 0x1D0))) //General purpose GPIO register +#define F1_Tacho_reg8 (*((volatile short *)(FPGA1_BASE | 0x1E0))) //This Register stores the Tacho counter +#define F1_Tacho_reg9 (*((volatile short *)(FPGA1_BASE | 0x1E2))) //This Register stores the Tacho counter A to A // //SPI_MOTO_RLOADING_A1 #define F1_MOTO_RLOADING_A1_TX_00 (*((volatile short *)(FPGA1_BASE | 0x200))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first. diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c index 6d032fe64..6a747ba61 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c @@ -269,15 +269,18 @@ uint8_t test_IO() for(i=0;i<8;i++) { - status |= TCA9534Init(i, &Regs); - status |= TCA9534SetReadInputReg(i); - status |= TCA9534ReadInputReg(i, &Regs); - status |= TCA9534TestRelay(i, &Regs, ENABLE); - status |= TCA9534ByPass(i, &Regs, ENABLE); - Read_Notification_Disp_UP(i, &Regs); - Read_Notification_Disp_Down(i, &Regs); - Read_Notification_Realy_On(i, &Regs); - Read_Notification_Over_Press(i, &Regs); + if(Dispenser_struct[i].Type == DISP_TYPE_EEPROM128KB) + { + status |= TCA9534Init(i, &Regs); + status |= TCA9534SetReadInputReg(i); + status |= TCA9534ReadInputReg(i, &Regs); + status |= TCA9534TestRelay(i, &Regs, ENABLE); + status |= TCA9534ByPass(i, &Regs, ENABLE); + //Read_Notification_Disp_UP(i, &Regs); + //Read_Notification_Disp_Down(i, &Regs); + //Read_Notification_Realy_On(i, &Regs); + //Read_Notification_Over_Press(i, &Regs); + } } return status; diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c index fc3d09402..45aad656f 100644 --- a/Software/Embedded_SW/Embedded/Main.c +++ b/Software/Embedded_SW/Embedded/Main.c @@ -215,6 +215,8 @@ int main(void) // //test_avi(); //example for shai + //Read_Speed_Sensor_TypeII(2,2); + //Test_ADS120_Internal_Temperature_Sensor(0); #ifndef EVALUATION_BOARD diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index 5fe242436..3ccb523c6 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -447,7 +447,7 @@ uint32_t MillisecLoop(uint32_t tick) } uint32_t MillisecLowLoop(uint32_t tick) { - uint8_t Motor_i,Disp_i,Heater_i,temp; + uint8_t Motor_i,Disp_i,Heater_i;//,temp; TEMPERATURE_SENSOR_ID_ENUM Sensor_i; //static int temp=0; diff --git a/Software/Stubs Collection/stubs/NewSpeedSensor.cs b/Software/Stubs Collection/stubs/NewSpeedSensor.cs new file mode 100644 index 000000000..02f8384bc --- /dev/null +++ b/Software/Stubs Collection/stubs/NewSpeedSensor.cs @@ -0,0 +1,45 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs; + +const UInt32 Freq = 29166667;//FPGA Freq + +const UInt32 F1_Tacho_reg9 = 0x1E2;//Time of Tacho / No of clk in one cycle +const UInt32 F1_gpo_cnt_A_reg = 0x3B0;// how many pulses to count +//const Int32 F1_Prescaler1_reg5 = 0x3E8; //OLD FPGA 05.022019 +const UInt32 F1_Prescaler1_reg6 = 0x3EA; //New FPGA + +const UInt32 CNT = 4;//bigger number for resolution +const UInt32 Presc = 2;//Lower number for resolution +UInt32 temp; + +public void OnExecute(StubManager stubManager) +{ + stubManager.Run("StubFpgaWriteRegRequest" ,0x60000000 + F1_Prescaler1_reg6, Presc);//for new FPGA use reg6!! + var response = stubManager.Run("StubFpgaReadRegRequest" ,0x60000000 + F1_Prescaler1_reg6);//for new FPGA use reg6!!! + response = stubManager.Run("StubFpgaReadRegRequest" ,0x60000000 + F1_gpo_cnt_A_reg); + stubManager.Run("StubFpgaWriteRegRequest" ,0x60000000 + F1_gpo_cnt_A_reg, CNT); + response = stubManager.Run("StubFpgaReadRegRequest" ,0x60000000 + F1_gpo_cnt_A_reg); + + for(int i =0;i<1000;i++) + { + response = stubManager.Run("StubFpgaReadRegRequest" ,0x60000000 + F1_Tacho_reg9); + + + temp = (Freq * CNT) /((UInt32)response.Value * Presc); + + stubManager.Write(temp); + stubManager.Write(" Hz, "); + stubManager.WriteHex((response.Value & 0xffff),4); + stubManager.WriteLine(""); + Thread.Sleep(100); //Sleep for 100 milli. + } +} \ No newline at end of file diff --git a/Software/Stubs Collection/stubs/new dispenser card GPIO.cs b/Software/Stubs Collection/stubs/new dispenser card GPIO.cs new file mode 100644 index 000000000..43d0dd76a --- /dev/null +++ b/Software/Stubs Collection/stubs/new dispenser card GPIO.cs @@ -0,0 +1,90 @@ +using System; +using System.Text; +using System.Linq; +using System.Drawing; +using System.Diagnostics; +using System.Windows.Forms; +using System.Threading; +using System.Threading.Tasks; +using System.Collections.Generic; +using Tango.PMR.Stubs; +using Tango.Stubs; + +public void OnExecute(StubManager stubManager) +{ + // Request ---- + // UInt32 : DispenserId + // Boolean : Start --- true for ByPass + // Boolean : SetDirection --- true for TestRelay + // UInt32 : SetMicrostepDivision -- 1 for TestByPassTestRelay + // Int32 : SetSpeed + + // Response ---- + // UInt32 : DispenserId + // UInt32 : DispenserPosition --- MSB for Disp_UP, LSB for Disp_Down + // UInt32 : InkWorningLevel ---- MSB for Realy_On, LSB for Over_Press + // String : Status + // UInt32 : StatusWord + + stubManager.Write("read inputs "); + stubManager.WriteLine(""); + var response = stubManager.Run("StubDispenserRequest" ,3, false, false, 0, 0);//read inputs + stubManager.Write("MSB for Disp_UP, LSB for Disp_Down "); + stubManager.WriteHex((response.DispenserPosition),4); + stubManager.WriteLine(""); + stubManager.Write("MSB for Realy_On, LSB for Over_Press "); + stubManager.WriteHex((response.InkWorningLevel),4); + stubManager.WriteLine(""); + stubManager.WriteLine("----"); + stubManager.WriteLine(""); + + stubManager.Write("TestRelay + read inputs "); + stubManager.WriteLine(""); + response = stubManager.Run("StubDispenserRequest" ,3, false, true, 0, 0);//TestRelay + read inputs + stubManager.Write("MSB for Disp_UP, LSB for Disp_Down "); + stubManager.WriteHex((response.DispenserPosition),4); + stubManager.WriteLine(""); + stubManager.Write("MSB for Realy_On, LSB for Over_Press "); + stubManager.WriteHex((response.InkWorningLevel),4); + stubManager.WriteLine(""); + stubManager.WriteLine("----"); + stubManager.WriteLine(""); + + stubManager.Write("ByPass + TestRelay + read inputs "); + stubManager.WriteLine(""); + response = stubManager.Run("StubDispenserRequest" ,3, true, true, 0, 0);//ByPass + TestRelay + read inputs + stubManager.Write("MSB for Disp_UP, LSB for Disp_Down "); + stubManager.WriteHex((response.DispenserPosition),4); + stubManager.WriteLine(""); + stubManager.Write("MSB for Realy_On, LSB for Over_Press "); + stubManager.WriteHex((response.InkWorningLevel),4); + stubManager.WriteLine(""); + stubManager.WriteLine("----"); + stubManager.WriteLine(""); + + stubManager.Write("Remove ByPass (TestRelay + read inputs) "); + stubManager.WriteLine(""); + response = stubManager.Run("StubDispenserRequest" ,3, false, true, 0, 0);//TestRelay + read inputs + stubManager.Write("MSB for Disp_UP, LSB for Disp_Down "); + stubManager.WriteHex((response.DispenserPosition),4); + stubManager.WriteLine(""); + stubManager.Write("MSB for Realy_On, LSB for Over_Press "); + stubManager.WriteHex((response.InkWorningLevel),4); + stubManager.WriteLine(""); + stubManager.WriteLine("----"); + stubManager.WriteLine(""); + + + stubManager.Write("Rempve TestRelay and read inputs "); + stubManager.WriteLine(""); + response = stubManager.Run("StubDispenserRequest" ,3, false, false, 0, 0);//read input + stubManager.Write("MSB for Disp_UP, LSB for Disp_Down "); + stubManager.WriteHex((response.DispenserPosition),4); + stubManager.WriteLine(""); + stubManager.Write("MSB for Realy_On, LSB for Over_Press "); + stubManager.WriteHex((response.InkWorningLevel),4); + stubManager.WriteLine(""); + stubManager.WriteLine("----"); + stubManager.WriteLine(""); + +} \ No newline at end of file -- cgit v1.3.1 From c8629b193fd4fa38f72905f1c33abe737f81a340 Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Sun, 17 Mar 2019 12:01:28 +0200 Subject: Add default value of No_Safety_Event for I/O in old dispensers --- Software/Embedded_SW/Embedded/DataDef.h | 6 +- .../Dispenser_Card/IO_Ports/Dispenser_IO.c | 298 +++++++++++---------- .../Embedded/Modules/Control/MillisecTask.c | 2 +- 3 files changed, 164 insertions(+), 142 deletions(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/DataDef.h b/Software/Embedded_SW/Embedded/DataDef.h index a85ea7024..66a5aa74f 100644 --- a/Software/Embedded_SW/Embedded/DataDef.h +++ b/Software/Embedded_SW/Embedded/DataDef.h @@ -128,8 +128,7 @@ enum #define DOUBLE_BUFFER 2 -#define No_Safety_Event 1 -#define Safety_Event_Occurred 0 + #define CurrentMotDriver 0x08 #define VoltageMotDriver 0x00 @@ -296,6 +295,9 @@ typedef union #define LIMIT 0 // Limit Switch #define NO_LIMIT 1 +#define No_Safety_Event 1 +#define Safety_Event_Occurred 0 + //#define INVERSION_POLARITY_LIMIT 1 // Limit Switch //#define INVERSION_POLARITY_NO_LIMIT 0 diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c index 6a747ba61..6376228cc 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/IO_Ports/Dispenser_IO.c @@ -19,17 +19,25 @@ uint8_t TCA9534Init(uint8_t Dispenser_ID, TCA9534Regs* Regs)//1 { uint8_t status = PASSED; - uint8_t Write_Buf[2]; + if(Dispenser_struct[Dispenser_ID].Type == DISP_TYPE_EEPROM128KB) + { + uint8_t Write_Buf[2]; + + status |= Select_Dispenser_Mux_Channel(Dispenser_ID); - status |= Select_Dispenser_Mux_Channel(Dispenser_ID); + //Set all GPIO to Input + Regs->Config[Dispenser_ID].Uchar = TCA9534_All_INPUT; - //Set all GPIO to Input - Regs->Config[Dispenser_ID].Uchar = TCA9534_All_INPUT; + Write_Buf[0] = TCA9534_CONFIG_REG; + Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; - Write_Buf[0] = TCA9534_CONFIG_REG; - Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + } - status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + Regs->Input[Dispenser_ID].bit.DISP_UP = No_Safety_Event; + Regs->Input[Dispenser_ID].bit.DISP_DOWN = No_Safety_Event; + Regs->Input[Dispenser_ID].bit.RELAY_ON = No_Safety_Event; + Regs->Input[Dispenser_ID].bit.OVER_PRESS = No_Safety_Event; return status; @@ -40,15 +48,16 @@ uint8_t TCA9534SetReadInputReg(uint8_t Dispenser_ID)//2 set before read { uint8_t status = PASSED; - uint8_t Write_Buf[1]; - - status |= Select_Dispenser_Mux_Channel(Dispenser_ID); - - Write_Buf[0] = TCA9534_INPUT_REG; + if(Dispenser_struct[Dispenser_ID].Type == DISP_TYPE_EEPROM128KB) + { + uint8_t Write_Buf[1]; - status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 1); + status |= Select_Dispenser_Mux_Channel(Dispenser_ID); + Write_Buf[0] = TCA9534_INPUT_REG; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 1); + } return status; } @@ -56,10 +65,12 @@ uint8_t TCA9534ReadInputReg(uint8_t Dispenser_ID, TCA9534Regs* Regs)//3 read { uint8_t status = PASSED; - status |= Select_Dispenser_Mux_Channel(Dispenser_ID); - - status |= I2C_Read(I2C_ID_DISP_MUX, TCA9534_ADDRESS + 1, Regs->Input[Dispenser_ID].Uchar, 1); + if(Dispenser_struct[Dispenser_ID].Type == DISP_TYPE_EEPROM128KB) + { + status |= Select_Dispenser_Mux_Channel(Dispenser_ID); + status |= I2C_Read(I2C_ID_DISP_MUX, TCA9534_ADDRESS + 1, Regs->Input[Dispenser_ID].Uchar, 1); + } return status; } @@ -69,103 +80,106 @@ uint8_t TCA9534TestByPassTestRelay(uint8_t Dispenser_ID, TCA9534Regs* Regs)//Set { uint8_t status = PASSED; - uint8_t Write_Buf[2]; + if(Dispenser_struct[Dispenser_ID].Type == DISP_TYPE_EEPROM128KB) + { - //set Mux to the current dispenser Channel - status |= Select_Dispenser_Mux_Channel(Dispenser_ID); + uint8_t Write_Buf[2]; - //Read the Realay_on pin - TCA9534SetReadInputReg(Dispenser_ID); - TCA9534ReadInputReg(Dispenser_ID, Regs); - if(Regs->Config[Dispenser_ID].bit.RELAY_ON != HIGH) - { - status |= FAILED; - } + //set Mux to the current dispenser Channel + status |= Select_Dispenser_Mux_Channel(Dispenser_ID); + + //Read the Realay_on pin + TCA9534SetReadInputReg(Dispenser_ID); + TCA9534ReadInputReg(Dispenser_ID, Regs); + if(Regs->Config[Dispenser_ID].bit.RELAY_ON != HIGH) + { + status |= FAILED; + } - //Set RELAY_TEST to output: - Regs->Config[Dispenser_ID].bit.RELAY_TEST = TCA9534_OUTPUT; - Write_Buf[0] = TCA9534_CONFIG_REG; - Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; - status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + //Set RELAY_TEST to output: + Regs->Config[Dispenser_ID].bit.RELAY_TEST = TCA9534_OUTPUT; + Write_Buf[0] = TCA9534_CONFIG_REG; + Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); - //Set the test pin to LOW - Regs->Output[Dispenser_ID].bit.RELAY_TEST = LOW; - Write_Buf[0] = TCA9534_OUTPUT_REG; - Write_Buf[1] = Regs->Output[Dispenser_ID].Uchar; - status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + //Set the test pin to LOW + Regs->Output[Dispenser_ID].bit.RELAY_TEST = LOW; + Write_Buf[0] = TCA9534_OUTPUT_REG; + Write_Buf[1] = Regs->Output[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); - //deley - delayms(5); + //deley + delayms(5); - //Read the Realay_on pin - TCA9534SetReadInputReg(Dispenser_ID); - TCA9534ReadInputReg(Dispenser_ID, Regs); - if(Regs->Config[Dispenser_ID].bit.RELAY_ON != LOW) - { - status |= FAILED; - } + //Read the Realay_on pin + TCA9534SetReadInputReg(Dispenser_ID); + TCA9534ReadInputReg(Dispenser_ID, Regs); + if(Regs->Config[Dispenser_ID].bit.RELAY_ON != LOW) + { + status |= FAILED; + } - //---------------------- test ByPass ---------------------- - //Set BYPASS to output: - Regs->Config[Dispenser_ID].bit.BYPASS = TCA9534_OUTPUT; - Write_Buf[0] = TCA9534_CONFIG_REG; - Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; - status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); - - //Set the BYPASS pin to LOW - Regs->Output[Dispenser_ID].bit.BYPASS = LOW; - Write_Buf[0] = TCA9534_OUTPUT_REG; - Write_Buf[1] = Regs->Output[Dispenser_ID].Uchar; - status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); - - //deley - delayms(Relay_Operate_time); - - //Read the Realay_on pin - TCA9534SetReadInputReg(Dispenser_ID); - TCA9534ReadInputReg(Dispenser_ID, Regs); - if(Regs->Config[Dispenser_ID].bit.RELAY_ON != HIGH) - { - status |= FAILED; - } + //---------------------- test ByPass ---------------------- + //Set BYPASS to output: + Regs->Config[Dispenser_ID].bit.BYPASS = TCA9534_OUTPUT; + Write_Buf[0] = TCA9534_CONFIG_REG; + Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); - //Set BYPASS to input: - Regs->Config[Dispenser_ID].bit.BYPASS = TCA9534_INPUT; - Write_Buf[0] = TCA9534_CONFIG_REG; - Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; - status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + //Set the BYPASS pin to LOW + Regs->Output[Dispenser_ID].bit.BYPASS = LOW; + Write_Buf[0] = TCA9534_OUTPUT_REG; + Write_Buf[1] = Regs->Output[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); - //deley - delayms(Relay_Operate_time); + //deley + delayms(Relay_Operate_time); - //Read the Realay_on pin - TCA9534SetReadInputReg(Dispenser_ID); - TCA9534ReadInputReg(Dispenser_ID, Regs); - if(Regs->Config[Dispenser_ID].bit.RELAY_ON != LOW) - { - status |= FAILED; - } + //Read the Realay_on pin + TCA9534SetReadInputReg(Dispenser_ID); + TCA9534ReadInputReg(Dispenser_ID, Regs); + if(Regs->Config[Dispenser_ID].bit.RELAY_ON != HIGH) + { + status |= FAILED; + } - //--------------------------------------------------------- + //Set BYPASS to input: + Regs->Config[Dispenser_ID].bit.BYPASS = TCA9534_INPUT; + Write_Buf[0] = TCA9534_CONFIG_REG; + Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); - //Set RELAY_TEST to input: - Regs->Config[Dispenser_ID].bit.RELAY_TEST = TCA9534_INPUT; - Write_Buf[0] = TCA9534_CONFIG_REG; - Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; - status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + //deley + delayms(Relay_Operate_time); - //deley - delayms(Relay_Operate_time); + //Read the Realay_on pin + TCA9534SetReadInputReg(Dispenser_ID); + TCA9534ReadInputReg(Dispenser_ID, Regs); + if(Regs->Config[Dispenser_ID].bit.RELAY_ON != LOW) + { + status |= FAILED; + } - //Read the Realay_on pin - TCA9534SetReadInputReg(Dispenser_ID); - TCA9534ReadInputReg(Dispenser_ID, Regs); - if(Regs->Config[Dispenser_ID].bit.RELAY_ON != HIGH) - { - status |= FAILED; - } + //--------------------------------------------------------- + + //Set RELAY_TEST to input: + Regs->Config[Dispenser_ID].bit.RELAY_TEST = TCA9534_INPUT; + Write_Buf[0] = TCA9534_CONFIG_REG; + Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + + //deley + delayms(Relay_Operate_time); + //Read the Realay_on pin + TCA9534SetReadInputReg(Dispenser_ID); + TCA9534ReadInputReg(Dispenser_ID, Regs); + if(Regs->Config[Dispenser_ID].bit.RELAY_ON != HIGH) + { + status |= FAILED; + } + } return status; } @@ -174,33 +188,36 @@ uint8_t TCA9534TestRelay(uint8_t Dispenser_ID, TCA9534Regs* Regs, bool EnableTes { uint8_t status = PASSED; - uint8_t Write_Buf[2]; + if(Dispenser_struct[Dispenser_ID].Type == DISP_TYPE_EEPROM128KB) + { - //set Mux to the current dispenser Channel - status |= Select_Dispenser_Mux_Channel(Dispenser_ID); + uint8_t Write_Buf[2]; - if(EnableTestRelay) - { - //Set RELAY_TEST to output: - Regs->Config[Dispenser_ID].bit.RELAY_TEST = TCA9534_OUTPUT; - Write_Buf[0] = TCA9534_CONFIG_REG; - Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; - status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + //set Mux to the current dispenser Channel + status |= Select_Dispenser_Mux_Channel(Dispenser_ID); + if(EnableTestRelay) + { + //Set RELAY_TEST to output: + Regs->Config[Dispenser_ID].bit.RELAY_TEST = TCA9534_OUTPUT; + Write_Buf[0] = TCA9534_CONFIG_REG; + Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + + + //Set the RELAY_TEST pin to LOW + Regs->Output[Dispenser_ID].bit.RELAY_TEST = LOW; + Write_Buf[0] = TCA9534_OUTPUT_REG; + Write_Buf[1] = Regs->Output[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + } - //Set the RELAY_TEST pin to LOW - Regs->Output[Dispenser_ID].bit.RELAY_TEST = LOW; - Write_Buf[0] = TCA9534_OUTPUT_REG; - Write_Buf[1] = Regs->Output[Dispenser_ID].Uchar; + //Set RELAY_TEST to input: + Regs->Config[Dispenser_ID].bit.RELAY_TEST = TCA9534_INPUT; + Write_Buf[0] = TCA9534_CONFIG_REG; + Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); } - - //Set RELAY_TEST to input: - Regs->Config[Dispenser_ID].bit.RELAY_TEST = TCA9534_INPUT; - Write_Buf[0] = TCA9534_CONFIG_REG; - Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; - status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); - return status; } @@ -209,33 +226,36 @@ uint8_t TCA9534ByPass(uint8_t Dispenser_ID, TCA9534Regs* Regs, bool EnableByPass { uint8_t status = PASSED; - uint8_t Write_Buf[2]; + if(Dispenser_struct[Dispenser_ID].Type == DISP_TYPE_EEPROM128KB) + { - //set Mux to the current dispenser Channel - status |= Select_Dispenser_Mux_Channel(Dispenser_ID); + uint8_t Write_Buf[2]; - if(EnableByPass) - { - //Set BYPASS to output: - Regs->Config[Dispenser_ID].bit.BYPASS = TCA9534_OUTPUT; - Write_Buf[0] = TCA9534_CONFIG_REG; - Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; - status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + //set Mux to the current dispenser Channel + status |= Select_Dispenser_Mux_Channel(Dispenser_ID); + if(EnableByPass) + { + //Set BYPASS to output: + Regs->Config[Dispenser_ID].bit.BYPASS = TCA9534_OUTPUT; + Write_Buf[0] = TCA9534_CONFIG_REG; + Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + + + //Set the BYPASS pin to LOW + Regs->Output[Dispenser_ID].bit.BYPASS = LOW; + Write_Buf[0] = TCA9534_OUTPUT_REG; + Write_Buf[1] = Regs->Output[Dispenser_ID].Uchar; + status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); + } - //Set the BYPASS pin to LOW - Regs->Output[Dispenser_ID].bit.BYPASS = LOW; - Write_Buf[0] = TCA9534_OUTPUT_REG; - Write_Buf[1] = Regs->Output[Dispenser_ID].Uchar; + //Set BYPASS to input: + Regs->Config[Dispenser_ID].bit.BYPASS = TCA9534_INPUT; + Write_Buf[0] = TCA9534_CONFIG_REG; + Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); } - - //Set BYPASS to input: - Regs->Config[Dispenser_ID].bit.BYPASS = TCA9534_INPUT; - Write_Buf[0] = TCA9534_CONFIG_REG; - Write_Buf[1] = Regs->Config[Dispenser_ID].Uchar; - status |= I2C_Write(I2C_ID_DISP_MUX, TCA9534_ADDRESS, Write_Buf, 2); - return status; } diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index 59aebd21a..8e4a36e62 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -447,7 +447,7 @@ uint32_t MillisecLoop(uint32_t tick) } uint32_t MillisecLowLoop(uint32_t tick) { - uint8_t Motor_i,Disp_i,Heater_i;//,temp; + uint8_t Motor_i,Disp_i,Heater_i,temp; TEMPERATURE_SENSOR_ID_ENUM Sensor_i; //static int temp=0; -- cgit v1.3.1 From aa9853ff33557531d89d8ce4f2eb196f45b0a591 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Sun, 17 Mar 2019 14:21:22 +0200 Subject: fix heaters error (DC, hot activation) --- .../Embedded/Modules/Heaters/Heaters_print.c | 7 +- .../stubs/technician view files/lp4 Tech Board.tpf | 143 ++++++++++----------- 2 files changed, 77 insertions(+), 73 deletions(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index 3f62fc3b6..230df628b 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -518,7 +518,7 @@ uint32_t PrepareHeater(int HeaterId, uint32_t SetTemperatue) return ERROR; } - //Report("PrepareHeater ", __FILE__,__LINE__,HeaterId, SetTemperatue, 0, 0); + Report("PrepareHeater ", __FILE__,__LINE__,HeaterId, SetTemperatue, 0, 0); //start thread control for all motors HeaterPIDConfig[HeaterId].m_params.MAX = HeaterControl[HeaterId].outputproportionalpowerlimit*100; @@ -699,6 +699,7 @@ uint32_t DcHeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t eadValue) } } DeActivateHeater(index); + HeaterRecalculateHeaterParams(index, 0); HeaterMaxTempFlag[index] = true; //LOG_ERROR ((MinreadValue/100), "Heater Over the max temperature, turned off"); Report("Heater Over the max temperature, turned off",__FILE__,__LINE__,index,RpWarning,HeaterPreviousRead[index], HeaterControl[index].sensormaxvalue); @@ -782,6 +783,8 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) if (readValue > HeaterCmd[index].targettemperatue) { DeActivateHeater(index); + HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain,0); + HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary,0); } return ERROR; } @@ -795,6 +798,8 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) DeActivateHeater(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary); DeActivateHeater(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain); //Heaters OFF until coming into the proportional band + HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain,0); + HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary,0); return OK; } // if (readValue < ((HeaterCmd[index].targettemperatue * (100-HeaterControl[index].outputproportionalband))/100)) diff --git a/Software/Stubs Collection/stubs/technician view files/lp4 Tech Board.tpf b/Software/Stubs Collection/stubs/technician view files/lp4 Tech Board.tpf index 31d4041ee..94d383b94 100644 --- a/Software/Stubs Collection/stubs/technician view files/lp4 Tech Board.tpf +++ b/Software/Stubs Collection/stubs/technician view files/lp4 Tech Board.tpf @@ -26,11 +26,11 @@ 0 D7585119-4A42-4370-8F1E-F3E62553E588 -14774017 - 1 701 0 300 true + 1 ba743caa-95f2-4b20-8c32-8e5943ada3fc @@ -41,9 +41,9 @@ 0 78482AA4-3DF6-421F-944C-64328D3C3EF2 -14774017 + 10 0 70 - 10 true @@ -124,7 +124,7 @@ DryerAirHeater 0 - 23.74 + 23.97 false false true @@ -143,7 +143,7 @@ DryerMainHeater 0 - 77.21 + 24.889999999999997 false false true @@ -162,7 +162,7 @@ DryerSecondaryHeater 0 - -2 + 24.779999999999998 false false true @@ -181,7 +181,7 @@ HeaterZone3 0 - 86.1 + 27.02 false false true @@ -200,7 +200,7 @@ HeaterZone2 0 - 70.73 + 27.279999999999998 false false true @@ -219,7 +219,7 @@ HeaterZone1 0 - 77.05 + 26.299999999999997 false false true @@ -238,7 +238,7 @@ MixerHeater 0 - 49.069999999999993 + 24.419999999999998 false false true @@ -257,7 +257,7 @@ HeaterZone4 0 - 89.149999999999991 + 26.56 false false true @@ -276,7 +276,7 @@ HeaterZone5 0 - 93.05 + 26.97 false false true @@ -295,7 +295,7 @@ HeaterZone6 0 - 77.28 + 26.229999999999997 false false true @@ -421,7 +421,7 @@ 96B89605-F999-43FE-A1CD-2645BFB33A36 -1 10 - 2 + 0 6be024c6-3d1b-4267-9b77-44473aba56b7 @@ -433,7 +433,7 @@ FC60060A-3736-4910-B41A-FF6DABDF0E9E -1 10 - 2 + 0 7c720f3b-00e1-49dd-92f9-fdd1e9686623 @@ -445,7 +445,7 @@ 4CE6A82E-D841-4D33-BBB2-11F0743A441C -1 10 - 2 + 0 3ebd6759-521b-4ed1-a353-ee1ad7801f28 @@ -456,11 +456,11 @@ 0 D126DB23-784B-4F0C-8F88-D89A65A7549F -14774017 - 1 1460 0 16384 true + 1 984b4126-3dda-4624-a79f-0646eb0e1358 @@ -471,11 +471,11 @@ 0 10102BC3-0EAE-47FF-A8E5-8640780CAA3D -14774017 - 1 1516 0 16384 true + 1 8ebc3ab7-a02d-4b12-93b3-2563443831d7 @@ -486,11 +486,11 @@ 0 C0BCCD5C-346B-4C4A-A080-39D28E9E1A0C -14774017 - 1 1398 0 16384 true + 1 acafb268-5e97-4277-8dc8-173250a9e3f8 @@ -501,22 +501,11 @@ 0 9FBC5460-BA59-486B-8D85-BD7D8A959F98 -14774017 - 1 1273 0 100 true - - - 3ccb1485-b0e9-4d36-a931-a1b3865edeaa - 460 - 38.28761061946841 - 267 - 221.90707964601768 - 0 - 08d15ca1-d7d1-460f-8f37-42c37c287cd1 - -1 - 952.3546144121359 + 1 be4cb8d9-b516-4604-a6a5-1638cbc50251 @@ -527,11 +516,11 @@ 0 4CE6A82E-D841-4D33-BBB2-11F0743A441C -14774017 - 1 514 0 100000 true + 1 75b99507-4eba-4b11-b52e-26732d4c5479 @@ -542,11 +531,11 @@ 0 F1DF490B-0577-4FA7-ACA1-0EEF4F934E8F -14774017 - 4 1398 0 100 true + 4 a30e48de-be76-4230-92d0-d27d6f37b940 @@ -557,11 +546,11 @@ 0 5F12B974-2C9E-4DDD-9B20-733251A5D7E6 -14774017 - 4 1398 0 100 true + 4 5ac4b368-093a-4192-98d4-e9d24f229b13 @@ -572,11 +561,11 @@ 0 84CF23C9-D20D-4C08-BE1D-80201FC43C06 -14774017 - 4 1398 0 100 true + 4 9c34dc69-cfaa-48b4-9d02-8f0d9bba79dd @@ -588,6 +577,16 @@ -1 + + b083f678-c5ea-4700-bfa2-ca51ed62cf4b + 480 + 23.300884955752224 + 317 + 192.52212389380532 + 0 + -1 + 20 + @@ -814,9 +813,9 @@ 0 78482AA4-3DF6-421F-944C-64328D3C3EF2 -14774017 + 10 0 70 - 10 true @@ -850,11 +849,11 @@ 0 D023F15D-3555-48E9-A9E9-5DF99F60D791 0 - 1 10 0 100 true + 1 46bdfce3-1c69-45dd-bbe9-582d1ac1e6f2 @@ -1068,7 +1067,7 @@ 167.26548672566202 0 -1 - 40 + 20 92607e12-2dd6-41c9-8f89-f051f386b734 @@ -1170,11 +1169,11 @@ 0 D7585119-4A42-4370-8F1E-F3E62553E588 -14774017 - 2 2962 0 300 true + 2 c4e19f7c-e6e9-4f45-987e-f124456b2529 @@ -1185,11 +1184,11 @@ 0 A8DB1D27-6B25-4FB4-A3F5-46A29BA51955 -14774017 - 3 2817 0 300 true + 3 b8b24455-1c20-417d-bd78-5fe4c7e3d023 @@ -1200,11 +1199,11 @@ 0 6C0C1AB0-3EE9-40D7-8424-A79436FBC804 -14774017 - 2 2982 0 300 true + 2 2129a0cd-454f-4834-8197-3b048bf4b978 @@ -1215,11 +1214,11 @@ 0 098F7CAB-030C-46B0-B2B8-A85AF2253032 -14774017 - 2 2949 0 100 true + 2 892fabb7-01fa-4b39-a19e-a557fafae0ac @@ -1230,11 +1229,11 @@ 0 DACEBF90-E2B4-4CC9-A973-B8B429AA0089 -14774017 - 2 2628 0 300 true + 2 4859974c-7224-42d5-97ca-0e2e549372f5 @@ -1245,11 +1244,11 @@ 0 246C2551-5EFD-48E9-94F6-6313C5E5018F -14774017 - 2 3153 0 300 true + 2 81b78212-14d8-4a66-bf3a-eeea9900e0d6 @@ -1320,11 +1319,11 @@ 0 AFB7B6F7-8FFB-4A7F-B814-04F0C163CAA1 -14774017 - 2 3153 0 300 true + 2 9330a6be-17f1-4ecb-978d-719adf9fec1f @@ -1335,11 +1334,11 @@ 0 9A3877B2-9F98-4A5C-9A93-DECA2836FA8A -14774017 - 2 3153 0 300 true + 2 3228b2ba-83f3-4eb2-a6d2-7200301758a4 @@ -1373,7 +1372,7 @@ HeaterZone4 0 - 89.149999999999991 + 26.56 false false true @@ -1392,7 +1391,7 @@ HeaterZone1 0 - 77.05 + 26.299999999999997 false false true @@ -1411,7 +1410,7 @@ HeaterZone3 0 - 86.1 + 27.02 false false true @@ -1430,7 +1429,7 @@ HeaterZone5 0 - 93.05 + 26.97 false false true @@ -1449,7 +1448,7 @@ MixerHeater 0 - 49.069999999999993 + 24.419999999999998 false false true @@ -1468,7 +1467,7 @@ HeaterZone2 0 - 70.73 + 27.279999999999998 false false true @@ -1487,7 +1486,7 @@ HeaterZone6 0 - 77.28 + 26.229999999999997 false false true @@ -1506,7 +1505,7 @@ DryerAirHeater 0 - 23.74 + 23.97 false false true @@ -1538,11 +1537,11 @@ 0 098F7CAB-030C-46B0-B2B8-A85AF2253032 -14774017 - 1 10 0 100 true + 1 3bf6782d-117d-4589-a1d6-6454b67e3862 @@ -1553,11 +1552,11 @@ 0 6C0C1AB0-3EE9-40D7-8424-A79436FBC804 -14774017 - 1 10 0 300 true + 1 c7a89d21-7383-4caa-941e-b42e1109b16a @@ -1568,11 +1567,11 @@ 0 246C2551-5EFD-48E9-94F6-6313C5E5018F -14774017 - 1 10 0 300 true + 1 4c789472-cb4f-4ede-b22a-c733591117c8 @@ -1586,7 +1585,7 @@ HeaterZone3 0 - 86.1 + 27.02 false false true @@ -1605,7 +1604,7 @@ HeaterZone4 0 - 89.149999999999991 + 26.56 false false true @@ -1624,7 +1623,7 @@ HeaterZone5 0 - 93.05 + 26.97 false false true @@ -1765,9 +1764,9 @@ 0 78482AA4-3DF6-421F-944C-64328D3C3EF2 -14774017 + 10 0 70 - 10 true @@ -1784,11 +1783,11 @@ 0 A499E5E0-A812-4032-8F96-B38C6762C4BD -14774017 - 3 3600 0 100 true + 3 aae29286-81b3-476a-9f58-c0fd246cae96 @@ -1799,11 +1798,11 @@ 0 F33667BD-D9FA-4DC7-BC2C-0E89E60AE4BE -14774017 - 3 3600 0 100 true + 3 7d94c7c4-1288-4f9d-b0e6-a06794829642 @@ -1886,11 +1885,11 @@ 0 1F0F907A-EC16-4386-AFC8-B2B156F2A822 -14774017 - 3 3600 0 100 true + 3 1c254a92-c075-453f-9667-cdcc91cf8e6a @@ -1923,11 +1922,11 @@ 0 6B1DF4B0-BCC2-400C-A3B7-31C5119A55BB -14774017 - 3 3600 0 100 true + 3 0bef6e9d-6da0-4f06-9e1a-c00142bde4c1 @@ -1960,11 +1959,11 @@ 0 19645882-6587-4A50-BD85-AF06617DC654 -14774017 - 3 3600 0 100 true + 3 39f6a02c-c4d9-47d0-b92d-bdea0ed5d3ce @@ -2032,11 +2031,11 @@ 0 96B89605-F999-43FE-A1CD-2645BFB33A36 -14774017 - 1 10 0 100000 true + 1 3d0f66be-0002-403d-8d4b-0d49d85c0570 @@ -2047,11 +2046,11 @@ 0 D126DB23-784B-4F0C-8F88-D89A65A7549F -14774017 - 1 10 0 16384 true + 1 6ce9bf4a-e710-4bc6-bcc1-e8055b77530c @@ -2062,11 +2061,11 @@ 0 FC60060A-3736-4910-B41A-FF6DABDF0E9E -14774017 - 1 10 0 100000 true + 1 da0aa379-4643-40cb-b990-45574e5545df @@ -2077,11 +2076,11 @@ 0 10102BC3-0EAE-47FF-A8E5-8640780CAA3D -14774017 - 1 10 0 16384 true + 1 09b31ecb-8eaf-4c70-8057-1a11b5f10bad @@ -2092,11 +2091,11 @@ 0 89B7B89D-8050-4188-B568-35B1910CFB6F -14774017 - 1 10 0 100000 true + 1 2a970ff9-b593-4df4-977f-7d29ce25d0c6 @@ -2107,11 +2106,11 @@ 0 84CF23C9-D20D-4C08-BE1D-80201FC43C06 -14774017 - 1 10 0 100 true + 1 eebe8aa9-cff0-45ef-b1dd-d71cbe3b2947 @@ -2158,5 +2157,5 @@ - 2 + 1 \ No newline at end of file -- cgit v1.3.1 From a1be0b0db7f8284cac6a9b5c3aecd1c9968c82ce Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Sun, 17 Mar 2019 14:31:59 +0200 Subject: cancel heaters activation upon parameters push --- Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index 230df628b..8b9db2126 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -385,7 +385,7 @@ uint32_t HeaterCommandRequestMessage(int HeaterId, bool OnOff, int Temperature) PrepareHeater(HeaterId,Temperature); //prepare the heaters control info //set the power balance handler (if not set yet) // if the heater is off (?) start it. - ActivateHeater(HeaterId); + //ActivateHeater(HeaterId); //set the heater operation mode to fast heating - depended on the current temperature // timers are prepared but not started yet!!! only when the system is hot. -- cgit v1.3.1 From f391e8a7f63273f6b11142b6d57520a132318b17 Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Sun, 17 Mar 2019 17:34:59 +0200 Subject: Add function to read the new speed sensor (Yoav's) --- Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c | 36 +++++++++++------------ Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.h | 3 +- Software/Embedded_SW/Embedded/Main.c | 3 +- 3 files changed, 21 insertions(+), 21 deletions(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c index b5525252c..f68485881 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c @@ -398,31 +398,29 @@ void Machine_Idle_Breathing_Led() //if (Ten_msTick) } } +///////////////////////////////////////// Speed_Sensor_TypeII //////////////////////////////////////////////// +void Set_Speed_Sensor_TypeII_Registers(uint32_t Counter, uint32_t Prescaler) +{ + /* Counter - Increase the number to higher resolution * + * Prescaler - Deccrease the number to higher resolution*/ + F1_Prescaler1_reg6 = Prescaler; + F1_gpo_cnt_A_reg = Counter; +} -uint32_t Read_Speed_Sensor_TypeII(uint32_t Counter, uint32_t Prescaler) -/* Counter - Increase the number to higher resolution * - * Prescaler - Deccrease the number to higher resolution*/ +uint32_t Read_Speed_Sensor_TypeII()//must be delay between Set_Speed_Sensor_TypeII_Registers to Read_Speed_Sensor_TypeII { - uint32_t Speed_Hz; + uint32_t Speed_Hz, temp, temp1; - F1_Prescaler1_reg6 = Prescaler; - F1_gpo_cnt_A_reg = Counter; + temp = F1_Tacho_reg9; + temp1 = FPGA_Freq; + temp1*=F1_gpo_cnt_A_reg; + temp1/=temp; + temp1/=F1_Prescaler1_reg6; + Speed_Hz = temp1; - uint32_t i,temp,temp1; - for(i = 0 ; i< 10000; i++) - { - temp = F1_Tacho_reg9; - temp1 = FPGA_Freq; - temp1*=Counter; - temp1/=temp; - temp1/=Prescaler; - Speed_Hz = temp1; - //Speed_Hz = (FPGA_Freq * Counter) /(temp * Prescaler); - delayms(100); - } #warning change the speed from Hz to Cm/Sec return Speed_Hz; } - +///////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.h b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.h index c3c427933..0e5cdb66a 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.h +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.h @@ -15,7 +15,8 @@ void Control_Dryer_Fan_PWM(uint8_t PWM_Command_Precent); void Machine_Idle_Breathing_Led(); uint32_t Read_Dryer_Fan_Tacho(); -uint32_t Read_Speed_Sensor_TypeII(uint32_t Counter, uint32_t Prescaler); +void Set_Speed_Sensor_TypeII_Registers(uint32_t Counter, uint32_t Prescaler); +uint32_t Read_Speed_Sensor_TypeII(); #endif //FPGA_H diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c index 45aad656f..dabbf190f 100644 --- a/Software/Embedded_SW/Embedded/Main.c +++ b/Software/Embedded_SW/Embedded/Main.c @@ -215,7 +215,8 @@ int main(void) // //test_avi(); //example for shai - //Read_Speed_Sensor_TypeII(2,2); + Set_Speed_Sensor_TypeII_Registers(2,2); + //Read_Speed_Sensor_TypeII();//must be delay between Set_Speed_Sensor_TypeII_Registers to Read_Speed_Sensor_TypeII //Test_ADS120_Internal_Temperature_Sensor(0); -- cgit v1.3.1 From 24c7331c6b658f076960a2862b06dcbec3e03b76 Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Mon, 18 Mar 2019 10:42:59 +0200 Subject: fix typo + add global index for vme file --- .../Embedded/Drivers/FPGA/Moters_Driver/L6470.c | 705 --------------------- .../Embedded/Drivers/FPGA/Moters_Driver/L6470.h | 341 ---------- .../Drivers/FPGA/Moters_Driver/PowerSTEP01.h | 168 ----- .../Embedded/Drivers/FPGA/Motors_Driver/L6470.c | 705 +++++++++++++++++++++ .../Embedded/Drivers/FPGA/Motors_Driver/L6470.h | 341 ++++++++++ .../Drivers/FPGA/Motors_Driver/PowerSTEP01.h | 168 +++++ 6 files changed, 1214 insertions(+), 1214 deletions(-) delete mode 100644 Software/Embedded_SW/Embedded/Drivers/FPGA/Moters_Driver/L6470.c delete mode 100644 Software/Embedded_SW/Embedded/Drivers/FPGA/Moters_Driver/L6470.h delete mode 100644 Software/Embedded_SW/Embedded/Drivers/FPGA/Moters_Driver/PowerSTEP01.h create mode 100644 Software/Embedded_SW/Embedded/Drivers/FPGA/Motors_Driver/L6470.c create mode 100644 Software/Embedded_SW/Embedded/Drivers/FPGA/Motors_Driver/L6470.h create mode 100644 Software/Embedded_SW/Embedded/Drivers/FPGA/Motors_Driver/PowerSTEP01.h (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/Moters_Driver/L6470.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/Moters_Driver/L6470.c deleted file mode 100644 index cd0b09b93..000000000 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/Moters_Driver/L6470.c +++ /dev/null @@ -1,705 +0,0 @@ -/* -* cL6470.cpp -* -* Created: 6/22/2016 8:41:00 PM -* Author: Atif -*/ -//#include "graphics_adapter.h" -//#include "Embedded/include.h" -#include -#include -#include -#include "drivers/SPI/SPI_Comm.h" -#include "inc/hw_memmap.h" - - - - - -////////////// -//#include "stdafx.h" -#include "L6470.h" -//#include "FPGA_Comm.h" -// To use time library of C -#include - -//int volatile * const MOSI_Reg = (int *)MOSI_BASE; -//int volatile * const MISO_Reg = (int *)MISO_BASE; -//int volatile * const CS_Reg = (int *)CS_BASE; -//int volatile * const CLK_Reg = (int *)CLK_BASE; -//int volatile * const BUSY_Reg = (int *)BUSY_BASE; -//int volatile * const RESET_Reg = (int *)RESET_BASE; -//char volatile * const TX_Reg = (char *)TX_BASE; -//char volatile * const RX_Reg = (char *)RX_BASE; - - - - -//void cL6470(int MOSI, int MISO, int CS, int CLK, int BUSY, int RESET) -//{ -// _Set_MISO(MISO); -// _Set_MOSI(MOSI); -// _Set_CS(CS); -// _Set_CLK(CLK); -// _Set_BUSY(BUSY); -// _Set_RESET(RESET); -// -//} -/* -void delay(int number_of_seconds) -{ - // Converting time into milli_seconds - int milli_seconds = 1000 * number_of_seconds; - - // Stroing start time - clock_t start_time = clock(); - - // looping till required time is not acheived - while (clock() < start_time + milli_seconds); -} -*/ - -/* -void init() -{ - //pinMode(_CS, OUTPUT); - //digitalWrite(_CS, HIGH); - L6470_CS = HIGH; - //pinMode(_MOSI, OUTPUT); - //pinMode(_MISO, INPUT); - //pinMode(_CLK, OUTPUT); - //pinMode(_BUSY, INPUT); - //pinMode(_RESET, OUTPUT); - - //digitalWrite(_RESET, HIGH); - L6470_RESET = HIGH; - //AVI : TODO add deley - delay(1); - //digitalWrite(_RESET, LOW); - L6470_RESET = LOW; - delay(1); - //digitalWrite(_RESET, HIGH); - L6470_RESET = HIGH; - delay(1); - - //SPI.begin(); - //SPI.setBitOrder(MSBFIRST); - //SPI.setClockDivider(SPI_CLOCK_DIV16); // or 2, 8, 16, 32, 64 - //SPI.setDataMode(SPI_MODE3); -} -*/ - -void SetParam(byte param, unsigned long value) -{ - Data_To_Transfer(x_SET_PARAM | param); - ParamHandler(param, value); -} - - -unsigned long GetParam(byte param) -{ - Data_To_Transfer(x_GET_PARAM | param); - return ParamHandler(param, 0); -} - -// Enable or disable the low-speed optimization option. If enabling, -// the other 12 bits of -void SetLSPDOpt(boolean enable) -{ - Data_To_Transfer(x_SET_PARAM | x_MIN_SPEED); - - if (enable) - Param(0x1000, 13); - else - Param(0, 13); -} - -// RUN sets the motor spinning in a direction (defined by the constants -// FWD and REV). Maximum speed and minimum speed are defined -// by the MAX_SPEED and MIN_SPEED registers; exceeding the FS_SPD value -// will switch the device into full-step mode. -// The SpdCalc() function is provided to convert steps/s values into -// appropriate integer values for this function. -void Run(byte dir, unsigned long spd) -{ - Data_To_Transfer(x_RUN | dir); - if (spd > 0xFFFFF) spd = 0xFFFFF; - Data_To_Transfer((byte)((spd >> 16)&0xFF)); - Data_To_Transfer((byte)((spd >> 8)&0xFF)); - Data_To_Transfer((byte)((spd)&0xFF)); -} -byte Write_Byte(uint8_t WByte); -void Run_tx_test(byte dir, unsigned long spd) -{ - uint32_t temp = 0; - uint32_t rx = 0; - - temp = Write_Byte(x_RUN | dir); - rx |= (temp & 0xFF) << 24; - - temp = Write_Byte((spd >> 16)&0xFF); - rx |= (temp & 0xFF) << 16; - - temp = Write_Byte((spd >> 8)&0xFF); - rx |= (temp & 0xFF) << 8; - - temp = Write_Byte((spd)&0xFF); - rx |= temp & 0xFF; - - //return rx; -} - -// STEP_CLOCK puts the device in external step clocking mode. When active, -// pin 25, STCK, becomes the step clock for the device, and steps it in -// the direction (set by the FWD and REV constants) imposed by the call -// of this function. Motion commands (RUN, MOVE, etc) will cause the device -// to exit step clocking mode. -void Step_Clock(byte dir) -{ - Data_To_Transfer(x_STEP_CLOCK | dir); -} - -// MOVE will send the motor n_step steps (size based on step mode) in the -// direction imposed by dir (FWD or REV constants may be used). The motor -// will accelerate according the acceleration and deceleration curves, and -// will run at MAX_SPEED. Stepping mode will adhere to FS_SPD value, as well. -void Move(byte dir, unsigned long n_step) -{ - Data_To_Transfer(x_MOVE | dir); - if (n_step > 0x3FFFFF) n_step = 0x3FFFFF; - Data_To_Transfer((byte)(n_step >> 16)); - Data_To_Transfer((byte)(n_step >> 8)); - Data_To_Transfer((byte)(n_step)); -} - -// GOTO operates much like MOVE, except it produces absolute motion instead -// of relative motion. The motor will be moved to the indicated position -// in the shortest possible fashion. -void GoTo(unsigned long pos) -{ - - Data_To_Transfer(x_GOTO); - if (pos > 0x3FFFFF) pos = 0x3FFFFF; - Data_To_Transfer((byte)(pos >> 16)); - Data_To_Transfer((byte)(pos >> 8)); - Data_To_Transfer((byte)(pos)); -} - -// Same as GOTO, but with user constrained rotational direction. -void GoTo_DIR(byte dir, unsigned long pos) -{ - - Data_To_Transfer(x_GOTO_DIR); - if (pos > 0x3FFFFF) pos = 0x3FFFFF; - Data_To_Transfer((byte)(pos >> 16)); - Data_To_Transfer((byte)(pos >> 8)); - Data_To_Transfer((byte)(pos)); -} - -// GoUntil will set the motor running with direction dir (REV or -// FWD) until a falling edge is detected on the SW pin. Depending -// on bit SW_MODE in CONFIG, either a hard stop or a soft stop is -// performed at the falling edge, and depending on the value of -// act (either RESET or COPY) the value in the ABS_POS register is -// either RESET to 0 or COPY-ed into the MARK register. -void GoUntil(byte act, byte dir, unsigned long spd) -{ - Data_To_Transfer(x_GO_UNTIL | act | dir); - if (spd > 0x3FFFFF) spd = 0x3FFFFF; - Data_To_Transfer((byte)(spd >> 16)); - Data_To_Transfer((byte)(spd >> 8)); - Data_To_Transfer((byte)(spd)); -} - -// Similar in nature to GoUntil, ReleaseSW produces motion at the -// higher of two speeds: the value in MIN_SPEED or 5 steps/s. -// The motor continues to run at this speed until a rising edge -// is detected on the switch input, then a hard stop is performed -// and the ABS_POS register is either COPY-ed into MARK or RESET to -// 0, depending on whether RESET or COPY was passed to the function -// for act. -void ReleaseSW(byte act, byte dir) -{ - Data_To_Transfer(x_RELEASE_SW | act | dir); -} - -// GoHome is equivalent to GoTo(0), but requires less time to send. -// Note that no direction is provided; motion occurs through shortest -// path. If a direction is required, use GoTo_DIR(). -void GoHome() -{ - Data_To_Transfer(x_GO_HOME); -} - -// GoMark is equivalent to GoTo(MARK), but requires less time to send. -// Note that no direction is provided; motion occurs through shortest -// path. If a direction is required, use GoTo_DIR(). -void GoMark() -{ - Data_To_Transfer(x_GO_MARK); -} - -// Sets the ABS_POS register to 0, effectively declaring the current -// position to be "HOME". -void ResetPos() -{ - byte value = x_RESET_POS; - Data_To_Transfer(value); -} - -// Reset device to power up conditions. Equivalent to toggling the STBY -// pin or cycling power. -void ResetDev() -{ - byte value = x_RESET_DEVICE; - Data_To_Transfer(value); -} - -// Bring the motor to a halt using the deceleration curve. -void SoftStop() -{ - byte value = x_SOFT_STOP; - Data_To_Transfer(value); -} - -// Stop the motor with infinite deceleration. -void HardStop() -{ - byte value = x_HARD_STOP; - Data_To_Transfer(value); -} - -// Decelerate the motor and put the bridges in Hi-Z state. -void SoftHiZ() -{ - byte value = x_SOFT_HIZ; - Data_To_Transfer(value); -} - -// Put the bridges in Hi-Z state immediately with no deceleration. -void HardHiZ() -{ - byte value = x_HARD_HIZ; - Data_To_Transfer(value); -} - -// Fetch and return the 16-bit value in the STATUS register. Resets -// any warning flags and exits any error states. Using GetParam() -// to read STATUS does not clear these values. -int GetStatus() -{ - int temp = 0; - Data_To_Transfer(x_GET_STATUS); - temp = Data_To_Transfer(0) << 8; - temp |= Data_To_Transfer(0); - return temp; -} - - - - -unsigned long AccCalc(float stepsPerSecPerSec) -{ - float temp = (float)(stepsPerSecPerSec * 0.137438); - if ( ((unsigned long) ( (long)(temp) )) > 0x00000FFF ) - return 0x00000FFF; - else return (unsigned long) (long)(temp); -} - -// The calculation for DEC is the same as for ACC. Value is 0x08A on boot. -// This is a 12-bit value, so we need to make sure the value is at or below 0xFFF. -unsigned long DecCalc(float stepsPerSecPerSec) -{ - float temp = (float)(stepsPerSecPerSec * 0.137438); - if ((unsigned long) (long)(temp) > 0x00000FFF) return 0x00000FFF; - else return (unsigned long) (long)(temp); -} - -// The value in the MAX_SPD register is [(steps/s)*(tick)]/(2^-18) where tick is -// 250ns (datasheet value)- 0x041 on boot. -// Multiply desired steps/s by .065536 to get an appropriate value for this register -// This is a 10-bit value, so we need to make sure it remains at or below 0x3FF -unsigned long MaxSpdCalc(float stepsPerSec) -{ - float temp = (float)(stepsPerSec * .065536); - if ((unsigned long) (long)(temp) > 0x000003FF) return 0x000003FF; - else return (unsigned long) (long)(temp); -} - -// The value in the MIN_SPD register is [(steps/s)*(tick)]/(2^-24) where tick is -// 250ns (datasheet value)- 0x000 on boot. -// Multiply desired steps/s by 4.1943 to get an appropriate value for this register -// This is a 12-bit value, so we need to make sure the value is at or below 0xFFF. -unsigned long MinSpdCalc(float stepsPerSec) -{ - float temp = (float)(stepsPerSec * 4.1943); - if ((unsigned long) (long)(temp) > 0x00000FFF) return 0x00000FFF; - else return (unsigned long) (long)(temp); -} - -// The value in the FS_SPD register is ([(steps/s)*(tick)]/(2^-18))-0.5 where tick is -// 250ns (datasheet value)- 0x027 on boot. -// Multiply desired steps/s by .065536 and subtract .5 to get an appropriate value for this register -// This is a 10-bit value, so we need to make sure the value is at or below 0x3FF. -unsigned long FSCalc(float stepsPerSec) -{ - float temp = (float)((stepsPerSec * .065536) - .5); - if ((unsigned long) (long)(temp) > 0x000003FF) return 0x000003FF; - else return (unsigned long) (long)(temp); -} - -// The value in the INT_SPD register is [(steps/s)*(tick)]/(2^-24) where tick is -// 250ns (datasheet value)- 0x408 on boot. -// Multiply desired steps/s by 4.1943 to get an appropriate value for this register -// This is a 14-bit value, so we need to make sure the value is at or below 0x3FFF. -unsigned long IntSpdCalc(float stepsPerSec) -{ - float temp = (float)(stepsPerSec * 4.1943); - if ((unsigned long) (long)(temp) > 0x00003FFF) return 0x00003FFF; - else return (unsigned long) (long)(temp); -} - -// When issuing RUN command, the 20-bit speed is [(steps/s)*(tick)]/(2^-28) where tick is -// 250ns (datasheet value). -// Multiply desired steps/s by 67.106 to get an appropriate value for this register -// This is a 20-bit value, so we need to make sure the value is at or below 0xFFFFF. -uint32_t SpdCalc(float stepsPerSec)// for run request -{ -// float temp = (float)(stepsPerSec * 67.106); -// if ((unsigned long) (long)(temp) > 0x000FFFFF) return 0x000FFFFF; -// else return (unsigned long)temp; - - uint32_t temp = 67108 * stepsPerSec; - uint32_t stepspertick = temp/1000 ; - if(stepspertick > 0xFFFFF) - stepspertick = 0xFFFFF; - return stepspertick; -} -float CurrentSpdCalc(uint32_t stepspertick)// for Speed response -{ -// float temp = (float)(stepspertick); -// float stepsPerSec = (float)(temp / 67.106); -// if(stepsPerSec>15625) stepsPerSec = 15625; - float temp = (float)(stepspertick *1000); - float stepsPerSec = (float)(temp/67108.0); - if(stepsPerSec>15625.0) stepsPerSec = 15625.0; // The available range is from 0 to 15625 step/s - - return stepsPerSec; -} - - - -// This simple function shifts a byte out over SPI and receives a byte over -// SPI. Unusually for SPI devices, the x requires a toggling of the -// CS (slaveSelect) pin after each byte sent. That makes this function -// a bit more reasonable, because we can include more functionality in it. -byte Data_To_Transfer(byte data) -{ - - //while(SSIBusy(SSI2_BASE)){}; - //while(Check_SPI_Busy() == BUSY){}; - - byte data_out = 0; - /* - //digitalWrite(_CS, LOW); - L6470_CS = LOW; - //data_out = SPI.transfer(data); - L6470_TX = data; - data_out = L6470_RX; - - //digitalWrite(_CS, HIGH); - L6470_CS = HIGH; - return data_out; - */ - - data_out = Transfer_tx(data/*, &data_out*/ ); - return data_out; -} - - -// the register will be automatically zero. -// When disabling, the value will have to be explicitly written by -// the user with a SetParam() call. See the datasheet for further -// information about low-speed optimization.// Much of the functionality between "get parameter" and "set parameter" is -// very similar, so we deal with that by putting all of it in one function -// here to save memory space and simplify the program. -unsigned long ParamHandler(byte param, unsigned long value) -{ - unsigned long ret_val = 0; // This is a temp for the value to return. - // This switch structure handles the appropriate action for each register. - // This is necessary since not all registers are of the same length, either - // bit-wise or byte-wise, so we want to make sure we mask out any spurious - // bits and do the right number of transfers. That is handled by the x_Param() - // function, in most cases, but for 1-byte or smaller transfers, we call - // Data_To_Transfer() directly. - switch (param) - { - // ABS_POS is the current absolute offset from home. It is a 22 bit number expressed - // in two's complement. At power up, this value is 0. It cannot be written when - // the motor is running, but at any other time, it can be updated to change the - // interpreted position of the motor. - case x_ABS_POS: - ret_val = Param(value, 22); - break; - // EL_POS is the current electrical position in the step generation cycle. It can - // be set when the motor is not in motion. Value is 0 on power up. - case x_EL_POS: - ret_val = Param(value, 9); - break; - // MARK is a second position other than 0 that the motor can be told to go to. As - // with ABS_POS, it is 22-bit two's complement. Value is 0 on power up. - case x_MARK: - ret_val = Param(value, 22); - break; - // SPEED contains information about the current speed. It is read-only. It does - // NOT provide direction information. - case x_SPEED: - ret_val = Param(0, 32); - break; - // ACC and DEC set the acceleration and deceleration rates. Set ACC to 0xFFF - // to get infinite acceleration/decelaeration- there is no way to get infinite - // deceleration w/o infinite acceleration (except the HARD STOP command). - // Cannot be written while motor is running. Both default to 0x08A on power up. - // AccCalc() and DecCalc() functions exist to convert steps/s/s values into - // 12-bit values for these two registers. - case x_ACC: - ret_val = Param(value, 12); - break; - case x_DEC: - ret_val = Param(value, 12); - break; - // MAX_SPEED is just what it says- any command which attempts to set the speed - // of the motor above this value will simply cause the motor to turn at this - // speed. Value is 0x041 on power up. - // MaxSpdCalc() function exists to convert steps/s value into a 10-bit value - // for this register. - case x_MAX_SPEED: - ret_val = Param(value, 10); - break; - // MIN_SPEED controls two things- the activation of the low-speed optimization - // feature and the lowest speed the motor will be allowed to operate at. LSPD_OPT - // is the 13th bit, and when it is set, the minimum allowed speed is automatically - // set to zero. This value is 0 on startup. - // MinSpdCalc() function exists to convert steps/s value into a 12-bit value for this - // register. SetLSPDOpt() function exists to enable/disable the optimization feature. - case x_MIN_SPEED: - ret_val = Param(value, 12); - break; - // FS_SPD register contains a threshold value above which microstepping is disabled - // and the x operates in full-step mode. Defaults to 0x027 on power up. - // FSCalc() function exists to convert steps/s value into 10-bit integer for this - // register. - case x_FS_SPD: - ret_val = Param(value, 10); - break; - // KVAL is the maximum voltage of the PWM outputs. These 8-bit values are ratiometric - // representations: 255 for full output voltage, 128 for half, etc. Default is 0x29. - // The implications of different KVAL settings is too complex to dig into here, but - // it will usually work to max the value for RUN, ACC, and DEC. Maxing the value for - // HOLD may result in excessive power dissipation when the motor is not running. - case x_KVAL_HOLD: - ret_val = Data_To_Transfer((byte)value); - break; - case x_KVAL_RUN: - ret_val = Data_To_Transfer((byte)value); - break; - case x_KVAL_ACC: - ret_val = Data_To_Transfer((byte)value); - break; - case x_KVAL_DEC: - ret_val = Data_To_Transfer((byte)value); - break; - // INT_SPD, ST_SLP, FN_SLP_ACC and FN_SLP_DEC are all related to the back EMF - // compensation functionality. Please see the datasheet for details of this - // function- it is too complex to discuss here. Default values seem to work - // well enough. - case x_INT_SPD: - ret_val = Param(value, 14); - break; - case x_ST_SLP: - ret_val = Data_To_Transfer((byte)value); - break; - case x_FN_SLP_ACC: - ret_val = Data_To_Transfer((byte)value); - break; - case x_FN_SLP_DEC: - ret_val = Data_To_Transfer((byte)value); - break; - // K_THERM is motor winding thermal drift compensation. Please see the datasheet - // for full details on operation- the default value should be okay for most users. - case x_K_THERM: - ret_val = Data_To_Transfer((byte)value & 0x0F); - break; - // ADC_OUT is a read-only register containing the result of the ADC measurements. - // This is less useful than it sounds; see the datasheet for more information. - case x_ADC_OUT: - ret_val = Data_To_Transfer(0); - break; - // Set the overcurrent threshold. Ranges from 375mA to 6A in steps of 375mA. - // A set of defined constants is provided for the user's convenience. Default - // value is 3.375A- 0x08. This is a 4-bit value. - case x_OCD_TH: - ret_val = Data_To_Transfer((byte)value & 0x0F); - break; - // Stall current threshold. Defaults to 0x40, or 2.03A. Value is from 31.25mA to - // 4A in 31.25mA steps. This is a 7-bit value. - case x_STALL_TH: - ret_val = Data_To_Transfer((byte)value & 0x7F); - break; - // STEP_MODE controls the microstepping settings, as well as the generation of an - // output signal from the x. Bits 2:0 control the number of microsteps per - // step the part will generate. Bit 7 controls whether the BUSY/SYNC pin outputs - // a BUSY signal or a step synchronization signal. Bits 6:4 control the frequency - // of the output signal relative to the full-step frequency; see datasheet for - // that relationship as it is too complex to reproduce here. - // Most likely, only the microsteps per step value will be needed; there is a set - // of constants provided for ease of use of these values. - case x_STEP_MODE: - ret_val = Data_To_Transfer((byte)value); - break; - // ALARM_EN controls which alarms will cause the FLAG pin to fall. A set of constants - // is provided to make this easy to interpret. By default, ALL alarms will trigger the - // FLAG pin. - case x_ALARM_EN: - ret_val = Data_To_Transfer((byte)value); - break; - // CONFIG contains some assorted configuration bits and fields. A fairly comprehensive - // set of reasonably self-explanatory constants is provided, but users should refer - // to the datasheet before modifying the contents of this register to be certain they - // understand the implications of their modifications. Value on boot is 0x2E88; this - // can be a useful way to verify proper start up and operation of the x chip. - case x_CONFIG: - ret_val = Param(value, 16); - break; - // STATUS contains read-only information about the current condition of the chip. A - // comprehensive set of constants for masking and testing this register is provided, but - // users should refer to the datasheet to ensure that they fully understand each one of - // the bits in the register. - case x_STATUS: // STATUS is a read-only register - ret_val = Param(0, 16); - break; - default: - ret_val = Data_To_Transfer((byte)(value)); - break; - } - return ret_val; -} - -// Generalization of the subsections of the register read/write functionality. -// We want the end user to just write the value without worrying about length, -// so we pass a bit length parameter from the calling function. -unsigned long Param(unsigned long value, byte bit_len) -{ - unsigned long ret_val = 0; // We'll return this to generalize this function - // for both read and write of registers. - byte byte_len = bit_len / 8; // How many BYTES do we have? - if (bit_len % 8 > 0) byte_len++; // Make sure not to lose any partial byte values. - // Let's make sure our value has no spurious bits set, and if the value was too - // high, max it out. - unsigned long mask = 0xffffffff >> (32 - bit_len); - if (value > mask) - value = mask; - // The following three if statements handle the various possible byte length - // transfers- it'll be no less than 1 but no more than 3 bytes of data. - // Data_To_Transfer() sends a byte out through SPI and returns a byte received - // over SPI- when calling it, we typecast a shifted version of the masked - // value, then we shift the received value back by the same amount and - // store it until return time. - if (byte_len == 3) { - ret_val |= Data_To_Transfer((byte)(value >> 16)) << 16; - //Serial.println(ret_val, HEX); - } - if (byte_len >= 2) { - ret_val |= Data_To_Transfer((byte)(value >> 8)) << 8; - //Serial.println(ret_val, HEX); - } - if (byte_len >= 1) { - //Serial.print("Value = "); - //Serial.println(value); - //Serial.print("ret_val = "); - //Serial.println(ret_val); - - ret_val |= Data_To_Transfer((byte)value); - - //Serial.print("ret_val = "); - //Serial.println(ret_val); - - //Serial.println(ret_val, HEX); - } - // Return the received values. Mask off any unnecessary bits, just for - // the sake of thoroughness- we don't EXPECT to see anything outside - // the bit length range but better to be safe than sorry. - return (ret_val & mask); -} - -// This simple function shifts a byte out over SPI and receives a byte over -// SPI. Unusually for SPI devices, the x requires a toggling of the -// CS (slaveSelect) pin after each byte sent. That makes this function -// a bit more reasonable, because we can include more functionality in it. - -// -//void Set_MOSI(int MOSI) -// -//{ -// _MOSI = MOSI; -//} -// -//void Set_MISO(int MISO) -// -//{ -// _MISO = MISO; -//} -// -//void Set_CS(int CS) -// -//{ -// _CS = CS; -//} -// -//void Set_CLK(int CLK) -// -//{ -// _CLK = CLK; -//} -// -//void Set_BUSY(int BUSY) -// -//{ -// _BUSY = BUSY; -//} -// -//void Set_RESET(int RESET) -// -//{ -// _RESET = RESET; -//} -// -//int Get_MOSI() -//{ -// return MOSI; -//} -// -//int Get_MISO() -//{ -// return MISO; -//} -// -//int Get_CS() -//{ -// return CS; -//} -//int Get_CLK() -//{ -// return CLK; -//} -// -//int Get_BUSY() -//{ -// return BUSY; -//} -//int Get_RESET() -//{ -// return RESET; -//} - - diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/Moters_Driver/L6470.h b/Software/Embedded_SW/Embedded/Drivers/FPGA/Moters_Driver/L6470.h deleted file mode 100644 index 745a7f753..000000000 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/Moters_Driver/L6470.h +++ /dev/null @@ -1,341 +0,0 @@ -/* -* cL6470.h -* -* Created: 6/22/2016 8:40:34 PM -* Author: Atif -*/ - - -#ifndef CL6470_H_ -#define CL6470_H_ - -//#include -//#include - -// - -// - -// constant definitions for overcurrent thresholds. Write these values to -// register x_OCD_TH to set the level at which an overcurrent even occurs. -#define x_OCD_TH_375mA 0x00 -#define x_OCD_TH_750mA 0x01 -#define x_OCD_TH_1125mA 0x02 -#define x_OCD_TH_1500mA 0x03 -#define x_OCD_TH_1875mA 0x04 -#define x_OCD_TH_2250mA 0x05 -#define x_OCD_TH_2625mA 0x06 -#define x_OCD_TH_3000mA 0x07 -#define x_OCD_TH_3375mA 0x08 -#define x_OCD_TH_3750mA 0x09 -#define x_OCD_TH_4125mA 0x0A -#define x_OCD_TH_4500mA 0x0B -#define x_OCD_TH_4875mA 0x0C -#define x_OCD_TH_5250mA 0x0D -#define x_OCD_TH_5625mA 0x0E -#define x_OCD_TH_6000mA 0x0F - -// STEP_MODE option values. -// First comes the "microsteps per step" options... -#define x_STEP_MODE_STEP_SEL 0x07 // Mask for these bits only. -#define x_STEP_SEL_1 0x00 -#define x_STEP_SEL_1_2 0x01 -#define x_STEP_SEL_1_4 0x02 -#define x_STEP_SEL_1_8 0x03 -#define x_STEP_SEL_1_16 0x04 -#define x_STEP_SEL_1_32 0x05 -#define x_STEP_SEL_1_64 0x06 -#define x_STEP_SEL_1_128 0x07 - -// ...next, define the SYNC_EN bit. When set, the BUSYN pin will instead -// output a clock related to the full-step frequency as defined by the -// SYNC_SEL bits below. -#define x_STEP_MODE_SYNC_EN 0x80 // Mask for this bit -#define x_SYNC_EN 0x80 - -// ...last, define the SYNC_SEL modes. The clock output is defined by -// the full-step frequency and the value in these bits- see the datasheet -// for a matrix describing that relationship (page 46). -#define x_STEP_MODE_SYNC_SEL 0x70 -#define x_SYNC_SEL_1_2 0x00 -#define x_SYNC_SEL_1 0x10 -#define x_SYNC_SEL_2 0x20 -#define x_SYNC_SEL_4 0x30 -#define x_SYNC_SEL_8 0x40 -#define x_SYNC_SEL_16 0x50 -#define x_SYNC_SEL_32 0x60 -#define x_SYNC_SEL_64 0x70 - -// Bit names for the ALARM_EN register. -// Each of these bits defines one potential alarm condition. -// When one of these conditions occurs and the respective bit in ALARM_EN is set, -// the FLAG pin will go low. The register must be queried to determine which event -// caused the alarm. -#define x_ALARM_EN_OVERCURRENT 0x01 -#define x_ALARM_EN_THERMAL_SHUTDOWN 0x02 -#define x_ALARM_EN_THERMAL_WARNING 0x04 -#define x_ALARM_EN_UNDER_VOLTAGE 0x08 -#define x_ALARM_EN_STALL_DET_A 0x10 -#define x_ALARM_EN_STALL_DET_B 0x20 -#define x_ALARM_EN_SW_TURN_ON 0x40 -#define x_ALARM_EN_WRONG_NPERF_CMD 0x80 - -// CONFIG register renames. - -// Oscillator options. -// The x needs to know what the clock frequency is because it uses that for some -// calculations during operation. -#define x_CONFIG_OSC_SEL 0x000F // Mask for this bit field. -#define x_CONFIG_INT_16MHZ 0x0000 // Internal 16MHz, no output -#define x_CONFIG_INT_16MHZ_OSCOUT_2MHZ 0x0008 // Default; internal 16MHz, 2MHz output -#define x_CONFIG_INT_16MHZ_OSCOUT_4MHZ 0x0009 // Internal 16MHz, 4MHz output -#define x_CONFIG_INT_16MHZ_OSCOUT_8MHZ 0x000A // Internal 16MHz, 8MHz output -#define x_CONFIG_INT_16MHZ_OSCOUT_16MHZ 0x000B // Internal 16MHz, 16MHz output -#define x_CONFIG_EXT_8MHZ_XTAL_DRIVE 0x0004 // External 8MHz crystal -#define x_CONFIG_EXT_16MHZ_XTAL_DRIVE 0x0005 // External 16MHz crystal -#define x_CONFIG_EXT_24MHZ_XTAL_DRIVE 0x0006 // External 24MHz crystal -#define x_CONFIG_EXT_32MHZ_XTAL_DRIVE 0x0007 // External 32MHz crystal -#define x_CONFIG_EXT_8MHZ_OSCOUT_INVERT 0x000C // External 8MHz crystal, output inverted -#define x_CONFIG_EXT_16MHZ_OSCOUT_INVERT 0x000D // External 16MHz crystal, output inverted -#define x_CONFIG_EXT_24MHZ_OSCOUT_INVERT 0x000E // External 24MHz crystal, output inverted -#define x_CONFIG_EXT_32MHZ_OSCOUT_INVERT 0x000F // External 32MHz crystal, output inverted - -// Configure the functionality of the external switch input -#define x_CONFIG_SW_MODE 0x0010 // Mask for this bit. -#define x_CONFIG_SW_HARD_STOP 0x0000 // Default; hard stop motor on switch. -#define x_CONFIG_SW_USER 0x0010 // Tie to the GoUntil and ReleaseSW -// commands to provide jog function. -// See page 25 of datasheet. - -// Configure the motor voltage compensation mode (see page 34 of datasheet) -#define x_CONFIG_EN_VSCOMP 0x0020 // Mask for this bit. -#define x_CONFIG_VS_COMP_DISABLE 0x0000 // Disable motor voltage compensation. -#define x_CONFIG_VS_COMP_ENABLE 0x0020 // Enable motor voltage compensation. - -// Configure overcurrent detection event handling -#define x_CONFIG_OC_SD 0x0080 // Mask for this bit. -#define x_CONFIG_OC_SD_DISABLE 0x0000 // Bridges do NOT shutdown on OC detect -#define x_CONFIG_OC_SD_ENABLE 0x0080 // Bridges shutdown on OC detect - -// Configure the slew rate of the power bridge output -#define x_CONFIG_POW_SR 0x0300 // Mask for this bit field. -#define x_CONFIG_SR_180V_us 0x0000 // 180V/us -#define x_CONFIG_SR_290V_us 0x0200 // 290V/us -#define x_CONFIG_SR_530V_us 0x0300 // 530V/us - -// Integer divisors for PWM sinewave generation -// See page 32 of the datasheet for more information on this. -#define x_CONFIG_F_PWM_DEC 0x1C00 // mask for this bit field -#define x_CONFIG_PWM_MUL_0_625 (0x00)<<10 -#define x_CONFIG_PWM_MUL_0_75 (0x01)<<10 -#define x_CONFIG_PWM_MUL_0_875 (0x02)<<10 -#define x_CONFIG_PWM_MUL_1 (0x03)<<10 -#define x_CONFIG_PWM_MUL_1_25 (0x04)<<10 -#define x_CONFIG_PWM_MUL_1_5 (0x05)<<10 -#define x_CONFIG_PWM_MUL_1_75 (0x06)<<10 -#define x_CONFIG_PWM_MUL_2 (0x07)<<10 - -// Multiplier for the PWM sinewave frequency -#define x_CONFIG_F_PWM_INT 0xE000 // mask for this bit field. -#define x_CONFIG_PWM_DIV_1 (0x00)<<13 -#define x_CONFIG_PWM_DIV_2 (0x01)<<13 -#define x_CONFIG_PWM_DIV_3 (0x02)<<13 -#define x_CONFIG_PWM_DIV_4 (0x03)<<13 -#define x_CONFIG_PWM_DIV_5 (0x04)<<13 -#define x_CONFIG_PWM_DIV_6 (0x05)<<13 -#define x_CONFIG_PWM_DIV_7 (0x06)<<13 - -// Status register bit renames- read-only bits conferring information about the -// device to the user. -#define x_STATUS_HIZ 0x0001 // high when bridges are in HiZ mode -#define x_STATUS_BUSY 0x0002 // mirrors BUSY pin -#define x_STATUS_SW_F 0x0004 // low when switch open, high when closed -#define x_STATUS_SW_EVN 0x0008 // active high, set on switch falling edge, -// cleared by reading STATUS -#define x_STATUS_DIR 0x0010 // Indicates current motor direction. -// High is FWD, Low is REV. -#define x_STATUS_NOTPERF_CMD 0x0080 // Last command not performed. -#define x_STATUS_WRONG_CMD 0x0100 // Last command not valid. -#define x_STATUS_UVLO 0x0200 // Undervoltage lockout is active -#define x_STATUS_TH_WRN 0x0400 // Thermal warning -#define x_STATUS_TH_SD 0x0800 // Thermal shutdown -#define x_STATUS_OCD 0x1000 // Overcurrent detected -#define x_STATUS_STEP_LOSS_A 0x2000 // Stall detected on A bridge -#define x_STATUS_STEP_LOSS_B 0x4000 // Stall detected on B bridge -#define x_STATUS_SCK_MOD 0x8000 // Step clock mode is active - -// Status register motor status field -#define x_STATUS_MOT_STATUS 0x0060 // field mask -#define x_STATUS_MOT_STATUS_STOPPED (0x0000)<<13 // Motor stopped -#define x_STATUS_MOT_STATUS_ACCELERATION (0x0001)<<13 // Motor accelerating -#define x_STATUS_MOT_STATUS_DECELERATION (0x0002)<<13 // Motor decelerating -#define x_STATUS_MOT_STATUS_CONST_SPD (0x0003)<<13 // Motor at constant speed - -// Register address redefines. -// See the x_Param_Handler() function for more info about these. -#define x_ABS_POS 0x01 -#define x_EL_POS 0x02 -#define x_MARK 0x03 -#define x_SPEED 0x04 -#define x_ACC 0x05 -#define x_DEC 0x06 -#define x_MAX_SPEED 0x07 -#define x_MIN_SPEED 0x08 -#define x_FS_SPD 0x15 -#define x_KVAL_HOLD 0x09 -#define x_KVAL_RUN 0x0A -#define x_KVAL_ACC 0x0B -#define x_KVAL_DEC 0x0C -#define x_INT_SPD 0x0D -#define x_ST_SLP 0x0E -#define x_FN_SLP_ACC 0x0F -#define x_FN_SLP_DEC 0x10 -#define x_K_THERM 0x11 -#define x_ADC_OUT 0x12 -#define x_OCD_TH 0x13 -#define x_STALL_TH 0x14 -#define x_STEP_MODE 0x16 -#define x_ALARM_EN 0x17 -#define x_CONFIG 0x18 -#define x_STATUS 0x19 - -//x commands -#define x_NOP 0x00 -#define x_SET_PARAM 0x00 -#define x_GET_PARAM 0x20 -#define x_RUN 0x50 -#define x_STEP_CLOCK 0x58 -#define x_MOVE 0x40 -#define x_GOTO 0x60 -#define x_GOTO_DIR 0x68 -#define x_GO_UNTIL 0x82 -#define x_RELEASE_SW 0x92 -#define x_GO_HOME 0x70 -#define x_GO_MARK 0x78 -#define x_RESET_POS 0xD8 -#define x_RESET_DEVICE 0xC0 -#define x_SOFT_STOP 0xB0 -#define x_HARD_STOP 0xB8 -#define x_SOFT_HIZ 0xA0 -#define x_HARD_HIZ 0xA8 -#define x_GET_STATUS 0xD0 // use Get_and_Clear_Status - -/* x direction options */ -#define FWD 0x01 -#define REV 0x00 - -/* x action options */ -#define ACTION_RESET 0x00 -#define ACTION_COPY 0x01 - - - -//class cL6470 { -//public: - -//Default constuctot -//cL6470(); - -//Overload Constructor -//@param int MOSI, int MISO, int CS, int CLK, int BUSY, int RESET -//cL6470(int, int, int, int, int, int); - -#include "../../../DataDef.h" - -void init(); -unsigned long GetParam(byte); -byte Data_To_Transfer(byte); -unsigned long ParamHandler(byte, unsigned long); -void SetParam(byte, unsigned long); -unsigned long Param(unsigned long, byte); -int GetStatus(); -uint32_t SpdCalc(float); -unsigned long IntSpdCalc(float); -unsigned long FSCalc(float); -unsigned long MinSpdCalc(float); -unsigned long MaxSpdCalc(float); -unsigned long DecCalc(float); -unsigned long AccCalc(float); -void SetLSPDOpt(boolean); -void Run(byte, unsigned long); -void Step_Clock(byte); -void Move(byte, unsigned long); -void GoTo(unsigned long); -void GoTo_DIR(byte, unsigned long); -void GoUntil(byte, byte, unsigned long); -void ReleaseSW(byte, byte); -void GoHome(); -void GoMark(); -void ResetPos(); -void ResetDev(); -void SoftStop(); -void HardStop(); -void SoftHiZ(); -void HardHiZ(); -float CurrentSpdCalc(uint32_t stepspertick);// for Speed response -void delay(int number_of_seconds); -void Run_tx_test(byte dir, unsigned long spd); -////TODO update the addresses -//#define MOSI_BASE 0x00000001 // -//#define MISO_BASE 0x00000002 // -//#define CS_BASE 0x00000003 // -//#define CLK_BASE 0x00000004 // -//#define BUSY_BASE 0x00000005 // -//#define RESET_BASE 0x00000006 // -//#define TX_BASE 0x00000006 // -//#define RX_BASE 0x00000007 // - - -//extern int volatile * const MOSI_Reg; -//extern int volatile * const MISO_Reg; -//extern int volatile * const CS_Reg; -//extern int volatile * const CLK_Reg; -//extern int volatile * const BUSY_Reg; -//extern int volatile * const RESET_Reg; -//extern char volatile * const TX_Reg; -//extern char volatile * const RX_Reg; - -//*MOSI = value; /* write to port */ -//value = *MOSI; /* read from port */ - - - -/////////////// - - -////@param int MOSI -//void Set_MOSI(int); -////@param int MISO -//void Set_MISO(int); -////@param int CS -//void Set_CS(int); -////@param int CLK -//void Set_CLK(int); -////@param int BUSY -//void Set_BUSY(int); -////@param int RESET -//void Set_RESET(int); - - - -//int Get_MOSI(); -//int Get_MISO(); -//int Get_CS(); -//int Get_CLK(); -//int Get_BUSY(); -//int Get_RESET(); - - -//private: -// Member Variable - -//int MOSI = 0; -//int MISO = 0; -//int CS = 0; -//int CLK = 0; -//int BUSY = 0; -//int RESET = 0; -//}; - - -#endif /* CL6470_H_ */ diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/Moters_Driver/PowerSTEP01.h b/Software/Embedded_SW/Embedded/Drivers/FPGA/Moters_Driver/PowerSTEP01.h deleted file mode 100644 index bf1fe91d5..000000000 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/Moters_Driver/PowerSTEP01.h +++ /dev/null @@ -1,168 +0,0 @@ -/* - * PowerSTEP01.h - * //Based on: - * //https://os.mbed.com/teams/ST/code/X_NUCLEO_IHM03A1/file/2fbfe0cd8d4d/Components/powerstep01/powerstep01.h/ - * - * Created on: Mar 5, 2019 - * Author: avi - */ - -#ifndef DRIVERS_FPGA_MOTERS_DRIVER_POWERSTEP01_H_ -#define DRIVERS_FPGA_MOTERS_DRIVER_POWERSTEP01_H_ - - -//powerSTEP01 -#define x_POWERSTEP01_GATECFG1 0x18 //Gate driver configuration 11 bit -#define x_POWERSTEP01_GATECFG2 0x19 //Gate driver configuration 8 bit -#define x_POWERSTEP01_STATUS 0x1B //x_GET_STATUS is the same as in L6470 -#define x_POWERSTEP01_CONFIG 0x1A - -#define x_KVAL_TVAL_HOLD 0x09 -#define x_KVAL_TVAL_RUN 0x0A -#define x_KVAL_TVAL_ACC 0x0B -#define x_KVAL_TVAL_DEC 0x0C -#define x_ST_SLP_T_FAST 0x0E -#define x_FN_SLP_ACC_TON_MIN 0x0F -#define x_FN_SLP_DEC_TOFF_MIN 0x10 - -///Shift of TCC field in GATECFG1 register -#define POWERSTEP01_TCC_SHIFT (0) -///Shift of IGATE field in GATECFG1 register -#define POWERSTEP01_IGATE_SHIFT (5) -///Shift of TBOOST field in GATECFG1 register -#define POWERSTEP01_TBOOST_SHIFT (8) - -///Shift of TBLANK field in GATECFG2 register -#define POWERSTEP01_TBLANK_SHIFT (5) -///Shift of TDT field in GATECFG2 register -#define POWERSTEP01_TDT_SHIFT (0) - -/// masks for GATECFG1 register of PowerStep01 -typedef enum { - POWERSTEP01_GATECFG1_TCC_MASK = ((uint16_t)0x001F), - POWERSTEP01_GATECFG1_IGATE_MASK = ((uint16_t)0x00E0), - POWERSTEP01_GATECFG1_TBOOST_MASK = ((uint16_t)0x0700), - POWERSTEP01_GATECFG1_WD_EN = ((uint16_t)0x0800) -} powerstep01_GateCfg1Masks_t; - -/// Control current Time (field TCC of GATECFG1 register of PowerStep01) -typedef enum { - POWERSTEP01_TCC_125ns = (((uint8_t)0x00)< +#include +#include +#include "drivers/SPI/SPI_Comm.h" +#include "inc/hw_memmap.h" + + + + + +////////////// +//#include "stdafx.h" +#include "L6470.h" +//#include "FPGA_Comm.h" +// To use time library of C +#include + +//int volatile * const MOSI_Reg = (int *)MOSI_BASE; +//int volatile * const MISO_Reg = (int *)MISO_BASE; +//int volatile * const CS_Reg = (int *)CS_BASE; +//int volatile * const CLK_Reg = (int *)CLK_BASE; +//int volatile * const BUSY_Reg = (int *)BUSY_BASE; +//int volatile * const RESET_Reg = (int *)RESET_BASE; +//char volatile * const TX_Reg = (char *)TX_BASE; +//char volatile * const RX_Reg = (char *)RX_BASE; + + + + +//void cL6470(int MOSI, int MISO, int CS, int CLK, int BUSY, int RESET) +//{ +// _Set_MISO(MISO); +// _Set_MOSI(MOSI); +// _Set_CS(CS); +// _Set_CLK(CLK); +// _Set_BUSY(BUSY); +// _Set_RESET(RESET); +// +//} +/* +void delay(int number_of_seconds) +{ + // Converting time into milli_seconds + int milli_seconds = 1000 * number_of_seconds; + + // Stroing start time + clock_t start_time = clock(); + + // looping till required time is not acheived + while (clock() < start_time + milli_seconds); +} +*/ + +/* +void init() +{ + //pinMode(_CS, OUTPUT); + //digitalWrite(_CS, HIGH); + L6470_CS = HIGH; + //pinMode(_MOSI, OUTPUT); + //pinMode(_MISO, INPUT); + //pinMode(_CLK, OUTPUT); + //pinMode(_BUSY, INPUT); + //pinMode(_RESET, OUTPUT); + + //digitalWrite(_RESET, HIGH); + L6470_RESET = HIGH; + //AVI : TODO add deley + delay(1); + //digitalWrite(_RESET, LOW); + L6470_RESET = LOW; + delay(1); + //digitalWrite(_RESET, HIGH); + L6470_RESET = HIGH; + delay(1); + + //SPI.begin(); + //SPI.setBitOrder(MSBFIRST); + //SPI.setClockDivider(SPI_CLOCK_DIV16); // or 2, 8, 16, 32, 64 + //SPI.setDataMode(SPI_MODE3); +} +*/ + +void SetParam(byte param, unsigned long value) +{ + Data_To_Transfer(x_SET_PARAM | param); + ParamHandler(param, value); +} + + +unsigned long GetParam(byte param) +{ + Data_To_Transfer(x_GET_PARAM | param); + return ParamHandler(param, 0); +} + +// Enable or disable the low-speed optimization option. If enabling, +// the other 12 bits of +void SetLSPDOpt(boolean enable) +{ + Data_To_Transfer(x_SET_PARAM | x_MIN_SPEED); + + if (enable) + Param(0x1000, 13); + else + Param(0, 13); +} + +// RUN sets the motor spinning in a direction (defined by the constants +// FWD and REV). Maximum speed and minimum speed are defined +// by the MAX_SPEED and MIN_SPEED registers; exceeding the FS_SPD value +// will switch the device into full-step mode. +// The SpdCalc() function is provided to convert steps/s values into +// appropriate integer values for this function. +void Run(byte dir, unsigned long spd) +{ + Data_To_Transfer(x_RUN | dir); + if (spd > 0xFFFFF) spd = 0xFFFFF; + Data_To_Transfer((byte)((spd >> 16)&0xFF)); + Data_To_Transfer((byte)((spd >> 8)&0xFF)); + Data_To_Transfer((byte)((spd)&0xFF)); +} +byte Write_Byte(uint8_t WByte); +void Run_tx_test(byte dir, unsigned long spd) +{ + uint32_t temp = 0; + uint32_t rx = 0; + + temp = Write_Byte(x_RUN | dir); + rx |= (temp & 0xFF) << 24; + + temp = Write_Byte((spd >> 16)&0xFF); + rx |= (temp & 0xFF) << 16; + + temp = Write_Byte((spd >> 8)&0xFF); + rx |= (temp & 0xFF) << 8; + + temp = Write_Byte((spd)&0xFF); + rx |= temp & 0xFF; + + //return rx; +} + +// STEP_CLOCK puts the device in external step clocking mode. When active, +// pin 25, STCK, becomes the step clock for the device, and steps it in +// the direction (set by the FWD and REV constants) imposed by the call +// of this function. Motion commands (RUN, MOVE, etc) will cause the device +// to exit step clocking mode. +void Step_Clock(byte dir) +{ + Data_To_Transfer(x_STEP_CLOCK | dir); +} + +// MOVE will send the motor n_step steps (size based on step mode) in the +// direction imposed by dir (FWD or REV constants may be used). The motor +// will accelerate according the acceleration and deceleration curves, and +// will run at MAX_SPEED. Stepping mode will adhere to FS_SPD value, as well. +void Move(byte dir, unsigned long n_step) +{ + Data_To_Transfer(x_MOVE | dir); + if (n_step > 0x3FFFFF) n_step = 0x3FFFFF; + Data_To_Transfer((byte)(n_step >> 16)); + Data_To_Transfer((byte)(n_step >> 8)); + Data_To_Transfer((byte)(n_step)); +} + +// GOTO operates much like MOVE, except it produces absolute motion instead +// of relative motion. The motor will be moved to the indicated position +// in the shortest possible fashion. +void GoTo(unsigned long pos) +{ + + Data_To_Transfer(x_GOTO); + if (pos > 0x3FFFFF) pos = 0x3FFFFF; + Data_To_Transfer((byte)(pos >> 16)); + Data_To_Transfer((byte)(pos >> 8)); + Data_To_Transfer((byte)(pos)); +} + +// Same as GOTO, but with user constrained rotational direction. +void GoTo_DIR(byte dir, unsigned long pos) +{ + + Data_To_Transfer(x_GOTO_DIR); + if (pos > 0x3FFFFF) pos = 0x3FFFFF; + Data_To_Transfer((byte)(pos >> 16)); + Data_To_Transfer((byte)(pos >> 8)); + Data_To_Transfer((byte)(pos)); +} + +// GoUntil will set the motor running with direction dir (REV or +// FWD) until a falling edge is detected on the SW pin. Depending +// on bit SW_MODE in CONFIG, either a hard stop or a soft stop is +// performed at the falling edge, and depending on the value of +// act (either RESET or COPY) the value in the ABS_POS register is +// either RESET to 0 or COPY-ed into the MARK register. +void GoUntil(byte act, byte dir, unsigned long spd) +{ + Data_To_Transfer(x_GO_UNTIL | act | dir); + if (spd > 0x3FFFFF) spd = 0x3FFFFF; + Data_To_Transfer((byte)(spd >> 16)); + Data_To_Transfer((byte)(spd >> 8)); + Data_To_Transfer((byte)(spd)); +} + +// Similar in nature to GoUntil, ReleaseSW produces motion at the +// higher of two speeds: the value in MIN_SPEED or 5 steps/s. +// The motor continues to run at this speed until a rising edge +// is detected on the switch input, then a hard stop is performed +// and the ABS_POS register is either COPY-ed into MARK or RESET to +// 0, depending on whether RESET or COPY was passed to the function +// for act. +void ReleaseSW(byte act, byte dir) +{ + Data_To_Transfer(x_RELEASE_SW | act | dir); +} + +// GoHome is equivalent to GoTo(0), but requires less time to send. +// Note that no direction is provided; motion occurs through shortest +// path. If a direction is required, use GoTo_DIR(). +void GoHome() +{ + Data_To_Transfer(x_GO_HOME); +} + +// GoMark is equivalent to GoTo(MARK), but requires less time to send. +// Note that no direction is provided; motion occurs through shortest +// path. If a direction is required, use GoTo_DIR(). +void GoMark() +{ + Data_To_Transfer(x_GO_MARK); +} + +// Sets the ABS_POS register to 0, effectively declaring the current +// position to be "HOME". +void ResetPos() +{ + byte value = x_RESET_POS; + Data_To_Transfer(value); +} + +// Reset device to power up conditions. Equivalent to toggling the STBY +// pin or cycling power. +void ResetDev() +{ + byte value = x_RESET_DEVICE; + Data_To_Transfer(value); +} + +// Bring the motor to a halt using the deceleration curve. +void SoftStop() +{ + byte value = x_SOFT_STOP; + Data_To_Transfer(value); +} + +// Stop the motor with infinite deceleration. +void HardStop() +{ + byte value = x_HARD_STOP; + Data_To_Transfer(value); +} + +// Decelerate the motor and put the bridges in Hi-Z state. +void SoftHiZ() +{ + byte value = x_SOFT_HIZ; + Data_To_Transfer(value); +} + +// Put the bridges in Hi-Z state immediately with no deceleration. +void HardHiZ() +{ + byte value = x_HARD_HIZ; + Data_To_Transfer(value); +} + +// Fetch and return the 16-bit value in the STATUS register. Resets +// any warning flags and exits any error states. Using GetParam() +// to read STATUS does not clear these values. +int GetStatus() +{ + int temp = 0; + Data_To_Transfer(x_GET_STATUS); + temp = Data_To_Transfer(0) << 8; + temp |= Data_To_Transfer(0); + return temp; +} + + + + +unsigned long AccCalc(float stepsPerSecPerSec) +{ + float temp = (float)(stepsPerSecPerSec * 0.137438); + if ( ((unsigned long) ( (long)(temp) )) > 0x00000FFF ) + return 0x00000FFF; + else return (unsigned long) (long)(temp); +} + +// The calculation for DEC is the same as for ACC. Value is 0x08A on boot. +// This is a 12-bit value, so we need to make sure the value is at or below 0xFFF. +unsigned long DecCalc(float stepsPerSecPerSec) +{ + float temp = (float)(stepsPerSecPerSec * 0.137438); + if ((unsigned long) (long)(temp) > 0x00000FFF) return 0x00000FFF; + else return (unsigned long) (long)(temp); +} + +// The value in the MAX_SPD register is [(steps/s)*(tick)]/(2^-18) where tick is +// 250ns (datasheet value)- 0x041 on boot. +// Multiply desired steps/s by .065536 to get an appropriate value for this register +// This is a 10-bit value, so we need to make sure it remains at or below 0x3FF +unsigned long MaxSpdCalc(float stepsPerSec) +{ + float temp = (float)(stepsPerSec * .065536); + if ((unsigned long) (long)(temp) > 0x000003FF) return 0x000003FF; + else return (unsigned long) (long)(temp); +} + +// The value in the MIN_SPD register is [(steps/s)*(tick)]/(2^-24) where tick is +// 250ns (datasheet value)- 0x000 on boot. +// Multiply desired steps/s by 4.1943 to get an appropriate value for this register +// This is a 12-bit value, so we need to make sure the value is at or below 0xFFF. +unsigned long MinSpdCalc(float stepsPerSec) +{ + float temp = (float)(stepsPerSec * 4.1943); + if ((unsigned long) (long)(temp) > 0x00000FFF) return 0x00000FFF; + else return (unsigned long) (long)(temp); +} + +// The value in the FS_SPD register is ([(steps/s)*(tick)]/(2^-18))-0.5 where tick is +// 250ns (datasheet value)- 0x027 on boot. +// Multiply desired steps/s by .065536 and subtract .5 to get an appropriate value for this register +// This is a 10-bit value, so we need to make sure the value is at or below 0x3FF. +unsigned long FSCalc(float stepsPerSec) +{ + float temp = (float)((stepsPerSec * .065536) - .5); + if ((unsigned long) (long)(temp) > 0x000003FF) return 0x000003FF; + else return (unsigned long) (long)(temp); +} + +// The value in the INT_SPD register is [(steps/s)*(tick)]/(2^-24) where tick is +// 250ns (datasheet value)- 0x408 on boot. +// Multiply desired steps/s by 4.1943 to get an appropriate value for this register +// This is a 14-bit value, so we need to make sure the value is at or below 0x3FFF. +unsigned long IntSpdCalc(float stepsPerSec) +{ + float temp = (float)(stepsPerSec * 4.1943); + if ((unsigned long) (long)(temp) > 0x00003FFF) return 0x00003FFF; + else return (unsigned long) (long)(temp); +} + +// When issuing RUN command, the 20-bit speed is [(steps/s)*(tick)]/(2^-28) where tick is +// 250ns (datasheet value). +// Multiply desired steps/s by 67.106 to get an appropriate value for this register +// This is a 20-bit value, so we need to make sure the value is at or below 0xFFFFF. +uint32_t SpdCalc(float stepsPerSec)// for run request +{ +// float temp = (float)(stepsPerSec * 67.106); +// if ((unsigned long) (long)(temp) > 0x000FFFFF) return 0x000FFFFF; +// else return (unsigned long)temp; + + uint32_t temp = 67108 * stepsPerSec; + uint32_t stepspertick = temp/1000 ; + if(stepspertick > 0xFFFFF) + stepspertick = 0xFFFFF; + return stepspertick; +} +float CurrentSpdCalc(uint32_t stepspertick)// for Speed response +{ +// float temp = (float)(stepspertick); +// float stepsPerSec = (float)(temp / 67.106); +// if(stepsPerSec>15625) stepsPerSec = 15625; + float temp = (float)(stepspertick *1000); + float stepsPerSec = (float)(temp/67108.0); + if(stepsPerSec>15625.0) stepsPerSec = 15625.0; // The available range is from 0 to 15625 step/s + + return stepsPerSec; +} + + + +// This simple function shifts a byte out over SPI and receives a byte over +// SPI. Unusually for SPI devices, the x requires a toggling of the +// CS (slaveSelect) pin after each byte sent. That makes this function +// a bit more reasonable, because we can include more functionality in it. +byte Data_To_Transfer(byte data) +{ + + //while(SSIBusy(SSI2_BASE)){}; + //while(Check_SPI_Busy() == BUSY){}; + + byte data_out = 0; + /* + //digitalWrite(_CS, LOW); + L6470_CS = LOW; + //data_out = SPI.transfer(data); + L6470_TX = data; + data_out = L6470_RX; + + //digitalWrite(_CS, HIGH); + L6470_CS = HIGH; + return data_out; + */ + + data_out = Transfer_tx(data/*, &data_out*/ ); + return data_out; +} + + +// the register will be automatically zero. +// When disabling, the value will have to be explicitly written by +// the user with a SetParam() call. See the datasheet for further +// information about low-speed optimization.// Much of the functionality between "get parameter" and "set parameter" is +// very similar, so we deal with that by putting all of it in one function +// here to save memory space and simplify the program. +unsigned long ParamHandler(byte param, unsigned long value) +{ + unsigned long ret_val = 0; // This is a temp for the value to return. + // This switch structure handles the appropriate action for each register. + // This is necessary since not all registers are of the same length, either + // bit-wise or byte-wise, so we want to make sure we mask out any spurious + // bits and do the right number of transfers. That is handled by the x_Param() + // function, in most cases, but for 1-byte or smaller transfers, we call + // Data_To_Transfer() directly. + switch (param) + { + // ABS_POS is the current absolute offset from home. It is a 22 bit number expressed + // in two's complement. At power up, this value is 0. It cannot be written when + // the motor is running, but at any other time, it can be updated to change the + // interpreted position of the motor. + case x_ABS_POS: + ret_val = Param(value, 22); + break; + // EL_POS is the current electrical position in the step generation cycle. It can + // be set when the motor is not in motion. Value is 0 on power up. + case x_EL_POS: + ret_val = Param(value, 9); + break; + // MARK is a second position other than 0 that the motor can be told to go to. As + // with ABS_POS, it is 22-bit two's complement. Value is 0 on power up. + case x_MARK: + ret_val = Param(value, 22); + break; + // SPEED contains information about the current speed. It is read-only. It does + // NOT provide direction information. + case x_SPEED: + ret_val = Param(0, 32); + break; + // ACC and DEC set the acceleration and deceleration rates. Set ACC to 0xFFF + // to get infinite acceleration/decelaeration- there is no way to get infinite + // deceleration w/o infinite acceleration (except the HARD STOP command). + // Cannot be written while motor is running. Both default to 0x08A on power up. + // AccCalc() and DecCalc() functions exist to convert steps/s/s values into + // 12-bit values for these two registers. + case x_ACC: + ret_val = Param(value, 12); + break; + case x_DEC: + ret_val = Param(value, 12); + break; + // MAX_SPEED is just what it says- any command which attempts to set the speed + // of the motor above this value will simply cause the motor to turn at this + // speed. Value is 0x041 on power up. + // MaxSpdCalc() function exists to convert steps/s value into a 10-bit value + // for this register. + case x_MAX_SPEED: + ret_val = Param(value, 10); + break; + // MIN_SPEED controls two things- the activation of the low-speed optimization + // feature and the lowest speed the motor will be allowed to operate at. LSPD_OPT + // is the 13th bit, and when it is set, the minimum allowed speed is automatically + // set to zero. This value is 0 on startup. + // MinSpdCalc() function exists to convert steps/s value into a 12-bit value for this + // register. SetLSPDOpt() function exists to enable/disable the optimization feature. + case x_MIN_SPEED: + ret_val = Param(value, 12); + break; + // FS_SPD register contains a threshold value above which microstepping is disabled + // and the x operates in full-step mode. Defaults to 0x027 on power up. + // FSCalc() function exists to convert steps/s value into 10-bit integer for this + // register. + case x_FS_SPD: + ret_val = Param(value, 10); + break; + // KVAL is the maximum voltage of the PWM outputs. These 8-bit values are ratiometric + // representations: 255 for full output voltage, 128 for half, etc. Default is 0x29. + // The implications of different KVAL settings is too complex to dig into here, but + // it will usually work to max the value for RUN, ACC, and DEC. Maxing the value for + // HOLD may result in excessive power dissipation when the motor is not running. + case x_KVAL_HOLD: + ret_val = Data_To_Transfer((byte)value); + break; + case x_KVAL_RUN: + ret_val = Data_To_Transfer((byte)value); + break; + case x_KVAL_ACC: + ret_val = Data_To_Transfer((byte)value); + break; + case x_KVAL_DEC: + ret_val = Data_To_Transfer((byte)value); + break; + // INT_SPD, ST_SLP, FN_SLP_ACC and FN_SLP_DEC are all related to the back EMF + // compensation functionality. Please see the datasheet for details of this + // function- it is too complex to discuss here. Default values seem to work + // well enough. + case x_INT_SPD: + ret_val = Param(value, 14); + break; + case x_ST_SLP: + ret_val = Data_To_Transfer((byte)value); + break; + case x_FN_SLP_ACC: + ret_val = Data_To_Transfer((byte)value); + break; + case x_FN_SLP_DEC: + ret_val = Data_To_Transfer((byte)value); + break; + // K_THERM is motor winding thermal drift compensation. Please see the datasheet + // for full details on operation- the default value should be okay for most users. + case x_K_THERM: + ret_val = Data_To_Transfer((byte)value & 0x0F); + break; + // ADC_OUT is a read-only register containing the result of the ADC measurements. + // This is less useful than it sounds; see the datasheet for more information. + case x_ADC_OUT: + ret_val = Data_To_Transfer(0); + break; + // Set the overcurrent threshold. Ranges from 375mA to 6A in steps of 375mA. + // A set of defined constants is provided for the user's convenience. Default + // value is 3.375A- 0x08. This is a 4-bit value. + case x_OCD_TH: + ret_val = Data_To_Transfer((byte)value & 0x0F); + break; + // Stall current threshold. Defaults to 0x40, or 2.03A. Value is from 31.25mA to + // 4A in 31.25mA steps. This is a 7-bit value. + case x_STALL_TH: + ret_val = Data_To_Transfer((byte)value & 0x7F); + break; + // STEP_MODE controls the microstepping settings, as well as the generation of an + // output signal from the x. Bits 2:0 control the number of microsteps per + // step the part will generate. Bit 7 controls whether the BUSY/SYNC pin outputs + // a BUSY signal or a step synchronization signal. Bits 6:4 control the frequency + // of the output signal relative to the full-step frequency; see datasheet for + // that relationship as it is too complex to reproduce here. + // Most likely, only the microsteps per step value will be needed; there is a set + // of constants provided for ease of use of these values. + case x_STEP_MODE: + ret_val = Data_To_Transfer((byte)value); + break; + // ALARM_EN controls which alarms will cause the FLAG pin to fall. A set of constants + // is provided to make this easy to interpret. By default, ALL alarms will trigger the + // FLAG pin. + case x_ALARM_EN: + ret_val = Data_To_Transfer((byte)value); + break; + // CONFIG contains some assorted configuration bits and fields. A fairly comprehensive + // set of reasonably self-explanatory constants is provided, but users should refer + // to the datasheet before modifying the contents of this register to be certain they + // understand the implications of their modifications. Value on boot is 0x2E88; this + // can be a useful way to verify proper start up and operation of the x chip. + case x_CONFIG: + ret_val = Param(value, 16); + break; + // STATUS contains read-only information about the current condition of the chip. A + // comprehensive set of constants for masking and testing this register is provided, but + // users should refer to the datasheet to ensure that they fully understand each one of + // the bits in the register. + case x_STATUS: // STATUS is a read-only register + ret_val = Param(0, 16); + break; + default: + ret_val = Data_To_Transfer((byte)(value)); + break; + } + return ret_val; +} + +// Generalization of the subsections of the register read/write functionality. +// We want the end user to just write the value without worrying about length, +// so we pass a bit length parameter from the calling function. +unsigned long Param(unsigned long value, byte bit_len) +{ + unsigned long ret_val = 0; // We'll return this to generalize this function + // for both read and write of registers. + byte byte_len = bit_len / 8; // How many BYTES do we have? + if (bit_len % 8 > 0) byte_len++; // Make sure not to lose any partial byte values. + // Let's make sure our value has no spurious bits set, and if the value was too + // high, max it out. + unsigned long mask = 0xffffffff >> (32 - bit_len); + if (value > mask) + value = mask; + // The following three if statements handle the various possible byte length + // transfers- it'll be no less than 1 but no more than 3 bytes of data. + // Data_To_Transfer() sends a byte out through SPI and returns a byte received + // over SPI- when calling it, we typecast a shifted version of the masked + // value, then we shift the received value back by the same amount and + // store it until return time. + if (byte_len == 3) { + ret_val |= Data_To_Transfer((byte)(value >> 16)) << 16; + //Serial.println(ret_val, HEX); + } + if (byte_len >= 2) { + ret_val |= Data_To_Transfer((byte)(value >> 8)) << 8; + //Serial.println(ret_val, HEX); + } + if (byte_len >= 1) { + //Serial.print("Value = "); + //Serial.println(value); + //Serial.print("ret_val = "); + //Serial.println(ret_val); + + ret_val |= Data_To_Transfer((byte)value); + + //Serial.print("ret_val = "); + //Serial.println(ret_val); + + //Serial.println(ret_val, HEX); + } + // Return the received values. Mask off any unnecessary bits, just for + // the sake of thoroughness- we don't EXPECT to see anything outside + // the bit length range but better to be safe than sorry. + return (ret_val & mask); +} + +// This simple function shifts a byte out over SPI and receives a byte over +// SPI. Unusually for SPI devices, the x requires a toggling of the +// CS (slaveSelect) pin after each byte sent. That makes this function +// a bit more reasonable, because we can include more functionality in it. + +// +//void Set_MOSI(int MOSI) +// +//{ +// _MOSI = MOSI; +//} +// +//void Set_MISO(int MISO) +// +//{ +// _MISO = MISO; +//} +// +//void Set_CS(int CS) +// +//{ +// _CS = CS; +//} +// +//void Set_CLK(int CLK) +// +//{ +// _CLK = CLK; +//} +// +//void Set_BUSY(int BUSY) +// +//{ +// _BUSY = BUSY; +//} +// +//void Set_RESET(int RESET) +// +//{ +// _RESET = RESET; +//} +// +//int Get_MOSI() +//{ +// return MOSI; +//} +// +//int Get_MISO() +//{ +// return MISO; +//} +// +//int Get_CS() +//{ +// return CS; +//} +//int Get_CLK() +//{ +// return CLK; +//} +// +//int Get_BUSY() +//{ +// return BUSY; +//} +//int Get_RESET() +//{ +// return RESET; +//} + + diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/Motors_Driver/L6470.h b/Software/Embedded_SW/Embedded/Drivers/FPGA/Motors_Driver/L6470.h new file mode 100644 index 000000000..745a7f753 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/Motors_Driver/L6470.h @@ -0,0 +1,341 @@ +/* +* cL6470.h +* +* Created: 6/22/2016 8:40:34 PM +* Author: Atif +*/ + + +#ifndef CL6470_H_ +#define CL6470_H_ + +//#include +//#include + +// + +// + +// constant definitions for overcurrent thresholds. Write these values to +// register x_OCD_TH to set the level at which an overcurrent even occurs. +#define x_OCD_TH_375mA 0x00 +#define x_OCD_TH_750mA 0x01 +#define x_OCD_TH_1125mA 0x02 +#define x_OCD_TH_1500mA 0x03 +#define x_OCD_TH_1875mA 0x04 +#define x_OCD_TH_2250mA 0x05 +#define x_OCD_TH_2625mA 0x06 +#define x_OCD_TH_3000mA 0x07 +#define x_OCD_TH_3375mA 0x08 +#define x_OCD_TH_3750mA 0x09 +#define x_OCD_TH_4125mA 0x0A +#define x_OCD_TH_4500mA 0x0B +#define x_OCD_TH_4875mA 0x0C +#define x_OCD_TH_5250mA 0x0D +#define x_OCD_TH_5625mA 0x0E +#define x_OCD_TH_6000mA 0x0F + +// STEP_MODE option values. +// First comes the "microsteps per step" options... +#define x_STEP_MODE_STEP_SEL 0x07 // Mask for these bits only. +#define x_STEP_SEL_1 0x00 +#define x_STEP_SEL_1_2 0x01 +#define x_STEP_SEL_1_4 0x02 +#define x_STEP_SEL_1_8 0x03 +#define x_STEP_SEL_1_16 0x04 +#define x_STEP_SEL_1_32 0x05 +#define x_STEP_SEL_1_64 0x06 +#define x_STEP_SEL_1_128 0x07 + +// ...next, define the SYNC_EN bit. When set, the BUSYN pin will instead +// output a clock related to the full-step frequency as defined by the +// SYNC_SEL bits below. +#define x_STEP_MODE_SYNC_EN 0x80 // Mask for this bit +#define x_SYNC_EN 0x80 + +// ...last, define the SYNC_SEL modes. The clock output is defined by +// the full-step frequency and the value in these bits- see the datasheet +// for a matrix describing that relationship (page 46). +#define x_STEP_MODE_SYNC_SEL 0x70 +#define x_SYNC_SEL_1_2 0x00 +#define x_SYNC_SEL_1 0x10 +#define x_SYNC_SEL_2 0x20 +#define x_SYNC_SEL_4 0x30 +#define x_SYNC_SEL_8 0x40 +#define x_SYNC_SEL_16 0x50 +#define x_SYNC_SEL_32 0x60 +#define x_SYNC_SEL_64 0x70 + +// Bit names for the ALARM_EN register. +// Each of these bits defines one potential alarm condition. +// When one of these conditions occurs and the respective bit in ALARM_EN is set, +// the FLAG pin will go low. The register must be queried to determine which event +// caused the alarm. +#define x_ALARM_EN_OVERCURRENT 0x01 +#define x_ALARM_EN_THERMAL_SHUTDOWN 0x02 +#define x_ALARM_EN_THERMAL_WARNING 0x04 +#define x_ALARM_EN_UNDER_VOLTAGE 0x08 +#define x_ALARM_EN_STALL_DET_A 0x10 +#define x_ALARM_EN_STALL_DET_B 0x20 +#define x_ALARM_EN_SW_TURN_ON 0x40 +#define x_ALARM_EN_WRONG_NPERF_CMD 0x80 + +// CONFIG register renames. + +// Oscillator options. +// The x needs to know what the clock frequency is because it uses that for some +// calculations during operation. +#define x_CONFIG_OSC_SEL 0x000F // Mask for this bit field. +#define x_CONFIG_INT_16MHZ 0x0000 // Internal 16MHz, no output +#define x_CONFIG_INT_16MHZ_OSCOUT_2MHZ 0x0008 // Default; internal 16MHz, 2MHz output +#define x_CONFIG_INT_16MHZ_OSCOUT_4MHZ 0x0009 // Internal 16MHz, 4MHz output +#define x_CONFIG_INT_16MHZ_OSCOUT_8MHZ 0x000A // Internal 16MHz, 8MHz output +#define x_CONFIG_INT_16MHZ_OSCOUT_16MHZ 0x000B // Internal 16MHz, 16MHz output +#define x_CONFIG_EXT_8MHZ_XTAL_DRIVE 0x0004 // External 8MHz crystal +#define x_CONFIG_EXT_16MHZ_XTAL_DRIVE 0x0005 // External 16MHz crystal +#define x_CONFIG_EXT_24MHZ_XTAL_DRIVE 0x0006 // External 24MHz crystal +#define x_CONFIG_EXT_32MHZ_XTAL_DRIVE 0x0007 // External 32MHz crystal +#define x_CONFIG_EXT_8MHZ_OSCOUT_INVERT 0x000C // External 8MHz crystal, output inverted +#define x_CONFIG_EXT_16MHZ_OSCOUT_INVERT 0x000D // External 16MHz crystal, output inverted +#define x_CONFIG_EXT_24MHZ_OSCOUT_INVERT 0x000E // External 24MHz crystal, output inverted +#define x_CONFIG_EXT_32MHZ_OSCOUT_INVERT 0x000F // External 32MHz crystal, output inverted + +// Configure the functionality of the external switch input +#define x_CONFIG_SW_MODE 0x0010 // Mask for this bit. +#define x_CONFIG_SW_HARD_STOP 0x0000 // Default; hard stop motor on switch. +#define x_CONFIG_SW_USER 0x0010 // Tie to the GoUntil and ReleaseSW +// commands to provide jog function. +// See page 25 of datasheet. + +// Configure the motor voltage compensation mode (see page 34 of datasheet) +#define x_CONFIG_EN_VSCOMP 0x0020 // Mask for this bit. +#define x_CONFIG_VS_COMP_DISABLE 0x0000 // Disable motor voltage compensation. +#define x_CONFIG_VS_COMP_ENABLE 0x0020 // Enable motor voltage compensation. + +// Configure overcurrent detection event handling +#define x_CONFIG_OC_SD 0x0080 // Mask for this bit. +#define x_CONFIG_OC_SD_DISABLE 0x0000 // Bridges do NOT shutdown on OC detect +#define x_CONFIG_OC_SD_ENABLE 0x0080 // Bridges shutdown on OC detect + +// Configure the slew rate of the power bridge output +#define x_CONFIG_POW_SR 0x0300 // Mask for this bit field. +#define x_CONFIG_SR_180V_us 0x0000 // 180V/us +#define x_CONFIG_SR_290V_us 0x0200 // 290V/us +#define x_CONFIG_SR_530V_us 0x0300 // 530V/us + +// Integer divisors for PWM sinewave generation +// See page 32 of the datasheet for more information on this. +#define x_CONFIG_F_PWM_DEC 0x1C00 // mask for this bit field +#define x_CONFIG_PWM_MUL_0_625 (0x00)<<10 +#define x_CONFIG_PWM_MUL_0_75 (0x01)<<10 +#define x_CONFIG_PWM_MUL_0_875 (0x02)<<10 +#define x_CONFIG_PWM_MUL_1 (0x03)<<10 +#define x_CONFIG_PWM_MUL_1_25 (0x04)<<10 +#define x_CONFIG_PWM_MUL_1_5 (0x05)<<10 +#define x_CONFIG_PWM_MUL_1_75 (0x06)<<10 +#define x_CONFIG_PWM_MUL_2 (0x07)<<10 + +// Multiplier for the PWM sinewave frequency +#define x_CONFIG_F_PWM_INT 0xE000 // mask for this bit field. +#define x_CONFIG_PWM_DIV_1 (0x00)<<13 +#define x_CONFIG_PWM_DIV_2 (0x01)<<13 +#define x_CONFIG_PWM_DIV_3 (0x02)<<13 +#define x_CONFIG_PWM_DIV_4 (0x03)<<13 +#define x_CONFIG_PWM_DIV_5 (0x04)<<13 +#define x_CONFIG_PWM_DIV_6 (0x05)<<13 +#define x_CONFIG_PWM_DIV_7 (0x06)<<13 + +// Status register bit renames- read-only bits conferring information about the +// device to the user. +#define x_STATUS_HIZ 0x0001 // high when bridges are in HiZ mode +#define x_STATUS_BUSY 0x0002 // mirrors BUSY pin +#define x_STATUS_SW_F 0x0004 // low when switch open, high when closed +#define x_STATUS_SW_EVN 0x0008 // active high, set on switch falling edge, +// cleared by reading STATUS +#define x_STATUS_DIR 0x0010 // Indicates current motor direction. +// High is FWD, Low is REV. +#define x_STATUS_NOTPERF_CMD 0x0080 // Last command not performed. +#define x_STATUS_WRONG_CMD 0x0100 // Last command not valid. +#define x_STATUS_UVLO 0x0200 // Undervoltage lockout is active +#define x_STATUS_TH_WRN 0x0400 // Thermal warning +#define x_STATUS_TH_SD 0x0800 // Thermal shutdown +#define x_STATUS_OCD 0x1000 // Overcurrent detected +#define x_STATUS_STEP_LOSS_A 0x2000 // Stall detected on A bridge +#define x_STATUS_STEP_LOSS_B 0x4000 // Stall detected on B bridge +#define x_STATUS_SCK_MOD 0x8000 // Step clock mode is active + +// Status register motor status field +#define x_STATUS_MOT_STATUS 0x0060 // field mask +#define x_STATUS_MOT_STATUS_STOPPED (0x0000)<<13 // Motor stopped +#define x_STATUS_MOT_STATUS_ACCELERATION (0x0001)<<13 // Motor accelerating +#define x_STATUS_MOT_STATUS_DECELERATION (0x0002)<<13 // Motor decelerating +#define x_STATUS_MOT_STATUS_CONST_SPD (0x0003)<<13 // Motor at constant speed + +// Register address redefines. +// See the x_Param_Handler() function for more info about these. +#define x_ABS_POS 0x01 +#define x_EL_POS 0x02 +#define x_MARK 0x03 +#define x_SPEED 0x04 +#define x_ACC 0x05 +#define x_DEC 0x06 +#define x_MAX_SPEED 0x07 +#define x_MIN_SPEED 0x08 +#define x_FS_SPD 0x15 +#define x_KVAL_HOLD 0x09 +#define x_KVAL_RUN 0x0A +#define x_KVAL_ACC 0x0B +#define x_KVAL_DEC 0x0C +#define x_INT_SPD 0x0D +#define x_ST_SLP 0x0E +#define x_FN_SLP_ACC 0x0F +#define x_FN_SLP_DEC 0x10 +#define x_K_THERM 0x11 +#define x_ADC_OUT 0x12 +#define x_OCD_TH 0x13 +#define x_STALL_TH 0x14 +#define x_STEP_MODE 0x16 +#define x_ALARM_EN 0x17 +#define x_CONFIG 0x18 +#define x_STATUS 0x19 + +//x commands +#define x_NOP 0x00 +#define x_SET_PARAM 0x00 +#define x_GET_PARAM 0x20 +#define x_RUN 0x50 +#define x_STEP_CLOCK 0x58 +#define x_MOVE 0x40 +#define x_GOTO 0x60 +#define x_GOTO_DIR 0x68 +#define x_GO_UNTIL 0x82 +#define x_RELEASE_SW 0x92 +#define x_GO_HOME 0x70 +#define x_GO_MARK 0x78 +#define x_RESET_POS 0xD8 +#define x_RESET_DEVICE 0xC0 +#define x_SOFT_STOP 0xB0 +#define x_HARD_STOP 0xB8 +#define x_SOFT_HIZ 0xA0 +#define x_HARD_HIZ 0xA8 +#define x_GET_STATUS 0xD0 // use Get_and_Clear_Status + +/* x direction options */ +#define FWD 0x01 +#define REV 0x00 + +/* x action options */ +#define ACTION_RESET 0x00 +#define ACTION_COPY 0x01 + + + +//class cL6470 { +//public: + +//Default constuctot +//cL6470(); + +//Overload Constructor +//@param int MOSI, int MISO, int CS, int CLK, int BUSY, int RESET +//cL6470(int, int, int, int, int, int); + +#include "../../../DataDef.h" + +void init(); +unsigned long GetParam(byte); +byte Data_To_Transfer(byte); +unsigned long ParamHandler(byte, unsigned long); +void SetParam(byte, unsigned long); +unsigned long Param(unsigned long, byte); +int GetStatus(); +uint32_t SpdCalc(float); +unsigned long IntSpdCalc(float); +unsigned long FSCalc(float); +unsigned long MinSpdCalc(float); +unsigned long MaxSpdCalc(float); +unsigned long DecCalc(float); +unsigned long AccCalc(float); +void SetLSPDOpt(boolean); +void Run(byte, unsigned long); +void Step_Clock(byte); +void Move(byte, unsigned long); +void GoTo(unsigned long); +void GoTo_DIR(byte, unsigned long); +void GoUntil(byte, byte, unsigned long); +void ReleaseSW(byte, byte); +void GoHome(); +void GoMark(); +void ResetPos(); +void ResetDev(); +void SoftStop(); +void HardStop(); +void SoftHiZ(); +void HardHiZ(); +float CurrentSpdCalc(uint32_t stepspertick);// for Speed response +void delay(int number_of_seconds); +void Run_tx_test(byte dir, unsigned long spd); +////TODO update the addresses +//#define MOSI_BASE 0x00000001 // +//#define MISO_BASE 0x00000002 // +//#define CS_BASE 0x00000003 // +//#define CLK_BASE 0x00000004 // +//#define BUSY_BASE 0x00000005 // +//#define RESET_BASE 0x00000006 // +//#define TX_BASE 0x00000006 // +//#define RX_BASE 0x00000007 // + + +//extern int volatile * const MOSI_Reg; +//extern int volatile * const MISO_Reg; +//extern int volatile * const CS_Reg; +//extern int volatile * const CLK_Reg; +//extern int volatile * const BUSY_Reg; +//extern int volatile * const RESET_Reg; +//extern char volatile * const TX_Reg; +//extern char volatile * const RX_Reg; + +//*MOSI = value; /* write to port */ +//value = *MOSI; /* read from port */ + + + +/////////////// + + +////@param int MOSI +//void Set_MOSI(int); +////@param int MISO +//void Set_MISO(int); +////@param int CS +//void Set_CS(int); +////@param int CLK +//void Set_CLK(int); +////@param int BUSY +//void Set_BUSY(int); +////@param int RESET +//void Set_RESET(int); + + + +//int Get_MOSI(); +//int Get_MISO(); +//int Get_CS(); +//int Get_CLK(); +//int Get_BUSY(); +//int Get_RESET(); + + +//private: +// Member Variable + +//int MOSI = 0; +//int MISO = 0; +//int CS = 0; +//int CLK = 0; +//int BUSY = 0; +//int RESET = 0; +//}; + + +#endif /* CL6470_H_ */ diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/Motors_Driver/PowerSTEP01.h b/Software/Embedded_SW/Embedded/Drivers/FPGA/Motors_Driver/PowerSTEP01.h new file mode 100644 index 000000000..bf1fe91d5 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/Motors_Driver/PowerSTEP01.h @@ -0,0 +1,168 @@ +/* + * PowerSTEP01.h + * //Based on: + * //https://os.mbed.com/teams/ST/code/X_NUCLEO_IHM03A1/file/2fbfe0cd8d4d/Components/powerstep01/powerstep01.h/ + * + * Created on: Mar 5, 2019 + * Author: avi + */ + +#ifndef DRIVERS_FPGA_MOTERS_DRIVER_POWERSTEP01_H_ +#define DRIVERS_FPGA_MOTERS_DRIVER_POWERSTEP01_H_ + + +//powerSTEP01 +#define x_POWERSTEP01_GATECFG1 0x18 //Gate driver configuration 11 bit +#define x_POWERSTEP01_GATECFG2 0x19 //Gate driver configuration 8 bit +#define x_POWERSTEP01_STATUS 0x1B //x_GET_STATUS is the same as in L6470 +#define x_POWERSTEP01_CONFIG 0x1A + +#define x_KVAL_TVAL_HOLD 0x09 +#define x_KVAL_TVAL_RUN 0x0A +#define x_KVAL_TVAL_ACC 0x0B +#define x_KVAL_TVAL_DEC 0x0C +#define x_ST_SLP_T_FAST 0x0E +#define x_FN_SLP_ACC_TON_MIN 0x0F +#define x_FN_SLP_DEC_TOFF_MIN 0x10 + +///Shift of TCC field in GATECFG1 register +#define POWERSTEP01_TCC_SHIFT (0) +///Shift of IGATE field in GATECFG1 register +#define POWERSTEP01_IGATE_SHIFT (5) +///Shift of TBOOST field in GATECFG1 register +#define POWERSTEP01_TBOOST_SHIFT (8) + +///Shift of TBLANK field in GATECFG2 register +#define POWERSTEP01_TBLANK_SHIFT (5) +///Shift of TDT field in GATECFG2 register +#define POWERSTEP01_TDT_SHIFT (0) + +/// masks for GATECFG1 register of PowerStep01 +typedef enum { + POWERSTEP01_GATECFG1_TCC_MASK = ((uint16_t)0x001F), + POWERSTEP01_GATECFG1_IGATE_MASK = ((uint16_t)0x00E0), + POWERSTEP01_GATECFG1_TBOOST_MASK = ((uint16_t)0x0700), + POWERSTEP01_GATECFG1_WD_EN = ((uint16_t)0x0800) +} powerstep01_GateCfg1Masks_t; + +/// Control current Time (field TCC of GATECFG1 register of PowerStep01) +typedef enum { + POWERSTEP01_TCC_125ns = (((uint8_t)0x00)< Date: Mon, 18 Mar 2019 10:43:33 +0200 Subject: fix typo + add global index for vme file --- Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c | 4 ++-- .../Embedded/Drivers/FPGA/Full_Vme/ispvme/ispvm_ui.c | 11 ++++++++++- .../Embedded/Drivers/FPGA/Full_Vme/ispvme/ivm_core.c | 2 +- .../Embedded/Drivers/FPGA/Full_Vme/ispvme/vmopcode.h | 2 ++ .../Embedded_SW/Embedded/Drivers/FPGA/Motors_Driver/L6470.c | 4 +--- .../Embedded/Drivers/FPGA/Motors_Driver/PowerSTEP01.h | 6 +++--- Software/Embedded_SW/Embedded/Drivers/Motors/Motor.c | 4 +--- Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c | 2 +- Software/Embedded_SW/Embedded/Drivers/SPI/SPI_Comm.c | 4 ++-- .../Embedded/Modules/AlarmHandling/AlarmHandling.c | 2 +- .../Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Dancer.c | 3 +-- .../Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_L6470.c | 3 +-- .../Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Motor.c | 3 +-- .../Embedded/Modules/Stubs_Handler/Stub_SpeedSensor.c | 3 +-- .../Embedded/Modules/Stubs_Handler/Stub_TempSensor.c | 3 +-- Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c | 3 +-- 16 files changed, 30 insertions(+), 29 deletions(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c index e8b46084c..87a1515af 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_SPI_Comm.c @@ -3,9 +3,9 @@ #include #include #include +#include +#include #include "FPGA_SPI_Comm.h" -#include "drivers/FPGA/Moters_Driver/L6470.h" -#include "drivers/FPGA/Moters_Driver/PowerSTEP01.h" #include "Drivers/Motors/Motor.h" #include "modules/control/millisecTask.h" #include "modules/thread/thread.h" diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/Full_Vme/ispvme/ispvm_ui.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/Full_Vme/ispvme/ispvm_ui.c index c216b9aad..a18d5bb76 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/Full_Vme/ispvme/ispvm_ui.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/Full_Vme/ispvme/ispvm_ui.c @@ -38,7 +38,7 @@ * 08/28/08 NN Added Calculate checksum support. ***************************************************************/ - +#include "Include.h" #include #include #include @@ -53,6 +53,8 @@ FILE * g_pVMEFile = NULL; +uint32_t vme_index = 0; + /*************************************************************** * * Functions declared in this ispvm_ui.c module @@ -197,6 +199,8 @@ unsigned char GetByte() ucData = s[0]; //////// + + //if ( feof( g_pVMEFile ) ) avi- if(rc == 0) //avi+ { @@ -212,6 +216,11 @@ unsigned char GetByte() } + else + { + vme_index++; + } + /*************************************************************** * * Calculate the 32-bit CRC if the expected CRC exist. diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/Full_Vme/ispvme/ivm_core.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/Full_Vme/ispvme/ivm_core.c index 62a2b3b0e..b4613b7d3 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/Full_Vme/ispvme/ivm_core.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/Full_Vme/ispvme/ivm_core.c @@ -22,7 +22,7 @@ * the ispVMLCOUNT function * ***************************************************************/ - +#include "Include.h" #include #include #include "vmopcode.h" diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/Full_Vme/ispvme/vmopcode.h b/Software/Embedded_SW/Embedded/Drivers/FPGA/Full_Vme/ispvme/vmopcode.h index cdd05fd12..a6b5af2f1 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/Full_Vme/ispvme/vmopcode.h +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/Full_Vme/ispvme/vmopcode.h @@ -206,3 +206,5 @@ typedef struct { unsigned short usNegativeIndex; unsigned char ucUpdate; } LVDSPair; + +extern uint32_t vme_index; diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/Motors_Driver/L6470.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/Motors_Driver/L6470.c index cd0b09b93..f92278657 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/Motors_Driver/L6470.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/Motors_Driver/L6470.c @@ -7,6 +7,7 @@ //#include "graphics_adapter.h" //#include "Embedded/include.h" #include +#include #include #include #include "drivers/SPI/SPI_Comm.h" @@ -18,9 +19,6 @@ ////////////// //#include "stdafx.h" -#include "L6470.h" -//#include "FPGA_Comm.h" -// To use time library of C #include //int volatile * const MOSI_Reg = (int *)MOSI_BASE; diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/Motors_Driver/PowerSTEP01.h b/Software/Embedded_SW/Embedded/Drivers/FPGA/Motors_Driver/PowerSTEP01.h index bf1fe91d5..ab99cc340 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/Motors_Driver/PowerSTEP01.h +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/Motors_Driver/PowerSTEP01.h @@ -7,8 +7,8 @@ * Author: avi */ -#ifndef DRIVERS_FPGA_MOTERS_DRIVER_POWERSTEP01_H_ -#define DRIVERS_FPGA_MOTERS_DRIVER_POWERSTEP01_H_ +#ifndef DRIVERS_FPGA_MOTORS_DRIVER_POWERSTEP01_H_ +#define DRIVERS_FPGA_MOTORS_DRIVER_POWERSTEP01_H_ //powerSTEP01 @@ -165,4 +165,4 @@ typedef enum { POWERSTEP01_TDT_4000ns = (((uint8_t)0x1F)< +#include #include "include.h" #include "motor.h" #include "Modules/thread/thread.h" @@ -25,9 +26,6 @@ #include "drivers/FPGA/FPGA_SPI_Comm.h" #include "drivers/FPGA/FPGA_Comm.h" #include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" -#include "drivers/FPGA/Moters_Driver/L6470.h" - -///////////////////////// #include "driverlib/ssi.h" extern unsigned long Run_Value ; diff --git a/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c b/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c index a9cb3b01e..75870d4f7 100644 --- a/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c +++ b/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c @@ -12,6 +12,7 @@ *************************************************************************************************/ #include +#include #include "include.h" #include "motor.h" #include "Modules/thread/thread.h" @@ -25,7 +26,6 @@ #include "drivers/FPGA/FPGA_SPI_Comm.h" #include "drivers/FPGA/FPGA_Comm.h" #include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" -#include "drivers/FPGA/Moters_Driver/L6470.h" #include "drivers/SSI_Comm/Dancer/Dancer.h" ///////////////////////// diff --git a/Software/Embedded_SW/Embedded/Drivers/SPI/SPI_Comm.c b/Software/Embedded_SW/Embedded/Drivers/SPI/SPI_Comm.c index 858fc01cb..43174ec89 100644 --- a/Software/Embedded_SW/Embedded/Drivers/SPI/SPI_Comm.c +++ b/Software/Embedded_SW/Embedded/Drivers/SPI/SPI_Comm.c @@ -13,8 +13,6 @@ #include "utils/uartstdio.h" //#include "graphics_adapter.h" -#include "drivers/FPGA/Moters_Driver/L6470.h" -#include "drivers/FPGA/Moters_Driver/PowerSTEP01.h" #include "PMR/Hardware/HardwareMotor.pb-c.h" //#include "drivers/FPGA/FPGA_Comm.h" @@ -22,6 +20,8 @@ #include #include #include +#include +#include #include "drivers/Motors/Motor.h" void temp_init_spi2(); diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c index 94c7614d1..570121f73 100644 --- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c +++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c @@ -11,6 +11,7 @@ #include "AlarmHandling.h" #include +#include #include #include @@ -46,7 +47,6 @@ #include "StateMachines/Printing/PrintingSTM.h" -#include "drivers/FPGA/Moters_Driver/L6470.h" #include "drivers/Motors/Motor.h" #include "drivers/Heater/TemperatureSensor.h" #include "drivers/Flash_ram/FlashProgram.h" diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Dancer.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Dancer.c index 61c7afe74..6bfb3f322 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Dancer.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Dancer.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -30,8 +31,6 @@ #include "drivers/FPGA/FPGA.h" #include "drivers/SPI/SPI_Comm.h" -#include "drivers/FPGA/Moters_Driver/L6470.h" - #include "driverlib/ssi.h" #include "drivers/SPI/SPI_Comm.h" #include "drivers/FPGA/FPGA_SSI_Comm.h" diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_L6470.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_L6470.c index 658205327..636889127 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_L6470.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_L6470.c @@ -1,6 +1,7 @@ #include #include +#include #include #include #include @@ -19,8 +20,6 @@ //#include "drivers/FPGA/FPGA.h" #include "drivers/SPI/SPI_Comm.h" -#include "drivers/FPGA/Moters_Driver/L6470.h" - #include "driverlib/ssi.h" unsigned long Run_Value = 136902 ; diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Motor.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Motor.c index 65ede8fac..0854aba40 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Motor.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Motor.c @@ -1,6 +1,7 @@ #include #include +#include #include #include #include @@ -37,8 +38,6 @@ #include "drivers/FPGA/FPGA.h" #include "drivers/SPI/SPI_Comm.h" -#include "drivers/FPGA/Moters_Driver/L6470.h" - #include "driverlib/ssi.h" #include "drivers/SPI/SPI_Comm.h" #include "Modules/Thread/Thread_ex.h" diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_SpeedSensor.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_SpeedSensor.c index eea594817..4e6c4cf84 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_SpeedSensor.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_SpeedSensor.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -28,8 +29,6 @@ #include "drivers/FPGA/FPGA.h" #include "drivers/SPI/SPI_Comm.h" -#include "drivers/FPGA/Moters_Driver/L6470.h" - #include "driverlib/ssi.h" #include "drivers/SPI/SPI_Comm.h" #include "drivers/FPGA/FPGA_SSI_Comm.h" diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_TempSensor.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_TempSensor.c index f25a79b15..c320cca80 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_TempSensor.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_TempSensor.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -29,8 +30,6 @@ #include "drivers/FPGA/FPGA.h" #include "drivers/SPI/SPI_Comm.h" -#include "drivers/FPGA/Moters_Driver/L6470.h" - #include "driverlib/ssi.h" #include "drivers/SPI/SPI_Comm.h" #include "drivers/FPGA/FPGA_SSI_Comm.h" diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c index a1e91f6fc..c277dd5df 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c @@ -2,6 +2,7 @@ **************************************************************************************************************************/ #include +#include #include "include.h" #include "PMR/Hardware/UploadHardWareConfigurationRequest.pb-c.h" @@ -17,8 +18,6 @@ #include "drivers/Flash_Memory/fatfs/ff.h" #include "drivers/SSI_Comm/Dancer/Dancer.h" -#include "drivers/FPGA/Moters_Driver/PowerSTEP01.h" - #include "thread.h" MotorDriverConfigStruc MotorsCfg[NUM_OF_MOTORS]={0}; HardwarePidControl MotorsControl[MAX_THREAD_MOTORS_NUM] = {0}; -- cgit v1.3.1 From 270559636c37928e6221384a485901380acd6f28 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Mon, 18 Mar 2019 18:09:10 +0200 Subject: IDS cleaning basic functions --- Software/Embedded_SW/Embedded/Modules/IDS/IDS.h | 4 ++ .../Embedded/Modules/IDS/IDS_Cleaning.c | 56 ++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 Software/Embedded_SW/Embedded/Modules/IDS/IDS_Cleaning.c (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS.h b/Software/Embedded_SW/Embedded/Modules/IDS/IDS.h index e7e6f3ff6..3a025664b 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS.h +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS.h @@ -32,5 +32,9 @@ void IDS_Dispenser_RefillStarted (char DispenserId); void IDS_Dispenser_RefillEnded (char DispenserId); void IDS_Dispenser_MovingDirection (char DispenserId, bool direction); +uint32_t IDS_Cleaning_Move_Rockers (int LeftRockerSpeed,int RightRockerSpeed); +uint32_t IDS_Cleaning_Center_And_Stop_Rockers (int timeout,callback_fptr callback); +uint32_t IDS_Cleaning_Spray_Cleaning_Solution (int dispenserSpeed,callback_fptr callback); +uint32_t IDS_Cleaning_Stop_Cleaning_Solution (callback_fptr callback); #endif //MODULES_IDS_IDS_H_ diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_Cleaning.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_Cleaning.c new file mode 100644 index 000000000..02f25cb59 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_Cleaning.c @@ -0,0 +1,56 @@ +/* + * IDS_Cleaning.c + * + * Created on: 18 áîøõ 2019 + * Author: User + */ +#include "include.h" +#include "ids.h" +#include "ids_ex.h" +#include "../control/control.h" +#include "../control/pidalgo.h" +#include "../thread/thread.h" +#include "PMR/Hardware/Hardwaremotor.pb-c.h" +#include "PMR/Hardware/HardwareDispenser.pb-c.h" +#include "StateMachines/Printing/printingSTM.h" +#include "drivers/motors/motor.h" +#include "drivers/valves/valve.h" + +int SaveLeftRockerSpeed = 50, SaveRightRockerSpeed = 50; +#define CLEANING_DISPENSER_ID 6 +uint32_t IDS_Cleaning_Move_Rockers (int LeftRockerSpeed,int RightRockerSpeed) +{ + uint32_t status = OK; + SaveLeftRockerSpeed = LeftRockerSpeed; + SaveRightRockerSpeed = RightRockerSpeed; + status |= MotorSetDirection(HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD].directionthreadwize); + status |= MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD, RightRockerSpeed); + status |= MotorSetDirection(HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANMECH,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANMECH].directionthreadwize); + status |= MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANMECH, LeftRockerSpeed); + + return status; +} +uint32_t IDS_Cleaning_Center_And_Stop_Rockers (int timeout,callback_fptr callback) +{ + uint32_t status = OK; + status |= MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD].directionthreadwize, SaveRightRockerSpeed, Motor_Id_to_LS_IdUp[HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD], callback,timeout); + status |= MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANMECH,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANMECH].directionthreadwize, SaveLeftRockerSpeed, Motor_Id_to_LS_IdUp[HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANMECH], callback,timeout); + + return status; +} +uint32_t IDS_Cleaning_Spray_Cleaning_Solution (int dispenserSpeed,callback_fptr callback) +{ + uint32_t status = OK; + status = IDS_Dispenser_Start_Motor_and_Open_Valve(CLEANING_DISPENSER_ID, dispenserSpeed, callback); + + return status; + +} +uint32_t IDS_Cleaning_Stop_Cleaning_Solution (callback_fptr callback) +{ + uint32_t status = OK; + status = IDS_Dispenser_Close_Valve_And_Stop_Motor(CLEANING_DISPENSER_ID,callback); + + return status; + +} -- cgit v1.3.1 From 7080d6422a5c20b2acd0562fa2d8b3c91ba1590d Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Tue, 19 Mar 2019 11:27:51 +0200 Subject: Version 1.3.8.0 lock --- .../Embedded_SW/Embedded/Common/SW_Info/SW_Info.c | 2 +- .../PMR/Debugging/DebugLogCategory.pb-c.h | 2 +- .../Embedded_SW/Embedded/Drivers/Motors/Motor.h | 1 - Software/Embedded_SW/Embedded/Main.c | 3 +- .../Embedded/Modules/AlarmHandling/AlarmHandling.c | 58 +++++++++++++--------- .../Embedded/Modules/Heaters/Heaters_print.c | 5 +- Software/Embedded_SW/Embedded/Modules/IDS/IDS.h | 1 + .../Embedded/Modules/IDS/IDS_dispenser.c | 10 +--- Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h | 4 -- .../Embedded_SW/Embedded/Modules/IDS/IDS_print.c | 27 +--------- .../Embedded/Modules/Thread/Thread_print.c | 4 +- .../EmbeddedParameters/AlarmSourceType.proto | 4 ++ .../ConfigurationParameters.proto | 4 ++ 13 files changed, 54 insertions(+), 71 deletions(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c index 5efeaa71d..336cfd9aa 100644 --- a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c +++ b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c @@ -20,7 +20,7 @@ typedef struct } TangoVersion_t; -TangoVersion_t _gTangoVersion = {1,3,7,9}; +TangoVersion_t _gTangoVersion = {1,3,8,0}; #define BUILD_DATE __DATE__ char Dat[50] = BUILD_DATE; char _gTangoName [MAX_STRING_LEN] = "Tango01 ";//d diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/DebugLogCategory.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/DebugLogCategory.pb-c.h index 1fda3ab01..d97b42d33 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/DebugLogCategory.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Debugging/DebugLogCategory.pb-c.h @@ -24,7 +24,7 @@ typedef enum _DebugLogCategory { DEBUG_LOG_CATEGORY__Warning = 1, DEBUG_LOG_CATEGORY__Error = 2, DEBUG_LOG_CATEGORY__Critical = 3, - DEBUG_LOG_CATEGORY__Safety = 4 + DEBUG_LOG_CATEGORY__Debug = 4 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(DEBUG_LOG_CATEGORY) } DebugLogCategory; diff --git a/Software/Embedded_SW/Embedded/Drivers/Motors/Motor.h b/Software/Embedded_SW/Embedded/Drivers/Motors/Motor.h index ecc70765b..7599c10db 100644 --- a/Software/Embedded_SW/Embedded/Drivers/Motors/Motor.h +++ b/Software/Embedded_SW/Embedded/Drivers/Motors/Motor.h @@ -201,7 +201,6 @@ uint32_t MotorMovetoBreakSensor (TimerMotors_t _motorId,bool direction, uint32_t uint32_t MotorMovetoDancerPosition (TimerMotors_t _motorId,bool direction, uint32_t Freq,uint32_t DancerId,bool dancervaluedirection, callback_fptr callback,uint32_t timeout); uint32_t MotorAbortMovetoLimitSwitch (TimerMotors_t _motorId); uint32_t MotorMoveToStopper (TimerMotors_t _motorId,bool direction, uint32_t Speed, callback_fptr callback,uint32_t backlash,uint32_t timeout); -uint32_t MotorMovetoEncoderPosition (TimerMotors_t MotorId, callback_fptr callback,uint32_t timeout); uint32_t MotorGoTo(TimerMotors_t _motorIdn, uint32_t Steps); #endif /* DRIVERS_MOTOR_H_ */ diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c index fc3d09402..64f4380a8 100644 --- a/Software/Embedded_SW/Embedded/Main.c +++ b/Software/Embedded_SW/Embedded/Main.c @@ -58,14 +58,13 @@ #include "Drivers/I2C_Communication/I2C.h" -#include "Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.h" +//#include "Drivers/I2C_Communication/Dispensers_EEPROM_MUX/Disp_EEPROM_MUX.h" #include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" #include "drivers/Flash_Memory/FATFS/ff.h" #include "drivers/Flash_Memory/FATFS/Control_File_System.h" - //#define WATCHDOG //***************************************************************************** // diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c index 94c7614d1..fa46a84e4 100644 --- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c +++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c @@ -270,15 +270,24 @@ const AlarmHandlingItemStruc HardCodedAlarmItem[MAX_SYSTEM_ALARMS]={ { eOneSecond, MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANMECH , HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANMECH , x_STATUS_UVLO , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_CLEANING_MECHANISM_MOTOR_UNDERVOLTAGE ," MotorDyeingHeadCleaningUnderVoltage " }, /* 5038 */ { eOneSecond, MotorAlarm, HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD , HARDWARE_MOTOR_TYPE__MOTO_DH_CLEANHEAD , x_STATUS_UVLO , FALSE , DEBUG_LOG_CATEGORY__Error , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_CLEANING_HEAD_MOTOR_UNDERVOLTAGE ," MotorDyeingHeadCleaningHeadUnderVoltage " }, /* 5042 */ -// { eOneSecond, CurrentAlarm, HEAD_ZONE_1 , HEAD_ZONE_1 , 312 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_1_CURRENT_OUT_OF_RANGE ," Head Zone 1 Heater Current Out Of Range " }, /* 5018 */ -// { eOneSecond, CurrentAlarm, HEAD_ZONE_2 , HEAD_ZONE_2 , 187 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_2_CURRENT_OUT_OF_RANGE ," Head Zone 2 Heater Current Out Of Range " }, /* 5019 */ -// { eOneSecond, CurrentAlarm, HEAD_ZONE_3 , HEAD_ZONE_3 , 187 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_3_CURRENT_OUT_OF_RANGE ," Head Zone 3 Heater Current Out Of Range " }, /* 5020 */ -// { eOneSecond, CurrentAlarm, HEAD_ZONE_4 , HEAD_ZONE_4 , 312 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_4_CURRENT_OUT_OF_RANGE ," Head Zone 4 Heater Current Out Of Range " }, /* 5021 */ -// { eOneSecond, CurrentAlarm, HEAD_ZONE_5_6 , HEAD_ZONE_5_6 , 312 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_5_6_CURRENT_OUT_OF_RANGE ," Head Zone 5-6 Heater Current Out Of Range " }, /* 5022 */ -// { eOneSecond, CurrentAlarm, MIXCHIP , MIXCHIP , 187 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__MIXER_CURRENT_OUT_OF_RANGE ," Mixer Heater Current Out Of Range " }, /* 6004 */ -// { eOneSecond, CurrentAlarm, DRYER_CURRENT_1, DRYER_CURRENT_1, 1 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DRYER_HEATERS_ZONE_1_CURRENT_OUT_OF_RANGE ," Drier Heater 1 Current Out Of Range " }, /* 6004 */ -// { eOneSecond, CurrentAlarm, DRYER_CURRENT_2, DRYER_CURRENT_2, 1 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DRYER_HEATERS_ZONE_2_CURRENT_OUT_OF_RANGE ," Drier Heater 2 Current Out Of Range " }, /* 6004 */ -// {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Safety,0xFF,0,EVENT_TYPE__DYEING_HEAD_THERMAL_CUTOFF,"Dyeing head Thermal Cut-Off"}, +// { eOneSecond, CurrentAlarm, HEAD_ZONE_1 , HEAD_ZONE_1 , 125 , TRUE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_1_CURRENT_OUT_OF_RANGE ," Head Zone 1 Heater Current Out Of Range " }, /* 5018 */ +// { eOneSecond, CurrentAlarm, HEAD_ZONE_2 , HEAD_ZONE_2 , 187 , TRUE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_2_CURRENT_OUT_OF_RANGE ," Head Zone 2 Heater Current Out Of Range " }, /* 5019 */ +// { eOneSecond, CurrentAlarm, HEAD_ZONE_3 , HEAD_ZONE_3 , 187 , TRUE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_3_CURRENT_OUT_OF_RANGE ," Head Zone 3 Heater Current Out Of Range " }, /* 5020 */ +// { eOneSecond, CurrentAlarm, HEAD_ZONE_4 , HEAD_ZONE_4 , 312 , TRUE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_4_CURRENT_OUT_OF_RANGE ," Head Zone 4 Heater Current Out Of Range " }, /* 5021 */ +// { eOneSecond, CurrentAlarm, HEAD_ZONE_5_6 , HEAD_ZONE_5_6 , 500 , TRUE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_5_6_CURRENT_OUT_OF_RANGE ," Head Zone 5-6 Heater Current Out Of Range " }, /* 5022 */ +// { eOneSecond, CurrentAlarm, MIXCHIP , MIXCHIP , 187 , TRUE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__MIXER_CURRENT_OUT_OF_RANGE ," Mixer Heater Current Out Of Range " }, /* 6004 */ +// { eOneSecond, CurrentAlarm, DRYER_CURRENT_1, DRYER_CURRENT_1, 800 , TRUE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DRYER_HEATERS_ZONE_1_CURRENT_OUT_OF_RANGE ," Drier Heater 1 Current Out Of Range " }, /* 6004 */ +// { eOneSecond, CurrentAlarm, DRYER_CURRENT_2, DRYER_CURRENT_2, 400 , TRUE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DRYER_HEATERS_ZONE_2_CURRENT_OUT_OF_RANGE ," Drier Heater 2 Current Out Of Range " }, /* 6004 */ + + // { eOneSecond, CurrentAlarm, HEAD_ZONE_1 , HEAD_ZONE_1 , 0 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_1_CURRENT_LOOP_BREAK ," Head Zone 1 Heater Current Loop Break " }, /* 5018 */ + // { eOneSecond, CurrentAlarm, HEAD_ZONE_2 , HEAD_ZONE_2 , 0 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_2_CURRENT_LOOP_BREAK ," Head Zone 2 Heater Current Loop Break " }, /* 5019 */ + // { eOneSecond, CurrentAlarm, HEAD_ZONE_3 , HEAD_ZONE_3 , 0 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_3_CURRENT_LOOP_BREAK ," Head Zone 3 Heater Current Loop Break " }, /* 5020 */ + // { eOneSecond, CurrentAlarm, HEAD_ZONE_4 , HEAD_ZONE_4 , 0 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_4_CURRENT_LOOP_BREAK ," Head Zone 4 Heater Current Loop Break " }, /* 5021 */ + // { eOneSecond, CurrentAlarm, HEAD_ZONE_5_6 , HEAD_ZONE_5_6 , 0 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DYEING_HEAD_ZONE_5_6_CURRENT_LOOP_BREAK ," Head Zone 5-6 Heater Current Loop Break " }, /* 5022 */ + // { eOneSecond, CurrentAlarm, MIXCHIP , MIXCHIP , 0 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__MIXER_CURRENT_LOOP_BREAK ," Mixer Heater Current Loop Break " }, /* 6004 */ + // { eOneSecond, CurrentAlarm, DRYER_CURRENT_1, DRYER_CURRENT_1, 0 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DRYER_HEATERS_ZONE_1_CURRENT_LOOP_BREAK ," Drier Heater 1 Current Loop Break " }, /* 6004 */ + // { eOneSecond, CurrentAlarm, DRYER_CURRENT_2, DRYER_CURRENT_2, 0 , FALSE , DEBUG_LOG_CATEGORY__Warning , 0xFF , 2 , EVENT_TYPE__DRYER_HEATERS_ZONE_2_CURRENT_LOOP_BREAK ," Drier Heater 2 Current Loop Break " }, /* 6004 */ +// {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DYEING_HEAD_THERMAL_CUTOFF,"Dyeing head Thermal Cut-Off"}, {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__THREAD_BREAK,"Thread Break"}, {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__THREAD_TENSION_CONTROL_FAILURE_FEEDER_DANCER,"Thread Feeder Tension Control Failure"}, @@ -286,18 +295,20 @@ const AlarmHandlingItemStruc HardCodedAlarmItem[MAX_SYSTEM_ALARMS]={ {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__THREAD_TENSION_CONTROL_FAILURE_WINDER_DANCER,"Thread Winder Tension Control Failure"}, {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Warning,0xFF,0,EVENT_TYPE__WINDER_CONE_DOES_NOT_EXIST,"No cone in winder"}, - {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Safety,0xFF,0,EVENT_TYPE__DISPENSER_1_OVERPRESSURE,"Dispenser 1 OverPressure"}, - {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Safety,0xFF,0,EVENT_TYPE__DISPENSER_2_OVERPRESSURE,"Dispenser 2 OverPressure"}, - {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Safety,0xFF,0,EVENT_TYPE__DISPENSER_3_OVERPRESSURE,"Dispenser 3 OverPressure"}, - {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Safety,0xFF,0,EVENT_TYPE__DISPENSER_4_OVERPRESSURE,"Dispenser 4 OverPressure"}, - {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Safety,0xFF,0,EVENT_TYPE__DISPENSER_5_OVERPRESSURE,"Dispenser 5 OverPressure"}, - {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Safety,0xFF,0,EVENT_TYPE__DISPENSER_6_OVERPRESSURE,"Dispenser 6 OverPressure"}, - {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Safety,0xFF,0,EVENT_TYPE__DISPENSER_7_OVERPRESSURE,"Dispenser 7 OverPressure"}, - {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Safety,0xFF,0,EVENT_TYPE__DISPENSER_8_OVERPRESSURE,"Dispenser 8 OverPressure"}, - - {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Safety,0xFF,0,EVENT_TYPE__DRYER_DOOR_OPEN,"Dryer Door is open"}, - {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Safety,0xFF,0,EVENT_TYPE__NO_AIR_PRESSURE,"No suction in the waste handling system"}, - {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Safety,0xFF,0,EVENT_TYPE__AIR_FILTER_NOT_INSTALLED,"Air filter missing"}, + {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DISPENSER_1_OVERPRESSURE,"Dispenser 1 OverPressure"}, + {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DISPENSER_2_OVERPRESSURE,"Dispenser 2 OverPressure"}, + {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DISPENSER_3_OVERPRESSURE,"Dispenser 3 OverPressure"}, + {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DISPENSER_4_OVERPRESSURE,"Dispenser 4 OverPressure"}, + {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DISPENSER_5_OVERPRESSURE,"Dispenser 5 OverPressure"}, + {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DISPENSER_6_OVERPRESSURE,"Dispenser 6 OverPressure"}, + {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DISPENSER_7_OVERPRESSURE,"Dispenser 7 OverPressure"}, + {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DISPENSER_8_OVERPRESSURE,"Dispenser 8 OverPressure"}, + + {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__DRYER_DOOR_OPEN,"Dryer Door is open"}, + {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__NO_AIR_PRESSURE,"No suction in the waste handling system"}, + {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Critical,0xFF,0,EVENT_TYPE__AIR_FILTER_NOT_INSTALLED,"Air filter missing"}, + {eOneSecond,DoNotPollAlarm,0,0,0,0,DEBUG_LOG_CATEGORY__Error,0xFF,0,EVENT_TYPE__WASTE_CONTAINER_EMPTYING_TIMEOUT,"Waste Container Emptying Timeout"}, + }; char AlarmStorePath[25] = "0://SysInfo//AlarmPrm.cfg"; @@ -393,7 +404,6 @@ uint32_t AlarmHandlingConsequentActions(uint32_t AlarmId, DebugLogCategory Sever //raise flag fr next job break; case DEBUG_LOG_CATEGORY__Critical: - case DEBUG_LOG_CATEGORY__Safety: // watchdogCriticalAlarm = true; LOG_ERROR(AlarmId,"Critical Alarm - Watchdog activated to reset hardware"); @@ -742,14 +752,14 @@ uint32_t AlarmHandlingLoop(uint32_t tick) value = Get_Heaters_Current_Integer(AlarmItem[Alarm_i].DeviceId); if (AlarmItem[Alarm_i].AlarmDirection == true) { - if (value >= AlarmItem[Alarm_i].AlarmValue) + if ((value >= (AlarmItem[Alarm_i].AlarmValue*1.07))||(value <= (AlarmItem[Alarm_i].AlarmValue*0.80))) { Status = true; } } else { - if (value <= AlarmItem[Alarm_i].AlarmValue) + if (value == 0) { Status = true; } diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index a6fbe3ebc..8b9db2126 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -385,7 +385,7 @@ uint32_t HeaterCommandRequestMessage(int HeaterId, bool OnOff, int Temperature) PrepareHeater(HeaterId,Temperature); //prepare the heaters control info //set the power balance handler (if not set yet) // if the heater is off (?) start it. - ActivateHeater(HeaterId); + //ActivateHeater(HeaterId); //set the heater operation mode to fast heating - depended on the current temperature // timers are prepared but not started yet!!! only when the system is hot. @@ -518,7 +518,7 @@ uint32_t PrepareHeater(int HeaterId, uint32_t SetTemperatue) return ERROR; } - //Report("PrepareHeater ", __FILE__,__LINE__,HeaterId, SetTemperatue, 0, 0); + Report("PrepareHeater ", __FILE__,__LINE__,HeaterId, SetTemperatue, 0, 0); //start thread control for all motors HeaterPIDConfig[HeaterId].m_params.MAX = HeaterControl[HeaterId].outputproportionalpowerlimit*100; @@ -699,6 +699,7 @@ uint32_t DcHeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t eadValue) } } DeActivateHeater(index); + HeaterRecalculateHeaterParams(index, 0); HeaterMaxTempFlag[index] = true; //LOG_ERROR ((MinreadValue/100), "Heater Over the max temperature, turned off"); Report("Heater Over the max temperature, turned off",__FILE__,__LINE__,index,RpWarning,HeaterPreviousRead[index], HeaterControl[index].sensormaxvalue); diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS.h b/Software/Embedded_SW/Embedded/Modules/IDS/IDS.h index e7e6f3ff6..d27fb7c56 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS.h +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS.h @@ -31,6 +31,7 @@ void IDS_Dispenser_Set_Flow_Params (char DispenserId,double NanoLitterPerPulse,c void IDS_Dispenser_RefillStarted (char DispenserId); void IDS_Dispenser_RefillEnded (char DispenserId); void IDS_Dispenser_MovingDirection (char DispenserId, bool direction); +uint32_t IDS_Dispenser_Build_Pressure(int DispenserId, callback_fptr callback); #endif //MODULES_IDS_IDS_H_ diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c index abfabe17d..acaf19744 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c @@ -62,15 +62,10 @@ uint32_t IdsGetMotorSpeed(uint32_t DispenserId) uint32_t IDS_Dispenser_Build_Pressure_Callback(uint32_t DispenserId, uint32_t ReadValue) { - uint32_t status; DispenserPrepareTime[DispenserId]+=DispenserPrepareTimeLag; if ((GetDispenserPressure(DispenserId)>=DispenserPreparePressure)||(DispenserPrepareTime[DispenserId]>=DispenserPrepareTimeout)) { - if (DispenserPrepareTime[DispenserId]>=DispenserPrepareTimeout) - status = ERROR; - else - status = OK; if (SafeRemoveControlCallback(DispenserControlId[DispenserId], IDS_Dispenser_Build_Pressure_Callback )==OK) DispenserControlId[DispenserId] = 0xFF; else @@ -81,12 +76,11 @@ uint32_t IDS_Dispenser_Build_Pressure_Callback(uint32_t DispenserId, uint32_t Re if (DispenserCallback[DispenserId]) { - - DispenserCallback[DispenserId](DispenserId,status); + DispenserCallback[DispenserId](DispenserId,ReadValue); DispenserCallback[DispenserId] = 0; } } - return status; + return OK; } uint32_t IDS_Dispenser_Build_Pressure(int DispenserId, callback_fptr callback) diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h index b201e6611..bf73ed7fa 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h @@ -39,9 +39,6 @@ uint32_t IDSSegmentState(void *JobDetails, int SegmentId); uint32_t IDSDistanceToSpoolState(void); uint32_t IDSEndState(void *JobDetails); -uint32_t IDS_StartLubrication(void); -uint32_t IDS_StopLubrication(void); - uint32_t IDS_DispenserPidRequestMessage(HardwarePidControl* request); uint32_t IDS_DispenserControlInit(); @@ -52,7 +49,6 @@ uint32_t IDS_Dispenser_Alarm_On (uint8_t deviceID); uint32_t IDS_Dispenser_Alarm_Off (uint8_t deviceID); uint32_t IDS_CheckDispenserLimitSwitch (LimitSwitchAlarms LS_Id); -uint32_t IDS_Dispenser_Build_Pressure(int DispenserId, callback_fptr callback); void IDS_Dispenser_SetTimeOutValues(uint32_t CloseTimeout, uint32_t OpenTimeout); void IDS_Dispenser_SetBackLashValues(double initialdispenserpressure, uint32_t initialdispensertimeout, uint32_t initialdispensertimelag); diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c index 0a9d40a15..2be233962 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c @@ -31,12 +31,11 @@ typedef struct PID_Config_Params m_params; }DispenserControlConfig_t; HardwarePidControl *DispensersControl;// = (HardwarePidControl *)GENHWCFG_MAP_IN_FLASH + 0x4000; -#define LUBRICANT_DISPENSER 7 -#define MAX_DYE_DISPENSERS 7 + int32_t DispenserSamples[MAX_SYSTEM_DISPENSERS][MAX_CONTROL_SAMPLES] = {0}; int DispenserSamplePointer[MAX_SYSTEM_DISPENSERS] = {0}; double DispenserNormalizedErrorCoEfficient[MAX_SYSTEM_DISPENSERS] = {0}; -double lubricant_speed = 0.0; + HardwarePidControlType ThreadDispenserIdToControlId[MAX_SYSTEM_DISPENSERS] = { HARDWARE_PID_CONTROL_TYPE__Dispenser1,HARDWARE_PID_CONTROL_TYPE__Dispenser2,HARDWARE_PID_CONTROL_TYPE__Dispenser3,HARDWARE_PID_CONTROL_TYPE__Dispenser4,HARDWARE_PID_CONTROL_TYPE__Dispenser5,HARDWARE_PID_CONTROL_TYPE__Dispenser6,HARDWARE_PID_CONTROL_TYPE__Dispenser7,HARDWARE_PID_CONTROL_TYPE__Dispenser8}; bool DispenserReady[MAX_SYSTEM_DISPENSERS] = {true}; @@ -161,13 +160,6 @@ void DispenserPrepareReady(void) if (JobTicket->segments[Segment_i]->brushstops[Brush_i]->dispensers[Dispenser_i]->nanolitterpersecond>0.0) { DispenserUsedInJob[DispenserId] = true; - if(DispenserId == LUBRICANT_DISPENSER) - { - lubricant_speed = JobTicket->segments[0]->brushstops[0]->dispensers[Dispenser_i]->nanolitterpersecond/ - JobTicket->segments[0]->brushstops[0]->dispensers[Dispenser_i]->nanoliterperpulse; - REPORT_MSG (lubricant_speed*100, "LUBRICANT_SPEED*100"); - } - } }//for dispenser }//if dispensers @@ -530,18 +522,3 @@ uint32_t IDSPreSegmentState(void *JobDetails, int SegmentId) return OK; } -uint32_t IDS_StartLubrication(void) -{ - IDS_Dispenser_Start_Motor_and_Open_Valve(LUBRICANT_DISPENSER,lubricant_speed,NULL); - Lubricant_2Way_Valve (START); - return OK; -} -uint32_t IDS_StopLubrication(void) -{ - if(DispenserUsedInJob[LUBRICANT_DISPENSER]) - { - IDS_Dispenser_Close_Valve_And_Stop_Motor(LUBRICANT_DISPENSER,IDS_Valve_EndValveReady); - Lubricant_2Way_Valve (STOP); - } - return OK; -} diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index f4dc6a170..6a8474438 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -30,7 +30,6 @@ #include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" #include "modules/heaters/heaters.h" #include "modules/General/process.h" -#include "modules/ids/ids_ex.h" #include "Modules/AlarmHandling/AlarmHandling.h" #include "Control/MillisecTask.h" @@ -709,7 +708,6 @@ uint32_t ThreadPreSegmentState(void *JobDetails, uint32_t SegmentId) MotorSetDirection((TimerMotors_t)HARDWARE_MOTOR_TYPE__MOTO_LLOADING,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_LLOADING].directionthreadwize); MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_LLOADING, 1); } - IDS_StartLubrication(); } // activate control fr all motors //set speed for both rocker motors @@ -809,7 +807,7 @@ char Endstr[150]; } MotorStop(HARDWARE_MOTOR_TYPE__MOTO_RLOADING,Hard_Hiz); MotorStop(HARDWARE_MOTOR_TYPE__MOTO_LLOADING,Hard_Hiz); - IDS_StopLubrication(); + return OK; } diff --git a/Software/PMR/Messages/EmbeddedParameters/AlarmSourceType.proto b/Software/PMR/Messages/EmbeddedParameters/AlarmSourceType.proto index 85f6f3dd6..46b6cf692 100644 --- a/Software/PMR/Messages/EmbeddedParameters/AlarmSourceType.proto +++ b/Software/PMR/Messages/EmbeddedParameters/AlarmSourceType.proto @@ -13,4 +13,8 @@ enum AlarmSourceType MotorAlarm = 4; CoversAlarm = 5; DoNotPollAlarm = 6; + HardLimitAlarm = 7; + TachoAlarm = 8; + FluidLevelAlarm = 9; + } diff --git a/Software/PMR/Messages/EmbeddedParameters/ConfigurationParameters.proto b/Software/PMR/Messages/EmbeddedParameters/ConfigurationParameters.proto index 9b7a5c8d7..733651a34 100644 --- a/Software/PMR/Messages/EmbeddedParameters/ConfigurationParameters.proto +++ b/Software/PMR/Messages/EmbeddedParameters/ConfigurationParameters.proto @@ -46,6 +46,10 @@ message ConfigurationParameters bool StartHeatingOnInitSequence = 20; // general storage for parameters that do not have a specific name updated repeated double GeneralParameters = 21; + //0: CheckHardLimitAlarms + //1: CheckCurrentAlarms + //2: checkTamperAlarms + // a limit percentage for current deviation below predefined level double CurrentAlarmLowLimit = 22; // a limit percentage for current deviation predefined level -- cgit v1.3.1 From 98daf1c80688585d2a34586c30a7ac0bf67dd91b Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Tue, 19 Mar 2019 11:52:26 +0200 Subject: PreVersion 1.3.8.1 lubrication, IDS presegment improvement start. alarm handling improved, pressure buildup on init, improve centering of drier arm. NON Operative, NOT TESTED! --- Software/Embedded_SW/Embedded/.cproject | 3 +- .../Embedded_SW/Embedded/Common/SW_Info/SW_Info.c | 2 +- .../PMR/Debugging/DebugLogCategory.pb-c.c | 4 +- .../PMR/EmbeddedParameters/AlarmSourceType.pb-c.c | 16 +- .../PMR/EmbeddedParameters/AlarmSourceType.pb-c.h | 5 +- .../ConfigurationParameters.pb-c.c | 110 ++++- .../ConfigurationParameters.pb-c.h | 18 +- .../Communication/PMR/Printing/JobTicket.pb-c.c | 19 +- .../Communication/PMR/Printing/JobTicket.pb-c.h | 4 +- .../Embedded/Drivers/FPGA/FPGA_SPI_Comm.c | 2 + .../Drivers/FPGA/Full_Vme/ispvme/ispvm_ui.c | 11 +- .../Drivers/FPGA/Full_Vme/ispvme/ivm_core.c | 2 +- .../Drivers/FPGA/Full_Vme/ispvme/vmopcode.h | 2 - .../Drivers/I2C_Communication/ADC_MUX/ADC_MUX.c | 5 + .../Drivers/I2C_Communication/ADC_MUX/ADC_MUX.h | 1 + .../Embedded_SW/Embedded/Drivers/Motors/Motor.h | 1 + .../Embedded/Drivers/Motors/MotorActions.c | 148 +++++- Software/Embedded_SW/Embedded/Embedded.cfg | 3 + Software/Embedded_SW/Embedded/Main.c | 1 - .../Embedded/Modules/AlarmHandling/AlarmHandling.c | 534 ++++++++++++--------- .../Embedded/Modules/AlarmHandling/AlarmHandling.h | 1 + .../Embedded/Modules/General/GeneralHardware.c | 6 +- .../Embedded/Modules/IDS/IDS_dispenser.c | 10 +- Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h | 4 + .../Embedded_SW/Embedded/Modules/IDS/IDS_maint.c | 4 +- .../Embedded_SW/Embedded/Modules/IDS/IDS_print.c | 74 ++- .../Embedded/Modules/Thread/ThreadLoad.c | 1 + .../Embedded/Modules/Thread/Thread_Winder.c | 12 +- .../Embedded/Modules/Thread/Thread_print.c | 7 +- .../Embedded/Software Release Notes.txt | 2 +- .../StateMachines/Initialization/InitSequence.c | 25 +- 31 files changed, 742 insertions(+), 295 deletions(-) (limited to 'Software/Embedded_SW') diff --git a/Software/Embedded_SW/Embedded/.cproject b/Software/Embedded_SW/Embedded/.cproject index ae0630bbb..2dfc05eca 100644 --- a/Software/Embedded_SW/Embedded/.cproject +++ b/Software/Embedded_SW/Embedded/.cproject @@ -329,7 +329,6 @@