aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-07-24 14:50:36 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-07-24 14:50:36 +0300
commit0e53a2b07c26097bf623fd9dada4e2a319820f8d (patch)
treeaf2f221362282b9cdcd8a97a705cb543ff2b2509 /Software/Embedded_SW/Embedded
parent5745b53fecedff15275cc0369ddd090f81e13775 (diff)
parent50a7c87bfa117e55979e9d94e69688661608092c (diff)
downloadTango-0e53a2b07c26097bf623fd9dada4e2a319820f8d.tar.gz
Tango-0e53a2b07c26097bf623fd9dada4e2a319820f8d.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded')
-rw-r--r--Software/Embedded_SW/Embedded/Communication/CommunicationTask.c2
-rw-r--r--Software/Embedded_SW/Embedded/Communication/Connection.c2
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/Uart_Comm/Uart.c25
-rw-r--r--Software/Embedded_SW/Embedded/Main.c3
-rw-r--r--Software/Embedded_SW/Embedded/Modules/AlarmHandling/Diagnostics.c21
-rw-r--r--Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c2
-rw-r--r--Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h2
7 files changed, 36 insertions, 21 deletions
diff --git a/Software/Embedded_SW/Embedded/Communication/CommunicationTask.c b/Software/Embedded_SW/Embedded/Communication/CommunicationTask.c
index 8d0f65bbe..ce90617f9 100644
--- a/Software/Embedded_SW/Embedded/Communication/CommunicationTask.c
+++ b/Software/Embedded_SW/Embedded/Communication/CommunicationTask.c
@@ -146,7 +146,7 @@ int32_t SetCommunicationPath(bool UARTorUSB)
* ======== communicationTask ========
* Task for this function is created statically. See the project's .cfg file.
* this communication task is created statically in system initialization, in blocking mode
- * over one of the chosen ommunication methods (USB or Blutooth).
+ * over one of the chosen Communication methods (USB or Bluetooth).
******************************************************************************/
void communicationTxTask(UArg arg0, UArg arg1)
{
diff --git a/Software/Embedded_SW/Embedded/Communication/Connection.c b/Software/Embedded_SW/Embedded/Communication/Connection.c
index f7d86cf27..c5bda84d2 100644
--- a/Software/Embedded_SW/Embedded/Communication/Connection.c
+++ b/Software/Embedded_SW/Embedded/Communication/Connection.c
@@ -64,7 +64,7 @@ void DisconnectionRequest(MessageContainer* requestContainer)
ReportStopReporting();
DiagnosticsStop();
HeatingStopReporting();
- JoStopReporting();
+ JobStopReporting();
UART_ResetBuffers();
//-------------------------------------------------------------------------------------------
uint8_t* container_buffer = malloc(message_container__get_packed_size(&responseContainer));
diff --git a/Software/Embedded_SW/Embedded/Drivers/Uart_Comm/Uart.c b/Software/Embedded_SW/Embedded/Drivers/Uart_Comm/Uart.c
index 73d5564cc..11669b632 100644
--- a/Software/Embedded_SW/Embedded/Drivers/Uart_Comm/Uart.c
+++ b/Software/Embedded_SW/Embedded/Drivers/Uart_Comm/Uart.c
@@ -68,7 +68,7 @@ void UARTIntHandler(UArg arg0);
void Init_U0(void)
{
- ROM_IntMasterDisable();
+ //ROM_IntMasterDisable();
UARTStdioConfig(0, U0_BAUDRATE, 120000000);
//
@@ -76,8 +76,6 @@ void Init_U0(void)
//
ROM_UARTIntClear(UART0_BASE, ROM_UARTIntStatus(UART0_BASE, false));
- //ROM_UARTIntEnable(UART0_BASE, (UART_INT_OE | UART_INT_BE | UART_INT_PE |
- // UART_INT_FE | UART_INT_RT | UART_INT_TX | UART_INT_RX));
//MAP_UARTIntRegister(INT_UART0,UARTIntHandler,0);
/* Install interrupt handler */
@@ -90,8 +88,10 @@ void Init_U0(void)
System_abort("Can't create UART Hwi");
}
- ROM_UARTIntEnable(UART0_BASE, /*UART_INT_TX |*/ 0x7F2);//UART_INT_RX );
- //???? trying to clear all uart problems ???
+// ROM_UARTIntEnable(UART0_BASE, /*UART_INT_TX |*/ UART_INT_RX );
+ ROM_UARTIntEnable(UART0_BASE, (UART_INT_RT | UART_INT_RX));
+// ROM_UARTIntEnable(UART0_BASE, (UART_INT_OE | UART_INT_BE | UART_INT_PE |
+// UART_INT_FE | UART_INT_RT | UART_INT_TX | UART_INT_RX));
ROM_UARTEnable(UART0_BASE);
@@ -101,7 +101,7 @@ void Init_U0(void)
//
ROM_IntEnable(INT_UART0);
- ROM_IntMasterEnable();
+ //ROM_IntMasterEnable();
}
@@ -114,6 +114,13 @@ uint32_t Uart_tx_Counter = 0;
uint32_t Uart_rx_Counter = 0;
uint32_t Uart_rx_TotalCounter = 0;
bool UartResetProcess = false;
+//uint32_t uart_INT_OECounter = 0;
+//uint32_t uart_INT_BECounter = 0;
+//uint32_t uart_INT_PECounter = 0;
+//uint32_t uart_INT_FECounter = 0;
+uint32_t uart_INT_RTCounter = 0;
+uint32_t uart_INT_RXCounter = 0;
+
//*****************************************************************************
//
// The UART interrupt handler.
@@ -151,6 +158,12 @@ void UARTIntHandler(UArg arg0)
// Get the interrrupt status.
//
ui32Status = ROM_UARTIntStatus(UART0_BASE, true);
+// if (ui32Status&UART_INT_OE) uart_INT_OECounter++;
+// if (ui32Status&UART_INT_BE) uart_INT_BECounter++;
+// if (ui32Status&UART_INT_PE) uart_INT_PECounter++;
+// if (ui32Status&UART_INT_FE) uart_INT_FECounter++;
+ if (ui32Status&UART_INT_RT) uart_INT_RTCounter++;
+ if (ui32Status&UART_INT_RX) uart_INT_RXCounter++;
//
// Clear the asserted interrupts.
diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c
index af5ef1c92..ecddb8f16 100644
--- a/Software/Embedded_SW/Embedded/Main.c
+++ b/Software/Embedded_SW/Embedded/Main.c
@@ -188,10 +188,11 @@ int main(void)
//Test_Write_Flash_Buf();
//-----------------------------------------------------------
+#ifndef EVALUATION_BOARD
DeActivateAllSSR();
ActivateChiller();//SSR12
-
+#endif
//EMAC_initEMAC();
ControlInit();
Heaters_Init();
diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/Diagnostics.c
index 19fe66611..e67fe68bb 100644
--- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/Diagnostics.c
+++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/Diagnostics.c
@@ -123,16 +123,16 @@ void DiagnosticCollection(void)
pollermotor[DiagnosticsIndex] = MotorGetSpeed (HARDWARE_MOTOR_TYPE__MOTO_LDRIVING);
windermotor[DiagnosticsIndex] = MotorGetSpeed (HARDWARE_MOTOR_TYPE__MOTO_WINDER);
screwmotor[DiagnosticsIndex] = MotorGetSpeed (HARDWARE_MOTOR_TYPE__MOTO_SCREW);
- mixertemperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_MIXCHIP_TEMP);
- headzone1temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP1);
- headzone2temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP2);
- headzone3temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP3);
- headzone4temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP4);
- headzone5temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP5);
- headzone6temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_AN_ENCLOSURETEMP3);
- dryerzone1temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP1);
- dryerzone2temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP2);
- dryerzone3temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP3);
+ mixertemperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_MIXCHIP_TEMP)/100;
+ headzone1temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP1)/100;
+ headzone2temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP2)/100;
+ headzone3temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP3)/100;
+ headzone4temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP4)/100;
+ headzone5temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP5)/100;
+ headzone6temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_AN_ENCLOSURETEMP3)/100;
+ dryerzone1temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP1)/100;
+ dryerzone2temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP2)/100;
+ dryerzone3temperature[DiagnosticsIndex] = TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP3)/100;
for (i=0;i<MAX_SYSTEM_DISPENSERS;i++)
{
@@ -263,6 +263,7 @@ uint32_t DiagnosticsEmptyCBFunction(uint32_t IfIndex, uint32_t ReadValue)
}
uint32_t DiagnosticsStart()
{
+
if ( DiagnosticsActive == false)
{
if (DiagnosticRequestAccepted == true)
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c
index fb5b6c0d8..e0ca07930 100644
--- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c
+++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c
@@ -446,7 +446,7 @@ void SendJobProgress(double ProcessedLength, int SegmentId, bool done, char *Mes
free(responseContainer.data.data);
SendChars((char*)container_buffer, container_size);
}
-void JoStopReporting(void)
+void JobStopReporting(void)
{
JobToken[0] = 0;
}
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h b/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h
index e7d515ea7..a3af9c42b 100644
--- a/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h
+++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.h
@@ -128,7 +128,7 @@ extern bool JobAbortedByUser;
void PrintSTMMsgHandler(void * msg);
//void JobInit(void);
//void PrintingsInit(void);
-void JoStopReporting(void);
+void JobStopReporting(void);
void JobRequestFunc(MessageContainer* requestContainer);
void JobAbortFunc(MessageContainer* requestContainer);