park Chun-sung 2024-03-11
#feat LFP. CCF(crossing correlation function) Test
CH4 - UV, VIS, IR에 LFP 추가, Fcut- 500hz
Tsamp 5주기마다 UV, VIS, IR  각 상관관계(crossing correlation) 계산 추가
@0e3bcb64fd5aacdbee9bec9feec1eee6da184839
ArcCTRL-23-NEXTSQ-CPU1/Main_Resource/include/DigitalFilter.h
--- ArcCTRL-23-NEXTSQ-CPU1/Main_Resource/include/DigitalFilter.h
+++ ArcCTRL-23-NEXTSQ-CPU1/Main_Resource/include/DigitalFilter.h
@@ -55,19 +55,21 @@
 extern struct sLpf1st LPF1stVdeExt;
 extern struct sLpf1st LPF1stVqeExt;
 
-extern float FcutVabc;
-extern float FcutIabc;
+extern float Fcut_UV_CH1;
+extern float Fcut_VIS_CH1;
+extern float Fcut_IR_CH1;
+
+extern float Fcut_UV_CH2;
 extern float Fcut_VIS_CH2;
-extern float FcutVbe;
-extern float FcutIbe;
+extern float Fcut_IR_CH2;
 
-extern float FcutIdqs;
-extern float FcutIdqe;
-extern float FcutVdqs;
-extern float FcutVdqe;
-extern float FcutVdqeExt;
+extern float Fcut_UV_CH3;
+extern float Fcut_VIS_CH3;
+extern float Fcut_IR_CH3;
 
-extern float FcutFreq;
+extern float Fcut_UV_CH4;
+extern float Fcut_VIS_CH4;
+extern float Fcut_IR_CH4;
 
 #pragma SET_DATA_SECTION()
 
ArcCTRL-23-NEXTSQ-CPU1/Main_Resource/source/DigitalFilter.cpp
--- ArcCTRL-23-NEXTSQ-CPU1/Main_Resource/source/DigitalFilter.cpp
+++ ArcCTRL-23-NEXTSQ-CPU1/Main_Resource/source/DigitalFilter.cpp
@@ -65,9 +65,9 @@
 float Fcut_VIS_CH3 = 2000;
 float Fcut_IR_CH3 = 2000;
 
-float Fcut_UV_CH4 = 2000;
-float Fcut_VIS_CH4 = 2000;
-float Fcut_IR_CH4 = 2000;
+float Fcut_UV_CH4 = 500;
+float Fcut_VIS_CH4 = 500;
+float Fcut_IR_CH4 = 500;
 
 
 void InitLpf1st(void)
ArcCTRL-23-NEXTSQ-CPU1/Main_Resource/source/FaultProcess.cpp
--- ArcCTRL-23-NEXTSQ-CPU1/Main_Resource/source/FaultProcess.cpp
+++ ArcCTRL-23-NEXTSQ-CPU1/Main_Resource/source/FaultProcess.cpp
@@ -18,15 +18,15 @@
 void InitInstFaultLevelSet()
 {
 	//Bat 순시 과전압
-	FT_UV_OV.Ratio = 1.00; // 105%
+	FT_UV_OV.Ratio = 1.00; // 100%
 	FT_UV_OV.SetLevel = FT_UV_OV.Ratio * SET_FT_UV_Level;
 
 	//Bat 순시 저전압
-	FT_VIS_OV.Ratio = 1.0; // 105%
+	FT_VIS_OV.Ratio = 1.0; // 100%
 	FT_VIS_OV.SetLevel = FT_VIS_OV.Ratio * SET_FT_VIS_Level;
 
 	//Bat 순시 과전류
-	FT_IR_OV.Ratio = 1.00;
+	FT_IR_OV.Ratio = 1.00;// 100%
 	FT_IR_OV.SetLevel = FT_IR_OV.Ratio * SET_FT_IR_Level;
 
 
@@ -57,6 +57,8 @@
 
       if ((CH4_UV_Flt > FT_UV_OV.SetLevel)
               &&(CH4_VIS_Flt > FT_VIS_OV.SetLevel))     Fault.Sw1.bit.CH4_UV_OV |= 1;
+      if ((CH4_UV_Flt > FT_UV_OV.SetLevel)
+              &&(CH4_VIS_Flt > FT_IR_OV.SetLevel))     Fault.Sw1.bit.CH4_IR_OV |= 1;
 
 }
 
@@ -228,6 +230,23 @@
 	Dout.Data.bit.Ch00 = 1;
     Dout.Data.bit.Ch01 = 1;
 
+    if(FT_uv_vis_correlation == 0)
+    {
+        FT_uv_vis_correlation = uv_vis_correlation;
+        FT_uv_ir_correlation = uv_ir_correlation;
+        FT_vis_ir_correlation = vis_ir_correlation;
+
+        FT_uv_vis_change_correlation = uv_vis_change_correlation;
+        FT_uv_ir_change_correlation = uv_ir_change_correlation;
+        FT_vis_ir_change_correlation = vis_ir_change_correlation;
+
+        FT_stddev = stddev;
+        FT_adaptive_threshold = adaptive_threshold;
+        FT_latest_change = latest_change;
+    }
+
+
+
 //	GateOutDisable();
 //	FlagInvGating = 0;
 //	FlagInvGatingInput = 0;
@@ -382,6 +401,10 @@
     Dout.Data.bit.Ch00 = 0;
     Dout.Data.bit.Ch01 = 0;
 
+    Dout.Data.bit.Ch02 = 0;
+    Dout.Data.bit.Ch03 = 0;
+    Dout.Data.bit.Ch04 = 0;
+
 	Fault.Sw1.all = 0;
 	Fault.Sw2.all = 0;
 	Fault.Sw3.all = 0;
@@ -395,5 +418,20 @@
 	memset(&FaultLatch, 0, (sizeof(FaultLatch) / sizeof(int)));
 	FlagLatch = 0;
 
+	CH4_UV_max = 0;
+	CH4_VIS_max = 0;
+	CH4_IR_max = 0;
+
+	FT_uv_vis_correlation = 0;
+	FT_uv_ir_correlation = 0;
+	FT_vis_ir_correlation = 0;
+
+	FT_uv_vis_change_correlation = 0;
+    FT_uv_ir_change_correlation = 0;
+    FT_vis_ir_change_correlation = 0;
+
+    FT_stddev = 0;
+    FT_adaptive_threshold = 0;
+    FT_latest_change = 0;
 }
 
ArcCTRL-23-NEXTSQ-CPU1/Main_Resource/source/RoutineT100ms.cpp
--- ArcCTRL-23-NEXTSQ-CPU1/Main_Resource/source/RoutineT100ms.cpp
+++ ArcCTRL-23-NEXTSQ-CPU1/Main_Resource/source/RoutineT100ms.cpp
@@ -35,6 +35,16 @@
 //      //
 //      receivedChar = SCI_readCharBlockingFIFO(SCID_BASE);
 
+    if(SystemFault == 1)
+    {
+        if(Dout.Data.bit.Ch04 == 0)
+        {
+            Dout.Data.bit.Ch04 = 1;
+        }
+        else Dout.Data.bit.Ch04 = 0;
+
+    }
+    else   Dout.Data.bit.Ch04 = 0;
 
 }
 
ArcCTRL-23-NEXTSQ-CPU1/Main_Resource/source/RoutineT500ms.cpp
--- ArcCTRL-23-NEXTSQ-CPU1/Main_Resource/source/RoutineT500ms.cpp
+++ ArcCTRL-23-NEXTSQ-CPU1/Main_Resource/source/RoutineT500ms.cpp
@@ -19,6 +19,11 @@
 
 void RoutineT500ms()
 {
+
+    DacaRegs.DACVALS.bit.DACVALS = Testpcs1;
+    DacbRegs.DACVALS.bit.DACVALS = Testpcs2;
+    DaccRegs.DACVALS.bit.DACVALS = Testpcs3;
+
 	ScaleUpdate();
 	OffsetUpdate();
 	Lpf1stCoefUpdate();
@@ -86,6 +91,7 @@
     }
 }
 
+
 void RoutineT1s()
 {
 
ArcCTRL-23-NEXTSQ-CPU1/Main_Resource/source/RoutineTsamp.cpp
--- ArcCTRL-23-NEXTSQ-CPU1/Main_Resource/source/RoutineTsamp.cpp
+++ ArcCTRL-23-NEXTSQ-CPU1/Main_Resource/source/RoutineTsamp.cpp
@@ -15,14 +15,39 @@
  int Chk_Botton = 0;
  int Chk_Botton_pre = 0;
 
+//순환 버퍼
+#define BUFFER_SIZE 5       //10 이상 커지면 순간적인 변화를 계산하지 못함?
+int currentIndex = 0;
 
+int UV_buffer[BUFFER_SIZE];
+int VIS_buffer[BUFFER_SIZE];
+int IR_buffer[BUFFER_SIZE];
+
+// 이전 센서 값 저장을 위한 변수 초기화
+int CH4_UV_prev = 0, CH4_VIS_prev = 0, CH4_IR_prev = 0;
+
+// 변화량을 저장할 배열
+int UV_change[BUFFER_SIZE], VIS_change[BUFFER_SIZE], IR_change[BUFFER_SIZE];
+int prev_avg =0;
+
+// 상관 계수를 계산하는 함수
+double calculate_correlation(const int *x, const int *y, int n) {
+    long long sum_x = 0, sum_y = 0, sum_x2 = 0, sum_y2 = 0, sum_xy = 0;
+    for (int i = 0; i < n; ++i) {
+        sum_x += x[i];
+        sum_y += y[i];
+        sum_x2 += (long long)x[i] * x[i];
+        sum_y2 += (long long)y[i] * y[i];
+        sum_xy += (long long)x[i] * y[i];
+    }
+    double numerator = (double)n * sum_xy - sum_x * sum_y;
+    double denominator = sqrt(((double)n * sum_x2 - sum_x * sum_x) * ((double)n * sum_y2 - sum_y * sum_y));
+    if (denominator == 0) return 0; // 분모가 0이면, 상관관계를 계산할 수 없음
+    return numerator / denominator;
+}
 
 void RoutineTsamp()
 {
-
-    DacaRegs.DACVALS.bit.DACVALS = Testpcs1;
-    DacbRegs.DACVALS.bit.DACVALS = Testpcs2;
-    DaccRegs.DACVALS.bit.DACVALS = Testpcs3;
 
 //	PllRun();
 	Lpf1stRun();
@@ -56,6 +81,66 @@
     }
     Chk_Botton_pre = Chk_Botton;
 
+    /////////////////////////////////////////////
+    UV_buffer[currentIndex] = CH4_UV_Flt; // 배열에 센싱값 저장
+    VIS_buffer[currentIndex] = CH4_VIS_Flt; // 배열에 센싱값 저장
+    IR_buffer[currentIndex] = CH4_IR_Flt; // 배열에 센싱값 저장
 
+    // 센서 값 갱신 및 변화량 계산
+    UV_change[currentIndex] = CH4_UV_Flt - CH4_UV_prev; // UV 변화량 계산
+    VIS_change[currentIndex] = CH4_VIS_Flt - CH4_VIS_prev; // VIS 변화량 계산
+    IR_change[currentIndex] = CH4_IR_Flt - CH4_IR_prev; // IR 변화량 계산
+
+    // 현재 값을 '이전 값'으로 저장
+    CH4_UV_prev = CH4_UV_Flt;
+    CH4_VIS_prev = CH4_VIS_Flt;
+    CH4_IR_prev = CH4_IR_Flt;
+
+    currentIndex = (currentIndex + 1) % BUFFER_SIZE; // 인덱스 갱신
+
+
+    if(CH4_UV_Flt > CH4_UV_max)     CH4_UV_max = CH4_UV_Flt;    // 새로운 최대값 발견 시 갱신
+    if(CH4_VIS_Flt > CH4_VIS_max)   CH4_VIS_max = CH4_VIS_Flt;  // 새로운 최대값 발견 시 갱신
+    if(CH4_IR_Flt > CH4_IR_max)     CH4_IR_max = CH4_IR_Flt;    // 새로운 최대값 발견 시 갱신
+
+    // 버퍼가 한 바퀴 돌았을 때 상관 계수 계산
+     if (currentIndex == 0)
+     {
+         uv_vis_correlation = calculate_correlation(UV_buffer, VIS_buffer, BUFFER_SIZE);
+         uv_ir_correlation = calculate_correlation(UV_buffer, IR_buffer, BUFFER_SIZE);
+         vis_ir_correlation = calculate_correlation(VIS_buffer, IR_buffer, BUFFER_SIZE);
+
+        // 변화량의 상관관계 계산
+        uv_vis_change_correlation = calculate_correlation(UV_change, VIS_change, BUFFER_SIZE);
+        uv_ir_change_correlation = calculate_correlation(UV_change, IR_change, BUFFER_SIZE);
+        vis_ir_change_correlation = calculate_correlation(VIS_change, IR_change, BUFFER_SIZE);
+
+
+        // 평균과 표준 편차 계산
+        double sum = 0, sum_sq_diff = 0;
+        for (int i = 0; i < BUFFER_SIZE; ++i) {
+            sum += UV_buffer[i];
+            sum_sq_diff += (UV_buffer[i] - (sum / BUFFER_SIZE)) * (UV_buffer[i] - (sum / BUFFER_SIZE));
+        }
+        double avg = sum / BUFFER_SIZE;
+        stddev = sqrt(sum_sq_diff / BUFFER_SIZE);
+        adaptive_threshold = avg + 2 * stddev;
+
+        // 최신 값과 바로 이전 값 사이의 변화율 계산을 위한 인덱스 계산
+        int latest_index = (currentIndex - 1 + BUFFER_SIZE) % BUFFER_SIZE;
+        int prev_index = (latest_index - 1 + BUFFER_SIZE) % BUFFER_SIZE;
+
+
+//        latest_change = UV_buffer[latest_index] - UV_buffer[prev_index];
+        latest_change = avg - prev_avg;
+        prev_avg = avg;
+
+        if (abs(latest_change) > adaptive_threshold) {
+            // 변화율이 적응형 임계값을 초과하는 경우 처리
+            // 예: 알림 발송, 로깅, 경고 등
+            SET_FT_UV_Level = adaptive_threshold;
+        }
+     }
 }
 
+
Common_Resource/CommonLibrary/include/DigitalIO.h
--- Common_Resource/CommonLibrary/include/DigitalIO.h
+++ Common_Resource/CommonLibrary/include/DigitalIO.h
@@ -96,8 +96,8 @@
 {
     Uint16 Ch00                 :1; // 0x0001 (Red)
     Uint16 Ch01                 :1; // 0x0002
-    Uint16 Ch02                 :1; // 0x0004 (Green)
-    Uint16 Ch03                 :1; // 0x0008 (Yellow)
+    Uint16 Ch02                 :1; // 0x0004 (LED1)
+    Uint16 Ch03                 :1; // 0x0008 (LED2)
 
     Uint16 Ch04                 :1; // 0x0010
     Uint16 Ch05                 :1; // 0x0020
Common_Resource/CommonLibrary/include/FaultDefine.h
--- Common_Resource/CommonLibrary/include/FaultDefine.h
+++ Common_Resource/CommonLibrary/include/FaultDefine.h
@@ -16,23 +16,23 @@
 
 struct sFAULT_SW_LIST1
 {
-	Uint32 CH1_UV_OV :1;		//  0x00000001
-	Uint32 CH1_VIS_OV :1;		//  0x00000002
-	Uint32 CH1_IR_OV :1;		        //	0x00000004
+	Uint32 CH1_UV_OV    :1;		//  0x00000001
+	Uint32 CH1_VIS_OV   :1;		//  0x00000002
+	Uint32 CH1_IR_OV    :1;		        //	0x00000004
 
-	Uint32 CH2_UV_OV :1;               //  0x00000008
-	Uint32 CH2_VIS_OV :1;  		//  0x00000010
-	Uint32 CH2_IR_OV :1;         //  0x00000020
+	Uint32 CH2_UV_OV    :1;               //  0x00000008
+	Uint32 CH2_VIS_OV   :1;  		//  0x00000010
+	Uint32 CH2_IR_OV    :1;         //  0x00000020
 
-	Uint32 CH3_UV_OV :1;         //  0x00000040
-	Uint32 CH3_VIS_OV :1;         //  0x00000080
-	Uint32 CH3_IR_OV :1;			//  0x00000100
+	Uint32 CH3_UV_OV    :1;         //  0x00000040
+	Uint32 CH3_VIS_OV   :1;         //  0x00000080
+	Uint32 CH3_IR_OV    :1;			//  0x00000100
 
-	Uint32 CH4_UV_OV :1;          //  0x00000200
-	Uint32 CH4_VIS_OV :1;            //  0x00000400
-    Uint32 CH4_IR_OV :1;           //  0x00000800
+	Uint32 CH4_UV_OV    :1;          //  0x00000200
+	Uint32 CH4_VIS_OV   :1;            //  0x00000400
+    Uint32 CH4_IR_OV    :1;           //  0x00000800
 
-	Uint32 Reseved0 :20;			    //  0x08000000 ~ 0x80000000
+	Uint32 Reseved0     :20;			    //  0x08000000 ~ 0x80000000
 
 };
 
@@ -46,45 +46,45 @@
 {
 
 	//contactType Fault
-	Uint32 Switch_EmergencyStop :1;		// 0x00000001
-//	Uint32 Switch_Paddlelock :1;		// 0x00000002 Paddle lock switch or Limit �switch
-//	Uint32 FuseAcAphase :1;				// 0x00000004
-//	Uint32 FuseAcBphase :1;				// 0x00000008
-//	Uint32 FuseAcCphase :1;				// 0x00000010
-//	Uint32 FuseDc :1;					// 0x00000020
+	Uint32 Switch_EmergencyStop     :1;		// 0x00000001
+//	Uint32 Switch_Paddlelock        :1;		// 0x00000002 Paddle lock switch or Limit �switch
+//	Uint32 FuseAcAphase             :1;		// 0x00000004
+//	Uint32 FuseAcBphase             :1;		// 0x00000008
+//	Uint32 FuseAcCphase             :1;		// 0x00000010
+//	Uint32 FuseDc                   :1;		// 0x00000020
 //
-//	Uint32 SpdCtrl :1;					// 0x00000040
-//	Uint32 SpdPower :1;				    // 0x00000080
+//	Uint32 SpdCtrl                  :1;		// 0x00000040
+//	Uint32 SpdPower                 :1;	    // 0x00000080
 //
-//	Uint32 FanBeOutStackFrontTop :1;	// 0x00000100
-//	Uint32 FanBeOutStackFrontBot :1;	// 0x00000200
-//	Uint32 FanMcStackFront :1;			// 0x00000400
-//	Uint32 FanMcStackRear :1;			// 0x00000800
-//	Uint32 FanCpRearLeft :1;			// 0x00001000
-//	Uint32 FanCpRearRight :1;			// 0x00002000
-//	Uint32 FanRackLeft :1;				// 0x00004000
-//	Uint32 FanRackRight :1;			    // 0x00008000
-//	Uint32 FanBeStackFront :1;			// 0x00010000
-//	Uint32 FanBeStackRear :1;			// 0x00020000
+//	Uint32 FanBeOutStackFrontTop    :1;	    // 0x00000100
+//	Uint32 FanBeOutStackFrontBot    :1;	    // 0x00000200
+//	Uint32 FanMcStackFront          :1;		// 0x00000400
+//	Uint32 FanMcStackRear           :1;			// 0x00000800
+//	Uint32 FanCpRearLeft            :1;			// 0x00001000
+//	Uint32 FanCpRearRight           :1;			// 0x00002000
+//	Uint32 FanRackLeft              :1;				// 0x00004000
+//	Uint32 FanRackRight             :1;			    // 0x00008000
+//	Uint32 FanBeStackFront          :1;			// 0x00010000
+//	Uint32 FanBeStackRear           :1;			// 0x00020000
 //
-//	Uint32 OT_ThsBeStackLeft :1;		// 0x00040000  //Thermal Switch
-//	Uint32 OT_ThsBeStackRight :1;		// 0x00080000  //Thermal Switch
+//	Uint32 OT_ThsBeStackLeft        :1;		// 0x00040000  //Thermal Switch
+//	Uint32 OT_ThsBeStackRight       :1;		// 0x00080000  //Thermal Switch
 //
-//	Uint16 Cmc :1;               		// 0x00100000  //Cmc
-//	Uint16 Mmc :1;              		// 0x00200000  //Mmc
-//	Uint16 Mccb_Open :1;				// 0x00400000  // MCCB
+//	Uint16 Cmc                      :1;               		// 0x00100000  //Cmc
+//	Uint16 Mmc                      :1;              		// 0x00200000  //Mmc
+//	Uint16 Mccb_Open                :1;				// 0x00400000  // MCCB
 //
-//	Uint16 OT_Ntc_Dcl :1;				// 0x00800000 //
-//	Uint16 OT_Ntc_Acl :1;				// 0x01000000 //
-//	Uint16 OT_Ntc_Tr :1;				// 0x02000000 //
+//	Uint16 OT_Ntc_Dcl               :1;				// 0x00800000 //
+//	Uint16 OT_Ntc_Acl               :1;				// 0x01000000 //
+//	Uint16 OT_Ntc_Tr                :1;				// 0x02000000 //
 //
-//	Uint16 OT_Ntc_SicConvA :1;			// 0x04000000 //
-//	Uint16 OT_Ntc_SicConvB :1;			// 0x08000000 //
-//	Uint16 OT_Ntc_SicConvC :1;			// 0x10000000 //
+//	Uint16 OT_Ntc_SicConvA          :1;			// 0x04000000 //
+//	Uint16 OT_Ntc_SicConvB          :1;			// 0x08000000 //
+//	Uint16 OT_Ntc_SicConvC          :1;			// 0x10000000 //
 //
-//	Uint16 OT_Ntc_SicInvA :1;			// 0x20000000 //
-//	Uint16 OT_Ntc_SicInvB :1;			// 0x40000000 //
-//	Uint16 OT_Ntc_SicInvC :1;			// 0x80000000 //
+//	Uint16 OT_Ntc_SicInvA           :1;			// 0x20000000 //
+//	Uint16 OT_Ntc_SicInvB           :1;			// 0x40000000 //
+//	Uint16 OT_Ntc_SicInvC           :1;			// 0x80000000 //
 
 };
 
Common_Resource/CommonLibrary/include/SystemVar.h
--- Common_Resource/CommonLibrary/include/SystemVar.h
+++ Common_Resource/CommonLibrary/include/SystemVar.h
@@ -70,6 +70,34 @@
 extern float CH4_VIS_Flt;
 extern float CH4_IR_Flt;
 
+extern float CH4_UV_max;
+extern float CH4_VIS_max;
+extern float CH4_IR_max;
+
+extern double uv_vis_correlation;
+extern double uv_ir_correlation;
+extern double vis_ir_correlation;
+
+extern double uv_vis_change_correlation;
+extern double uv_ir_change_correlation;
+extern double vis_ir_change_correlation;
+
+extern double FT_uv_vis_correlation;
+extern double FT_uv_ir_correlation;
+extern double FT_vis_ir_correlation;
+
+extern double FT_uv_vis_change_correlation;
+extern double FT_uv_ir_change_correlation;
+extern double FT_vis_ir_change_correlation;
+
+extern double stddev;
+extern double adaptive_threshold;
+extern int latest_change;
+
+extern double FT_stddev;
+extern double FT_adaptive_threshold;
+extern int FT_latest_change;
+
 extern int SystemReady;
 //
 //extern int FlagInvGating;
@@ -102,8 +130,6 @@
 //
 //extern unsigned int TinvACnt;
 //extern unsigned int TinvBCnt;
-
-
 
 extern int FaultReset;
 
EZDSP/ArcCtrl-23-NEXTSQ-CPU1.ez.bin (Binary)
--- EZDSP/ArcCtrl-23-NEXTSQ-CPU1.ez.bin
+++ EZDSP/ArcCtrl-23-NEXTSQ-CPU1.ez.bin
Binary file is not shown
EZDSP/ArcCtrl-23-NEXTSQ-CPU1.out (Binary)
--- EZDSP/ArcCtrl-23-NEXTSQ-CPU1.out
+++ EZDSP/ArcCtrl-23-NEXTSQ-CPU1.out
Binary file is not shown
EZDSP/ArcCtrl_CPU1.cfg
--- EZDSP/ArcCtrl_CPU1.cfg
+++ EZDSP/ArcCtrl_CPU1.cfg
@@ -149,10 +149,10 @@
 Array Frame-18 (Name) = 
 Array Frame-19 = 0
 Array Frame-19 (Name) = 
-Plot Frame-0 = 0
-Plot Frame-0 (Name) = 
-Plot Frame-1 = 0
-Plot Frame-1 (Name) = 
+Plot Frame-0 = 1
+Plot Frame-0 (Name) = Plot-1
+Plot Frame-1 = 1
+Plot Frame-1 (Name) = Plot-2
 Plot Frame-2 = 0
 Plot Frame-2 (Name) = 
 Plot Frame-3 = 0
@@ -310,16 +310,16 @@
 Recorder Frame-9 = 0
 Recorder Frame-9 (Name) = 
 [Window Size]
-Watch-1Pos = 7, 2, 272, 479
+Watch-1Pos = 22, 9, 287, 486
 Watch-1Min = 0
 Watch-1Max = 0
 Tree-1Pos = 274, 5, 551, 713
 Tree-1Min = 0
 Tree-1Max = 0
-Plot-1Pos = 38, 556, 457, 828
+Plot-1Pos = 357, 492, 1158, 839
 Plot-1Min = 0
 Plot-1Max = 0
-Tree-2Pos = 501, 10, 871, 852
+Tree-2Pos = 551, 14, 850, 515
 Tree-2Min = 0
 Tree-2Max = 0
 Tree-3Pos = 825, 113, 1128, 803
@@ -337,16 +337,16 @@
 Tree-4Pos = 1013, 3, 1370, 802
 Tree-4Min = 0
 Tree-4Max = 0
-Plot-2Pos = 694, 536, 1894, 883
+Plot-2Pos = 318, 93, 1136, 470
 Plot-2Min = 0
 Plot-2Max = 0
 Plot-4Pos = 698, 261, 1895, 931
 Plot-4Min = 0
 Plot-4Max = 0
-Plot-3Pos = 684, 126, 1881, 528
+Plot-3Pos = 149, 107, 921, 509
 Plot-3Min = 0
 Plot-3Max = 0
-Watch-2Pos = 15, 498, 427, 811
+Watch-2Pos = 5, 451, 336, 840
 Watch-2Min = 0
 Watch-2Max = 0
 Command-2Pos = 286, 286, 1916, 935
@@ -379,18 +379,22 @@
 Watch-5Pos = 855, 568, 1086, 809
 Watch-5Min = 0
 Watch-5Max = 0
+Watch-6Pos = 182, 182, 1193, 770
+Watch-6Min = 0
+Watch-6Max = 0
 [Watch Window]
 Watch-1Update time = 1 sec
 Watch-2Update time = 1 sec
 Watch-4Update time = 2 sec
 Watch-3Update time = 1 sec
 Watch-5Update time = 2 sec
+Watch-6Update time = 2 sec
 [Tree Window]
 Tree-1 recent variable = Adc
 Tree-1 update time = 1 sec
 Tree-2 update time = 1 sec
 Tree-2 recent variable = Din
-Tree-3 recent variable = Din
+Tree-3 recent variable = UV_change
 Tree-3 update time = 1 sec
 Tree-4 recent variable = ScicRegs
 Tree-4 update time = 1 sec
@@ -399,20 +403,20 @@
 Tree-5 recent variable = PiIqe
 Tree-5 update time = 2 sec
 [Plot Window]
-Plot-1 Name0 = RTC_Read_seq
-Plot-1 Name1 = 
-Plot-1 Name2 = Time_sec
+Plot-1 Name0 = CH4_UV_Flt
+Plot-1 Name1 = CH4_VIS_Flt
+Plot-1 Name2 = CH4_IR_Flt
 Plot-1 Name3 = 
 Plot-1 Name4 = 
 Plot-1 Name5 = 
 Plot-1 Name6 = 
 Plot-1 Name7 = 
-Plot-1 Auto0 = TRUE
-Plot-1 Auto1 = TRUE
-Plot-1 Auto2 = TRUE
-Plot-1 Auto3 = TRUE
-Plot-1 Auto4 = TRUE
-Plot-1 Auto5 = TRUE
+Plot-1 Auto0 = FALSE
+Plot-1 Auto1 = FALSE
+Plot-1 Auto2 = FALSE
+Plot-1 Auto3 = FALSE
+Plot-1 Auto4 = FALSE
+Plot-1 Auto5 = FALSE
 Plot-1 Auto6 = TRUE
 Plot-1 Auto7 = TRUE
 Plot-1 Visible0 = 1
@@ -434,23 +438,23 @@
 Plot-1 ShowSymbol0 = 0
 Plot-1 ShowSymbol1 = 0
 Plot-1 ShowSymbol2 = 0
-Plot-1 ShowSymbol3 = 1
-Plot-1 ShowSymbol4 = 1
-Plot-1 ShowSymbol5 = 1
+Plot-1 ShowSymbol3 = 0
+Plot-1 ShowSymbol4 = 0
+Plot-1 ShowSymbol5 = 0
 Plot-1 ShowSymbol6 = 1
 Plot-1 ShowSymbol7 = 1
-Plot-1 Min0 = -50
-Plot-1 Max0 = 500
-Plot-1 Min1 = -50
-Plot-1 Max1 = 500
-Plot-1 Min2 = -100
-Plot-1 Max2 = 100
-Plot-1 Min3 = -100
-Plot-1 Max3 = 100
-Plot-1 Min4 = -100
-Plot-1 Max4 = 100
-Plot-1 Min5 = -100
-Plot-1 Max5 = 100
+Plot-1 Min0 = -10
+Plot-1 Max0 = 5000
+Plot-1 Min1 = -10
+Plot-1 Max1 = 5000
+Plot-1 Min2 = -10
+Plot-1 Max2 = 5000
+Plot-1 Min3 = -300
+Plot-1 Max3 = 300
+Plot-1 Min4 = -300
+Plot-1 Max4 = 300
+Plot-1 Min5 = -300
+Plot-1 Max5 = 300
 Plot-1 Min6 = -100
 Plot-1 Max6 = 100
 Plot-1 Min7 = -100
@@ -459,14 +463,14 @@
 Plot-1 Total Plot Period = 100
 Plot-1 ShowAll = 0
 Plot-1 Toolbar pause at exit = 0
-Plot-2 Name0 = IuGrid
-Plot-2 Name1 = VqeGrid
-Plot-2 Name2 = VdeGrid
-Plot-2 Name3 = IqeGridFlt
-Plot-2 Name4 = IqeGrid
-Plot-2 Name5 = IdeRef
-Plot-2 Name6 = IdeGrid
-Plot-2 Name7 = VacGrid
+Plot-2 Name0 = vis_ir_correlation
+Plot-2 Name1 = uv_ir_correlation
+Plot-2 Name2 = uv_vis_correlation
+Plot-2 Name3 = 
+Plot-2 Name4 = 
+Plot-2 Name5 = 
+Plot-2 Name6 = 
+Plot-2 Name7 = 
 Plot-2 Auto0 = FALSE
 Plot-2 Auto1 = FALSE
 Plot-2 Auto2 = FALSE
@@ -475,9 +479,9 @@
 Plot-2 Auto5 = FALSE
 Plot-2 Auto6 = FALSE
 Plot-2 Auto7 = FALSE
-Plot-2 Visible0 = 0
-Plot-2 Visible1 = 0
-Plot-2 Visible2 = 0
+Plot-2 Visible0 = 1
+Plot-2 Visible1 = 1
+Plot-2 Visible2 = 1
 Plot-2 Visible3 = 1
 Plot-2 Visible4 = 1
 Plot-2 Visible5 = 1
@@ -499,12 +503,12 @@
 Plot-2 ShowSymbol5 = 0
 Plot-2 ShowSymbol6 = 0
 Plot-2 ShowSymbol7 = 0
-Plot-2 Min0 = -10
-Plot-2 Max0 = 10
-Plot-2 Min1 = -100
-Plot-2 Max1 = 100
-Plot-2 Min2 = -100
-Plot-2 Max2 = 100
+Plot-2 Min0 = -1
+Plot-2 Max0 = 1
+Plot-2 Min1 = -1
+Plot-2 Max1 = 1
+Plot-2 Min2 = -1
+Plot-2 Max2 = 1
 Plot-2 Min3 = -10
 Plot-2 Max3 = 10
 Plot-2 Min4 = -10
@@ -517,7 +521,7 @@
 Plot-2 Max7 = 2
 Plot-2 Sampling Period = 5
 Plot-2 Total Plot Period = 500
-Plot-2 ShowAll = 1
+Plot-2 ShowAll = 0
 Plot-2 Toolbar pause at exit = 0
 Plot-4 Name0 = Temp.AcSwHeatSink1
 Plot-4 Name1 = Temp.AcSwHeatSink2
@@ -579,14 +583,14 @@
 Plot-4 Total Plot Period = 500
 Plot-4 ShowAll = 1
 Plot-4 Toolbar pause at exit = 0
-Plot-3 Name0 = VdcFlt
-Plot-3 Name1 = Vdc
-Plot-3 Name2 = IqeRef
-Plot-3 Name3 = IqeInvFlt
-Plot-3 Name4 = IdeRef
-Plot-3 Name5 = IdeInvFlt
-Plot-3 Name6 = VqeGrid
-Plot-3 Name7 = IqeInv
+Plot-3 Name0 = 
+Plot-3 Name1 = 
+Plot-3 Name2 = 
+Plot-3 Name3 = 
+Plot-3 Name4 = 
+Plot-3 Name5 = 
+Plot-3 Name6 = 
+Plot-3 Name7 = 
 Plot-3 Auto0 = FALSE
 Plot-3 Auto1 = FALSE
 Plot-3 Auto2 = FALSE
@@ -872,10 +876,48 @@
 [Watch-5 Recent Index]
 Registered = 0
 All = 0
+[Watch-6 Recent Index]
+Registered = 0
+All = 0
+[Watch-5 Watched Variables]
+Write_sec
+Write_min
+Write_hour
+Write_date
+Write_month
+Write_year
+
+[Watch-2 Watched Variables]
+CH4_UV_Flt
+CH4_VIS_Flt
+CH4_IR_Flt
+CH4_UV_max
+CH4_VIS_max
+CH4_IR_max
+FT_uv_vis_correlation
+FT_uv_ir_correlation
+FT_vis_ir_correlation
+FT_uv_vis_change_correlation
+FT_uv_ir_change_correlation
+FT_vis_ir_change_correlation
+FT_stddev
+FT_adaptive_threshold
+FT_latest_change
+
+[Watch-6 Watched Variables]
+uv_vis_change_correlation
+uv_ir_change_correlation
+vis_ir_change_correlation
+uv_vis_correlation
+uv_ir_correlation
+vis_ir_correlation
+stddev
+adaptive_threshold
+latest_change
+
 [Watch-1 Watched Variables]
 SystemFault
 FaultReset
-Testpcs4
 Testpcs1
 Testpcs2
 Testpcs3
@@ -890,6 +932,10 @@
 Din.Exor.all
 ModbusAFrmStartFlag
 Dout.Exor.all
+Fcut_UV_CH4
+Fcut_VIS_CH4
+Fcut_IR_CH4
+FT_UV_OV.SetLevel
 
 [Watch-3 Watched Variables]
 RTCRegs.Sec
@@ -914,20 +960,4 @@
 RTCWrBuf.Month
 RTCWrBuf.Year
 RTCWrBuf.HourDAT.bit.Mode_24_12
-
-[Watch-5 Watched Variables]
-Write_sec
-Write_min
-Write_hour
-Write_date
-Write_month
-Write_year
-
-[Watch-2 Watched Variables]
-CH4_UV_Flt
-CH4_VIS_Flt
-CH4_IR_Flt
-Fcut_UV_CH4
-Fcut_VIS_CH4
-Fcut_IR_CH4
 
EZDSP/ArcCtrl_CPU1.ezd
--- EZDSP/ArcCtrl_CPU1.ezd
+++ EZDSP/ArcCtrl_CPU1.ezd
@@ -1,7 +1,7 @@
 [Basic Page]
-m_strPrjFileName = D:\Project.Git\ArcCtrl-23-Firmware\EZDSP\ArcCtrl_CPU1.ezd
-m_straOutFileName[0] = D:\Project.Git\ArcCtrl-23-Firmware\EZDSP\ArcCtrl-23-NEXTSQ-CPU1.out
-m_straOutFileName[1] = D:\Project.Git\ArcCtrl-23-Firmware\EZDSP\ArcCtrl-23-NEXTSQ-CPU2.out
+m_strPrjFileName = D:\Project.Git\Arc01-24-NEXTSQ\EZDSP\ArcCtrl_CPU1.ezd
+m_straOutFileName[0] = D:\Project.Git\Arc01-24-NEXTSQ\EZDSP\ArcCtrl-23-NEXTSQ-CPU1.out
+m_straOutFileName[1] = D:\Project.Git\Arc01-24-NEXTSQ\EZDSP\ArcCtrl-23-NEXTSQ-CPU2.out
 m_straOutFileName[2] = 
 m_straOutFileName[3] = 
 m_strDSPType = TMS320F28377D CPU1
 
sci/CCS/baud_tune_via_uart.projectspec (deleted)
--- sci/CCS/baud_tune_via_uart.projectspec
@@ -1,41 +0,0 @@
-<projectSpec>
-  <project
-        name="baud_tune_via_uart"
-        device="TMS320F28377D"
-        cgtVersion="22.6.0.LTS"
-        products="sysconfig;c2000ware_software_package"
-        outputFormat="ELF"
-        launchWizard="False"
-        linkerCommandFile=""
-        enableSysConfigTool="true"
-        sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2837xD --package F2837xD_176PTP --part F2837xD_176PTP"
-        >
-    <configuration name="CPU1_RAM" compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=DEBUG  -v28 -ml -mt --define=CPU1 --diag_warning=225  --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define RAM" />
-    <configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=DEBUG  -v28 -ml -mt --define=CPU1 --define=_FLASH --diag_warning=225  --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 " />
-    
-    <configuration name="CPU1_CLB" postBuildStep="mkdir &quot;${BuildDirectory}/simulation&quot;
-    ;${CLB_SIM_COMPILER}/g++  -c -DCLB_SIM -I${SYSTEMC_INSTALL}/src -I${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/systemc/include -I${PROJECT_ROOT} -I${CLB_SIM_COMPILER}/include -Og -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF${BuildDirectory}/simulation/clb_sim.d -MT${BuildDirectory}/simulation/clb_sim.o -I${BuildDirectory}/syscfg   -fno-threadsafe-statics  -o${BuildDirectory}/simulation/clb_sim.o ${BuildDirectory}/syscfg/clb_sim.cpp
-    ;${CLB_SIM_COMPILER}/g++ -DCLB_SIM -Og -g -gdwarf-3 -gstrict-dwarf -Wall -Wl,-Map,${BuildDirectory}/simulation/simulation_output.map -L${SYSTEMC_INSTALL}/build/src -o${BuildDirectory}/simulation/simulation_output.exe ${BuildDirectory}/simulation/clb_sim.o ${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/systemc/src/CLB_FSM_SC_model.o ${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/systemc/src/CLB_HLC_SC_model.o ${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/systemc/src/CLB_LUT4_SC_model.o ${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/systemc/src/CLB_OutputLUT_SC_model.o ${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/systemc/src/CLB_counter_SC_model.o  -Wl,--start-group -lsystemc -Wl,--end-group;./simulation/simulation_output.exe
-    ;${NODE_TOOL} &quot;${CLB_SYSCFG_ROOT}/dot_file_libraries/clbDotUtility.js&quot;  &quot;${CLB_SYSCFG_ROOT}&quot; &quot;${BuildDirectory}/syscfg&quot; &quot;${BuildDirectory}/syscfg/clb.dot&quot;" compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=DEBUG  -v28 -ml -mt --define=CPU1 --diag_warning=225  --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define RAM" />
-
-    <pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
-    <pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
-    <pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
-
-    <pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../driverlib/" scope="project" />
-    <pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
-
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/include/driverlib.h" targetDirectory="device" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/include/device.h" targetDirectory="device" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/source/device.c" targetDirectory="device" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/targetConfigs/TMS320F28377D.ccxml" targetDirectory="targetConfigs" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/cmd/2837xD_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM,CPU1_CLB" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/cmd/2837xD_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
-    <file action="copy" path="../../../../driverlib/" targetDirectory="device" excludeFromBuild="True" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/source/F2837xD_CodeStartBranch.asm" targetDirectory="device" />
-    <file action="link" path="../../../../driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
-    
-    <file action="copy" path="../baud_tune_via_uart.c" targetDirectory="" />
-    <file action="copy" path="../baud_tune_via_uart.syscfg" targetDirectory="" />
-  </project>
-</projectSpec>
 
sci/CCS/sci_ex1_loopback.projectspec (deleted)
--- sci/CCS/sci_ex1_loopback.projectspec
@@ -1,41 +0,0 @@
-<projectSpec>
-  <project
-        name="sci_ex1_loopback"
-        device="TMS320F28377D"
-        cgtVersion="22.6.0.LTS"
-        products="sysconfig;c2000ware_software_package"
-        outputFormat="ELF"
-        launchWizard="False"
-        linkerCommandFile=""
-        enableSysConfigTool="true"
-        sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2837xD"
-        >
-    <configuration name="CPU1_RAM" compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=DEBUG  -v28 -ml -mt --define=CPU1 --diag_warning=225  --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define RAM" />
-    <configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=DEBUG  -v28 -ml -mt --define=CPU1 --define=_FLASH --diag_warning=225  --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 " />
-    
-    <configuration name="CPU1_CLB" postBuildStep="mkdir &quot;${BuildDirectory}/simulation&quot;
-    ;${CLB_SIM_COMPILER}/g++  -c -DCLB_SIM -I${SYSTEMC_INSTALL}/src -I${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/systemc/include -I${PROJECT_ROOT} -I${CLB_SIM_COMPILER}/include -Og -g -gdwarf-3 -gstrict-dwarf -Wall -MMD -MP -MF${BuildDirectory}/simulation/clb_sim.d -MT${BuildDirectory}/simulation/clb_sim.o -I${BuildDirectory}/syscfg   -fno-threadsafe-statics  -o${BuildDirectory}/simulation/clb_sim.o ${BuildDirectory}/syscfg/clb_sim.cpp
-    ;${CLB_SIM_COMPILER}/g++ -DCLB_SIM -Og -g -gdwarf-3 -gstrict-dwarf -Wall -Wl,-Map,${BuildDirectory}/simulation/simulation_output.map -L${SYSTEMC_INSTALL}/build/src -o${BuildDirectory}/simulation/simulation_output.exe ${BuildDirectory}/simulation/clb_sim.o ${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/systemc/src/CLB_FSM_SC_model.o ${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/systemc/src/CLB_HLC_SC_model.o ${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/systemc/src/CLB_LUT4_SC_model.o ${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/systemc/src/CLB_OutputLUT_SC_model.o ${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/systemc/src/CLB_counter_SC_model.o  -Wl,--start-group -lsystemc -Wl,--end-group;./simulation/simulation_output.exe
-    ;${NODE_TOOL} &quot;${CLB_SYSCFG_ROOT}/dot_file_libraries/clbDotUtility.js&quot;  &quot;${CLB_SYSCFG_ROOT}&quot; &quot;${BuildDirectory}/syscfg&quot; &quot;${BuildDirectory}/syscfg/clb.dot&quot;" compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=DEBUG  -v28 -ml -mt --define=CPU1 --diag_warning=225  --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define RAM" />
-
-    <pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
-    <pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
-    <pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
-
-    <pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../driverlib/" scope="project" />
-    <pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
-
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/include/driverlib.h" targetDirectory="device" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/include/device.h" targetDirectory="device" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/source/device.c" targetDirectory="device" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/targetConfigs/TMS320F28377D.ccxml" targetDirectory="targetConfigs" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/cmd/2837xD_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM,CPU1_CLB" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/cmd/2837xD_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
-    <file action="copy" path="../../../../driverlib/" targetDirectory="device" excludeFromBuild="True" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/source/F2837xD_CodeStartBranch.asm" targetDirectory="device" />
-    <file action="link" path="../../../../driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
-    
-    <file action="copy" path="../sci_ex1_loopback.c" targetDirectory="" />
-    <file action="copy" path="../sci_ex1_loopback.syscfg" targetDirectory="" />
-  </project>
-</projectSpec>
 
sci/CCS/sci_ex2_loopback_interrupts.projectspec (deleted)
--- sci/CCS/sci_ex2_loopback_interrupts.projectspec
@@ -1,28 +0,0 @@
-<projectSpec>
-  <project
-        name="sci_ex2_loopback_interrupts"
-        device="TMS320F28377D"
-        cgtVersion="22.6.0.LTS"
-        products="c2000ware_software_package"
-        outputFormat="ELF"
-        launchWizard="False"
-        linkerCommandFile=""
-        enableSysConfigTool="true"
-        sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2837xD"
-        >
-    <configuration name="CPU1_RAM" compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=DEBUG  -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2  --define=CPU1  --diag_warning=225  --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100  " />
-    <configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=DEBUG --define=_FLASH -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2  --define=CPU1  --diag_warning=225  --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100  " />
-    <pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../driverlib/" scope="project" />
-    <pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/include/driverlib.h" targetDirectory="device" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/include/device.h" targetDirectory="device" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/source/device.c" targetDirectory="device" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/targetConfigs/TMS320F28377D.ccxml" targetDirectory="targetConfigs" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/cmd/2837xD_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/cmd/2837xD_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
-    <file action="copy" path="../../../../driverlib/" targetDirectory="device" excludeFromBuild="True" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/source/F2837xD_CodeStartBranch.asm" targetDirectory="device" />
-    <file action="link" path="../../../../driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
-    <file action="copy" path="../sci_ex2_loopback_interrupts.c" targetDirectory="" />
-  </project>
-</projectSpec>
 
sci/CCS/sci_ex3_echoback.projectspec (deleted)
--- sci/CCS/sci_ex3_echoback.projectspec
@@ -1,28 +0,0 @@
-<projectSpec>
-  <project
-        name="sci_ex3_echoback"
-        device="TMS320F28377D"
-        cgtVersion="22.6.0.LTS"
-        products="c2000ware_software_package"
-        outputFormat="ELF"
-        launchWizard="False"
-        linkerCommandFile=""
-        enableSysConfigTool="true"
-        sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2837xD"
-        >
-    <configuration name="CPU1_RAM" compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=DEBUG  -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2  --define=CPU1  --diag_warning=225  --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100  " />
-    <configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=DEBUG --define=_FLASH -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2  --define=CPU1  --diag_warning=225  --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100  " />
-    <pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../driverlib/" scope="project" />
-    <pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/include/driverlib.h" targetDirectory="device" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/include/device.h" targetDirectory="device" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/source/device.c" targetDirectory="device" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/targetConfigs/TMS320F28377D.ccxml" targetDirectory="targetConfigs" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/cmd/2837xD_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/cmd/2837xD_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
-    <file action="copy" path="../../../../driverlib/" targetDirectory="device" excludeFromBuild="True" />
-    <file action="copy" path="../../../../../../device_support/f2837xd/common/source/F2837xD_CodeStartBranch.asm" targetDirectory="device" />
-    <file action="link" path="../../../../driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
-    <file action="copy" path="../sci_ex3_echoback.c" targetDirectory="" />
-  </project>
-</projectSpec>
 
sci/baud_tune_via_uart.c (deleted)
--- sci/baud_tune_via_uart.c
@@ -1,534 +0,0 @@
-//#############################################################################
-//
-// FILE:    baud_tune_via_uart.c
-//
-// TITLE:   Tune Baud Rate Via UART.
-//
-//! \addtogroup driver_example_list
-//! <h1>Tune Baud Rate via UART Example</h1>
-//!
-//! This example demonstrates the process of tuning the UART/SCI baud rate of
-//! a C2000 device based on the UART input from another device. As UART does
-//! not have a clock signal, reliable communication requires baud rates to
-//! be reasonably matched. This example addresses cases where  a clock
-//! mismatch between devices is greater than is acceptable for communications,
-//! requiring baud compensation between boards. As reliable communication
-//! only requires matching the EFFECTIVE baud rate, it does not matter which
-//! of the two boards executes the tuning (the board with the less-accurate
-//! clock source does not need to be the one to tune; as long as one of the
-//! two devices tunes to the other, then proper communication can
-//! be established).
-//!
-//! To tune the baud rate of this device, SCI data (of the desired baud rate)
-//! must be sent to this device. The input SCI baud rate must be within the
-//! +/- MARGINPERCENT of the TARGETBAUD chosen below. These two variables are
-//! defined below, and should be chosen based on the application requirements.
-//! Higher MARGINPERCENT will allow more data to be considered "correct" in
-//! noisy conditions, and  may decrease accuracy. The TARGETBAUD is what was
-//! expected to be the baud rate, but due to clock differences, needs to be
-//! tuned for better communication robustness with the other device.
-//!
-//! For LaunchPad and custom devices, there may be need to configure
-//! different GPIO for the SCI_RX and SCI_TX pins if GPIO9 and GPIO8 are not
-//! available for these devices. This can be configured using the included
-//! .syscfg file. Open the SCI peripheral, open the
-//! "PinMux" / "Peripheral and Pin Configuration" configuration section
-//! and choose GPIOs that are available on the given board. Update
-//! GPIO_SCIRX_NUMBER below to match the RX choice. Please refer to the
-//! LaunchPad user guide for list of available GPIO.
-//!
-//! There may also be a need to add a global define to choose the LaunchPad.
-//! For example, in device.h, some devices require choosing a LaunchPad
-//! configuration, such as writing #define _LAUNCHXL_F2####. Please ensure
-//! these are defined if used.
-//!
-//! NOTE: Lower baud rates have more granularity in register options,
-//! and therefore tuning is more affective at these speeds.
-//!
-//! \b External \b Connections for Control Card \n
-//! - SCIA_RX/eCAP1 is on GPIO9, connect to incoming SCI communications
-//! - SCIA_TX is on GPIO8, for observation externally
-//!
-//! \b Watch \b Variables \n
-//! - \b avgBaud - Baud rate that was detected and set after tuning
-//
-//#############################################################################
-//
-// 
-// $Copyright:
-// Copyright (C) 2013-2023 Texas Instruments Incorporated - http://www.ti.com/
-//
-// Redistribution and use in source and binary forms, with or without 
-// modification, are permitted provided that the following conditions 
-// are met:
-// 
-//   Redistributions of source code must retain the above copyright 
-//   notice, this list of conditions and the following disclaimer.
-// 
-//   Redistributions in binary form must reproduce the above copyright
-//   notice, this list of conditions and the following disclaimer in the 
-//   documentation and/or other materials provided with the   
-//   distribution.
-// 
-//   Neither the name of Texas Instruments Incorporated nor the names of
-//   its contributors may be used to endorse or promote products derived
-//   from this software without specific prior written permission.
-// 
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// $
-//#############################################################################
-
-//
-// Included Files
-//
-#include "driverlib.h"
-#include "device.h"
-#include "board.h"
-
-//
-// Defines
-//
-// must replace with the GPIO number of the SCIRX pin chosen in .syscfg
-#define GPIO_SCIRX_NUMBER   9
-
-//
-// choose baud rate being received from target baud rate device
-// closest baud rate to 9600 that can be set in register is 9601
-//
-#define TARGETBAUD          9601
-
-//
-// number of samples in the array (higher = better averaging, lower = faster)
-//
-#define NUMSAMPLES          32
-
-//
-// margin for what is considered a "good" pulse width:
-// set this higher to allow more samples to be considered "good" data,
-// if losing too much data set this lower to prevent "bad" samples to
-// be discarded more strictly
-//
-#define MARGINPERCENT       0.05
-
-//
-// at least this percentage of the samples array must be "good"
-// to not flag an error
-//
-#define MINSAMPLEPERCENT    0.50
-
-//
-// Globals
-//
-volatile uint32_t capCountArr[4];
-volatile int capCountIter = 0;
-volatile float sampleArr[NUMSAMPLES];
-volatile uint16_t sampleArrIter = 0;
-volatile uint16_t stopCaptures = 0;
-
-//
-// Function Prototypes
-//
-void initECAP(void);
-__interrupt void ecap1ISR(void);
-uint16_t arrTo1PulseWidth(volatile float arr[], int size, float targetWidth);
-float computeAvgWidth(volatile float arr[], int size);
-uint32_t getAverageBaud(volatile float arr[], int size, float targetBaudRate);
-
-
-//
-// Main
-//
-void main(void)
-{
-    stopCaptures = 0;
-
-    //
-    // Initialize device clock and peripherals
-    //
-    Device_init();
-
-    //
-    // Disable pin locks and enable internal pullups.
-    //
-    Device_initGPIO();
-
-    //
-    // Initialize PIE and clear PIE registers. Disables CPU interrupts.
-    //
-    Interrupt_initModule();
-
-    //
-    // Initialize the PIE vector table with pointers to the shell Interrupt
-    // Service Routines (ISR).
-    //
-    Interrupt_initVectorTable();
-
-    //
-    // Board Initialization
-    //
-    Board_init();
-
-    //
-    // Configure SCIRX pin's GPIO location as eCAP input
-    // Fill this GPIO number in based on SCIRX from .syscfg file
-    //
-    XBAR_setInputPin(XBAR_INPUT7, GPIO_SCIRX_NUMBER);
-
-    //
-    // Interrupts that are used in this example are re-mapped to ISR functions
-    // found within this file.
-    //
-    Interrupt_register(INT_ECAP1, &ecap1ISR);
-
-    //
-    // Initialize basic settings for eCAP monitoring of SCI RX
-    //
-    initECAP();
-
-    //
-    // Enable interrupts required for this example
-    //
-    Interrupt_enable(INT_ECAP1);
-
-    //
-    // Enable Global Interrupt (INTM) and Real time interrupt (DBGM)
-    //
-    EINT;
-    ERTM;
-
-    //
-    // Loop forever. Suspend or place breakpoints to observe the buffers.
-    //
-    for(;;)
-    {
-        //
-        // Array is filled, begin tuning
-        //
-        if(stopCaptures==1)
-        {
-            //
-            // Get an average baud rate from the array of samples
-            //
-            uint32_t avgBaud = getAverageBaud(sampleArr,NUMSAMPLES,TARGETBAUD);
-
-            //
-            // if the baud function returns the error code '0', then flag an
-            // error
-            //
-            if(avgBaud==0)
-            {
-                ESTOP0;
-            }
-
-            //
-            // Update the device's baud rate to match the measured baud rate
-            //
-            SCI_setBaud(mySCI0_BASE, DEVICE_LSPCLK_FREQ, avgBaud);
-
-            //
-            // Wait for user to view the results in "Expressions" window
-            //
-            ESTOP0;
-
-            //
-            // (OPTIONAL) Continuously send data to SCITX once tuning
-            // is complete for external observation (by logic analyzer or
-            // scope)
-            //
-            //unsigned char *msg;
-            //while(1)
-            //{
-            //    msg = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\0";
-            //    SCI_writeCharArray(SCIA_BASE, (uint16_t*)msg, 51);
-            //}
-
-            //
-            // If continuing, reset the array iterator and unlock the ISR for
-            // new captures
-            //
-            sampleArrIter=0;
-            stopCaptures=0;
-        }
-    }
-}
-
-void initECAP()
-{
-    //
-    // Disable ,clear all capture flags and interrupts
-    //
-    ECAP_disableInterrupt(ECAP1_BASE,
-                          (ECAP_ISR_SOURCE_CAPTURE_EVENT_1  |
-                           ECAP_ISR_SOURCE_CAPTURE_EVENT_2  |
-                           ECAP_ISR_SOURCE_CAPTURE_EVENT_3  |
-                           ECAP_ISR_SOURCE_CAPTURE_EVENT_4  |
-                           ECAP_ISR_SOURCE_COUNTER_OVERFLOW |
-                           ECAP_ISR_SOURCE_COUNTER_PERIOD   |
-                           ECAP_ISR_SOURCE_COUNTER_COMPARE));
-    ECAP_clearInterrupt(ECAP1_BASE,
-                        (ECAP_ISR_SOURCE_CAPTURE_EVENT_1  |
-                         ECAP_ISR_SOURCE_CAPTURE_EVENT_2  |
-                         ECAP_ISR_SOURCE_CAPTURE_EVENT_3  |
-                         ECAP_ISR_SOURCE_CAPTURE_EVENT_4  |
-                         ECAP_ISR_SOURCE_COUNTER_OVERFLOW |
-                         ECAP_ISR_SOURCE_COUNTER_PERIOD   |
-                         ECAP_ISR_SOURCE_COUNTER_COMPARE));
-
-    //
-    // Disable CAP1-CAP4 register loads
-    //
-    ECAP_disableTimeStampCapture(ECAP1_BASE);
-
-    //
-    // Configure eCAP
-    //    Enable capture mode.
-    //    One shot mode, stop capture at event 4.
-    //    Set polarity of the events to rising, falling, rising, falling edge.
-    //    Set capture in time difference mode.
-    //    Select input from XBAR7.
-    //    Enable eCAP module.
-    //    Enable interrupt.
-    //
-    ECAP_stopCounter(ECAP1_BASE);
-    ECAP_enableCaptureMode(ECAP1_BASE);
-
-    ECAP_setCaptureMode(ECAP1_BASE, ECAP_ONE_SHOT_CAPTURE_MODE, ECAP_EVENT_4);
-
-    ECAP_setEventPolarity(ECAP1_BASE, ECAP_EVENT_1, ECAP_EVNT_FALLING_EDGE);
-    ECAP_setEventPolarity(ECAP1_BASE, ECAP_EVENT_2, ECAP_EVNT_RISING_EDGE);
-    ECAP_setEventPolarity(ECAP1_BASE, ECAP_EVENT_3, ECAP_EVNT_FALLING_EDGE);
-    ECAP_setEventPolarity(ECAP1_BASE, ECAP_EVENT_4, ECAP_EVNT_RISING_EDGE);
-
-    ECAP_enableCounterResetOnEvent(ECAP1_BASE, ECAP_EVENT_1);
-    ECAP_enableCounterResetOnEvent(ECAP1_BASE, ECAP_EVENT_2);
-    ECAP_enableCounterResetOnEvent(ECAP1_BASE, ECAP_EVENT_3);
-    ECAP_enableCounterResetOnEvent(ECAP1_BASE, ECAP_EVENT_4);
-
-    XBAR_setInputPin(XBAR_INPUT7, GPIO_SCIRX_NUMBER);
-
-    ECAP_enableLoadCounter(ECAP1_BASE);
-    ECAP_setSyncOutMode(ECAP1_BASE, ECAP_SYNC_OUT_DISABLED);
-    ECAP_startCounter(ECAP1_BASE);
-    ECAP_enableTimeStampCapture(ECAP1_BASE);
-    ECAP_reArm(ECAP1_BASE);
-
-    ECAP_enableInterrupt(ECAP1_BASE, ECAP_ISR_SOURCE_CAPTURE_EVENT_4);
-}
-
-
-__interrupt void ecap1ISR(void)
-{
-    if(stopCaptures==0)
-    {
-        //
-        // Get the capture counts, interrupt every 4. Can be 1-bit or more
-        // wide. Add one to account for partial eCAP counts at higher baud
-        // rates (for example: count = 40, but if had higher resolution, this
-        // would be 40.5)
-        capCountArr[0] = 1+ECAP_getEventTimeStamp(ECAP1_BASE, ECAP_EVENT_1);
-        capCountArr[1] = 1+ECAP_getEventTimeStamp(ECAP1_BASE, ECAP_EVENT_2);
-        capCountArr[2] = 1+ECAP_getEventTimeStamp(ECAP1_BASE, ECAP_EVENT_3);
-        capCountArr[3] = 1+ECAP_getEventTimeStamp(ECAP1_BASE, ECAP_EVENT_4);
-
-        //
-        // Add samples to a buffer. Get average baud and tune if buffer filled.
-        //
-        capCountIter = 0;
-        for(capCountIter=0;capCountIter<4;capCountIter++)
-        {
-            //
-            // if we still have samples left to capture, add it to the
-            // samples array
-            //
-            if(sampleArrIter<NUMSAMPLES)
-            {
-                sampleArr[sampleArrIter] = capCountArr[capCountIter];
-                sampleArrIter++;
-            }
-
-            //
-            // else, all samples were received, break to begin tuning
-            //
-            else
-            {
-                stopCaptures=1;
-                break;
-            }
-        }
-    }
-
-    //
-    // Clear interrupt flags for more interrupts.
-    //
-    ECAP_clearInterrupt(ECAP1_BASE,ECAP_ISR_SOURCE_CAPTURE_EVENT_4);
-    ECAP_clearGlobalInterrupt(ECAP1_BASE);
-
-    //
-    // Start eCAP
-    //
-    ECAP_reArm(ECAP1_BASE);
-
-    //
-    // Acknowledge the group interrupt for more interrupts.
-    //
-    Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP4);
-}
-
-//
-// FUNCTION:    getAverageBaud
-// PURPOSE:     get the average baud rate of the array
-// INPUTS:      array of pulse widths (in number eCAP counts),
-//              size of array, and target baud rate
-// RETURNS:     average baud rate
-//
-uint32_t getAverageBaud(volatile float arr[], int size, float targetBaudRate)
-{
-    //
-    // clean up variable width array to single-bit-width array
-    //
-    float calcTargetWidth = (float)DEVICE_SYSCLK_FREQ/targetBaudRate;
-    uint16_t pass = arrTo1PulseWidth(arr, size, calcTargetWidth);
-
-    //
-    // pass only if enough good samples provided
-    //
-    if(pass == 0)
-    {
-        return(0);
-    }
-
-    //
-    // convert 2-bit width, 3-bit width, and so on to 1-bit width values by
-    // dividing, and average these values. skip unrelated values
-    //
-    float averageBitWidth = computeAvgWidth(arr, size);
-
-    //
-    // get the rounded baud rate from the average number of clocks and the
-    // sysclk frequency
-    //
-    return((uint32_t)(((float)DEVICE_SYSCLK_FREQ/(float)averageBitWidth)+0.5));
-}
-
-//
-// FUNCTION:    arrTo1PulseWidth
-// PURPOSE:     convert 2-bit and higher widths to 1-bit equivalent,
-//              set "bad" values to zero
-// INPUTS:      array of pulse widths in number eCAP counts, size of array,
-//              and target pulse-width (in number of eCAP counts)
-// RETURNS:     pass if enough "good" data received,
-//              fail if not enough "good" data
-//
-uint16_t arrTo1PulseWidth(volatile float arr[], int size, float targetWidth)
-{
-    int iterator = 0, numBitWidths=0;
-    uint16_t goodDataCount = 0, pass = 0;
-    for(iterator=0;iterator<size;iterator++)
-    {
-
-        //
-        // if the item is less than 10 times the bit width,
-        //
-        if(arr[iterator] < targetWidth*10)
-        {
-
-            //
-            // if the item is not within +/-MARGINPERCENT% of the targetWidth,
-            // then it is a multiple of 1-bit
-            //
-            bool belowBound = arr[iterator] < targetWidth*(1.0-MARGINPERCENT);
-            bool aboveBound = arr[iterator] > targetWidth*(1.0+MARGINPERCENT);
-            if(belowBound || aboveBound)
-            {
-
-                //
-                // estimate how many bit-widths this is
-                //
-                numBitWidths = (int)((arr[iterator]/targetWidth)+0.5);
-
-                //
-                // multiply the multi-bit baudrate value by the estimated
-                // number of bits to make this a 1-bit baud estimate
-                //
-                arr[iterator] = arr[iterator]/numBitWidths;
-
-                //
-                // find if this new value is within the bounds
-                //
-                belowBound = arr[iterator] < targetWidth*(1.0-MARGINPERCENT);
-                aboveBound = arr[iterator] > targetWidth*(1.0+MARGINPERCENT);
-                if(belowBound || aboveBound)
-                {
-                    arr[iterator] = 0; // discard if not within margins
-                }
-                else
-                {
-                    goodDataCount++; // iterate good data counter
-                }
-            }
-            else
-            {
-
-                //
-                // this is a 1-bit value so increment the counter for it
-                //
-                goodDataCount++;
-            }
-        }
-        else
-        {
-            arr[iterator] = 0;
-        }
-    }
-
-    //
-    // if at least MINSAMPLEPERCENT% of the sampled values
-    // are "good" samples, then return a pass
-    //
-    if((float)goodDataCount/(float)size > MINSAMPLEPERCENT)
-    {
-        pass=1;
-    }
-    return(pass); //return if the array had enough good samples or not
-}
-
-//
-// FUNCTION:    computeAvgWidth
-// PURPOSE:     average all non-zero items in the array
-// INPUTS:      array of 1-bit pulse widths in number eCAP counts,
-//              and size of array
-// RETURNS:     average width
-//
-float computeAvgWidth(volatile float arr[], int size)
-{
-    int iterator = 0, totSamples = 0;
-    float total = 0;
-    for(iterator=0;iterator<size;iterator++)
-    {
-        //
-        // if the item has not been removed
-        //
-        if(arr[iterator] != 0)
-        {
-            //
-            // iterate the number of samples that are included in the total
-            //
-            totSamples++;
-            //
-            //add it to the moving average
-            //
-            total+=arr[iterator];
-        }
-    }
-    return(total/totSamples); //return the average
-}
 
sci/baud_tune_via_uart.syscfg (deleted)
--- sci/baud_tune_via_uart.syscfg
@@ -1,14 +0,0 @@
-/**
- * Import the modules used in this configuration.
- */
-var sci = scripting.addModule("/driverlib/sci.js", {}, false);
-var sci1 = sci.addInstance();
-
-/**
- * Write custom configuration values to the imported modules.
- */
-sci1.$name = "mySCI0";
-sci1.baudRates = 9600;
-sci1.sci.$name = "MySCI1";
-sci1.sci.scirxdPin.$assign = "GPIO9";
-sci1.sci.scitxdPin.$assign = "GPIO8";(파일 끝에 줄바꿈 문자 없음)
 
sci/sci_ex1_loopback.c (deleted)
--- sci/sci_ex1_loopback.c
@@ -1,176 +0,0 @@
-//###########################################################################
-//
-// FILE:    sci_ex1_loopback.c
-//
-// TITLE:   SCI FIFO Digital Loop Back.
-//
-//! \addtogroup driver_example_list
-//! <h1>SCI FIFO Digital Loop Back</h1>
-//!
-//!  This program uses the internal loop back test mode of the peripheral.
-//!  Other then boot mode pin configuration, no other hardware configuration
-//!  is required. The pinmux and SCI modules are configured through the 
-//!  sysconfig file.
-//!
-//!  This test uses the loopback test mode of the SCI module to send
-//!  characters starting with 0x00 through 0xFF.  The test will send
-//!  a character and then check the receive buffer for a correct match.
-//!
-//!  \b Watch \b Variables \n
-//!  - \b loopCount - Number of characters sent
-//!  - \b errorCount - Number of errors detected
-//!  - \b sendChar - Character sent
-//!  - \b receivedChar - Character received
-//!
-//
-//#############################################################################
-//
-// 
-// $Copyright:
-// Copyright (C) 2013-2023 Texas Instruments Incorporated - http://www.ti.com/
-//
-// Redistribution and use in source and binary forms, with or without 
-// modification, are permitted provided that the following conditions 
-// are met:
-// 
-//   Redistributions of source code must retain the above copyright 
-//   notice, this list of conditions and the following disclaimer.
-// 
-//   Redistributions in binary form must reproduce the above copyright
-//   notice, this list of conditions and the following disclaimer in the 
-//   documentation and/or other materials provided with the   
-//   distribution.
-// 
-//   Neither the name of Texas Instruments Incorporated nor the names of
-//   its contributors may be used to endorse or promote products derived
-//   from this software without specific prior written permission.
-// 
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// $
-//#############################################################################
-
-//
-// Included Files
-//
-#include "driverlib.h"
-#include "device.h"
-#include "board.h"
-
-//
-// Globals
-//
-uint16_t loopCount;
-uint16_t errorCount;
-
-//
-// Function Prototypes
-//
-void error();
-
-//
-// Main
-//
-void main(void)
-{
-    uint16_t sendChar;
-    uint16_t receivedChar;
-
-    //
-    // Initialize device clock and peripherals
-    //
-    Device_init();
-
-    //
-    // Setup GPIO by disabling pin locks and enabling pullups
-    //
-    Device_initGPIO();
-
-    //
-    // Initialize PIE and clear PIE registers. Disables CPU interrupts.
-    //
-    Interrupt_initModule();
-
-    // Initialize the PIE vector table with pointers to the shell Interrupt
-    // Service Routines (ISR).
-    //
-    Interrupt_initVectorTable();
-
-    //
-    // Board Initialization
-    //
-    Board_init();
-
-    //
-    // Enables CPU interrupts
-    //
-    Interrupt_enableMaster();
-
-    //
-    // Initialize counts
-    //
-    loopCount = 0;
-    errorCount = 0;
-
-    //
-    // Send a character starting with 0
-    //
-    sendChar = 0;
-
-    //
-    // Send Characters forever starting with 0x00 and going through 0xFF.
-    // After sending each, check the receive buffer for the correct value.
-    //
-    for(;;)
-    {
-        SCI_writeCharNonBlocking(mySCI0_BASE, sendChar);
-
-        //
-        // Wait for RRDY/RXFFST = 1 for 1 data available in FIFO
-        //
-        while(SCI_getRxFIFOStatus(mySCI0_BASE) == SCI_FIFO_RX0)
-        {
-            ;
-        }
-
-        //
-        // Check received character
-        //
-        receivedChar = SCI_readCharBlockingFIFO(mySCI0_BASE);
-
-        //
-        // Received character not correct
-        //
-        if(receivedChar != sendChar)
-        {
-            errorCount++;
-            // asm("     ESTOP0");  // Uncomment to stop the test here
-            for (;;);
-        }
-
-        //
-        // Move to the next character and repeat the test
-        //
-        sendChar++;
-
-        //
-        // Limit the character to 8-bits
-        //
-        sendChar &= 0x00FF;
-        loopCount++;
-
-    }
-}
-
-//
-// End of file
-//
 
sci/sci_ex1_loopback.syscfg (deleted)
--- sci/sci_ex1_loopback.syscfg
@@ -1,14 +0,0 @@
-/**
- * Import the modules used in this configuration.
- */
-const sci  = scripting.addModule("/driverlib/sci.js", {}, false);
-const sci1 = sci.addInstance();
-
-/**
- * Write custom configuration values to the imported modules.
- */
-sci1.$name     = "mySCI0";
-sci1.baudRates = 9600;
-sci1.loopback  = true;
-sci1.sci.$name = "MySCI1";
-sci1.sci.$assign = "SCIA";
 
sci/sci_ex2_loopback_interrupts.c (deleted)
--- sci/sci_ex2_loopback_interrupts.c
@@ -1,295 +0,0 @@
-//###########################################################################
-//
-// FILE:   sci_ex2_loopback_interrupts.c
-//
-// TITLE:  SCI Digital Loop Back with Interrupts.
-//
-//! \addtogroup driver_example_list
-//! <h1> SCI Digital Loop Back with Interrupts </h1>
-//!
-//!  This test uses the internal loop back test mode of the peripheral.
-//!  Other then boot mode pin configuration, no other hardware configuration
-//!  is required. Both interrupts and the SCI FIFOs are used.
-//!
-//!  A stream of data is sent and then compared to the received stream.
-//!  The SCI-A sent data looks like this: \n
-//!  00 01 \n
-//!  01 02 \n
-//!  02 03 \n
-//!  .... \n
-//!  FE FF \n
-//!  FF 00 \n
-//!  etc.. \n
-//!  The pattern is repeated forever.
-//!
-//!  \b Watch \b Variables \n
-//!  - \b sDataA - Data being sent
-//!  - \b rDataA - Data received
-//!  - \b rDataPointA - Keep track of where we are in the data stream.
-//!    This is used to check the incoming data
-//!
-//
-//###########################################################################
-//
-// 
-// $Copyright:
-// Copyright (C) 2013-2023 Texas Instruments Incorporated - http://www.ti.com/
-//
-// Redistribution and use in source and binary forms, with or without 
-// modification, are permitted provided that the following conditions 
-// are met:
-// 
-//   Redistributions of source code must retain the above copyright 
-//   notice, this list of conditions and the following disclaimer.
-// 
-//   Redistributions in binary form must reproduce the above copyright
-//   notice, this list of conditions and the following disclaimer in the 
-//   documentation and/or other materials provided with the   
-//   distribution.
-// 
-//   Neither the name of Texas Instruments Incorporated nor the names of
-//   its contributors may be used to endorse or promote products derived
-//   from this software without specific prior written permission.
-// 
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// $
-//###########################################################################
-
-//
-// Included Files
-//
-#include "driverlib.h"
-#include "device.h"
-
-//
-// Globals
-//
-
-//
-// Send data for SCI-A
-//
-uint16_t sDataA[2];
-
-//
-// Received data for SCI-A
-//
-uint16_t rDataA[2];
-
-//
-// Used for checking the received data
-//
-uint16_t rDataPointA;
-
-//
-// Function Prototypes
-//
-__interrupt void sciaTXFIFOISR(void);
-__interrupt void sciaRXFIFOISR(void);
-void initSCIAFIFO(void);
-void error(void);
-
-//
-// Main
-//
-void main(void)
-{
-    uint16_t i;
-
-    //
-    // Initialize device clock and peripherals
-    //
-    Device_init();
-
-    //
-    // Setup GPIO by disabling pin locks and enabling pullups
-    //
-    Device_initGPIO();
-
-    //
-    // GPIO28 is the SCI Rx pin.
-    //
-    GPIO_setMasterCore(28, GPIO_CORE_CPU1);
-    GPIO_setPinConfig(GPIO_28_SCIRXDA);
-    GPIO_setDirectionMode(28, GPIO_DIR_MODE_IN);
-    GPIO_setPadConfig(28, GPIO_PIN_TYPE_STD);
-    GPIO_setQualificationMode(28, GPIO_QUAL_ASYNC);
-
-    //
-    // GPIO29 is the SCI Tx pin.
-    //
-    GPIO_setMasterCore(29, GPIO_CORE_CPU1);
-    GPIO_setPinConfig(GPIO_29_SCITXDA);
-    GPIO_setDirectionMode(29, GPIO_DIR_MODE_OUT);
-    GPIO_setPadConfig(29, GPIO_PIN_TYPE_STD);
-    GPIO_setQualificationMode(29, GPIO_QUAL_ASYNC);
-
-    //
-    // Initialize PIE and clear PIE registers. Disables CPU interrupts.
-    //
-    Interrupt_initModule();
-
-    //
-    // Initialize the PIE vector table with pointers to the shell Interrupt
-    // Service Routines (ISR).
-    //
-    Interrupt_initVectorTable();
-
-    //
-    // Interrupts that are used in this example are re-mapped to
-    // ISR functions found within this file.
-    //
-    Interrupt_register(INT_SCIA_RX, sciaRXFIFOISR);
-    Interrupt_register(INT_SCIA_TX, sciaTXFIFOISR);
-
-    //
-    // Initialize the Device Peripherals:
-    //
-    initSCIAFIFO();
-
-    //
-    // Init the send data.  After each transmission this data
-    // will be updated for the next transmission
-    //
-    for(i = 0; i < 2; i++)
-    {
-        sDataA[i] = i;
-    }
-
-    rDataPointA = sDataA[0];
-
-    Interrupt_enable(INT_SCIA_RX);
-    Interrupt_enable(INT_SCIA_TX);
-
-    Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP9);
-
-    //
-    // Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
-    //
-    EINT;
-    ERTM;
-
-    //
-    // IDLE loop. Just sit and loop forever (optional):
-    //
-    for(;;);
-}
-
-//
-// error - Function to halt debugger on error
-//
-void error(void)
-{
-    Example_Fail = 1;
-    asm("     ESTOP0"); // Test failed!! Stop!
-    for (;;);
-}
-
-//
-// sciaTXFIFOISR - SCIA Transmit FIFO ISR
-//
-__interrupt void sciaTXFIFOISR(void)
-{
-    uint16_t i;
-
-    SCI_writeCharArray(SCIA_BASE, sDataA, 2);
-
-    //
-    // Increment send data for next cycle
-    //
-    for(i = 0; i < 2; i++)
-    {
-        sDataA[i] = (sDataA[i] + 1) & 0x00FF;
-    }
-
-    SCI_clearInterruptStatus(SCIA_BASE, SCI_INT_TXFF);
-
-    //
-    // Issue PIE ACK
-    //
-    Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP9);
-}
-
-//
-// sciaRXFIFOISR - SCIA Receive FIFO ISR
-//
-__interrupt void sciaRXFIFOISR(void)
-{
-    uint16_t i;
-
-    SCI_readCharArray(SCIA_BASE, rDataA, 2);
-
-    //
-    // Check received data
-    //
-    for(i = 0; i < 2; i++)
-    {
-        if(rDataA[i] != ((rDataPointA + i) & 0x00FF))
-        {
-            error();
-        }
-    }
-
-    rDataPointA = (rDataPointA + 1) & 0x00FF;
-
-    SCI_clearOverflowStatus(SCIA_BASE);
-
-    SCI_clearInterruptStatus(SCIA_BASE, SCI_INT_RXFF);
-
-    //
-    // Issue PIE ack
-    //
-    Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP9);
-
-    Example_PassCount++;
-}
-
-//
-// initSCIAFIFO - Configure SCIA FIFO
-//
-void initSCIAFIFO()
-{
-    //
-    // 8 char bits, 1 stop bit, no parity. Baud rate is 9600.
-    //
-    SCI_setConfig(SCIA_BASE, DEVICE_LSPCLK_FREQ, 9600, (SCI_CONFIG_WLEN_8 |
-                                                        SCI_CONFIG_STOP_ONE |
-                                                        SCI_CONFIG_PAR_NONE));
-    SCI_enableModule(SCIA_BASE);
-    SCI_enableLoopback(SCIA_BASE);
-    SCI_resetChannels(SCIA_BASE);
-    SCI_enableFIFO(SCIA_BASE);
-
-    //
-    // RX and TX FIFO Interrupts Enabled
-    //
-    SCI_enableInterrupt(SCIA_BASE, (SCI_INT_RXFF | SCI_INT_TXFF));
-    SCI_disableInterrupt(SCIA_BASE, SCI_INT_RXERR);
-
-    SCI_setFIFOInterruptLevel(SCIA_BASE, SCI_FIFO_TX2, SCI_FIFO_RX2);
-    SCI_performSoftwareReset(SCIA_BASE);
-
-    SCI_resetTxFIFO(SCIA_BASE);
-    SCI_resetRxFIFO(SCIA_BASE);
-
-#ifdef AUTOBAUD
-    //
-    // Perform an autobaud lock.
-    // SCI expects an 'a' or 'A' to lock the baud rate.
-    //
-    SCI_lockAutobaud(SCIA_BASE);
-#endif
-}
-
-//
-// End of file
-//
 
sci/sci_ex3_echoback.c (deleted)
--- sci/sci_ex3_echoback.c
@@ -1,203 +0,0 @@
-//#############################################################################
-//
-// FILE:   sci_ex3_echoback.c
-//
-// TITLE:  SCI echoback example.
-//
-//! \addtogroup driver_example_list
-//! <h1>SCI Echoback</h1>
-//!
-//!  This test receives and echo-backs data through the SCI-A port.
-//!
-//!  A terminal such as 'putty' can be used to view the data from
-//!  the SCI and to send information to the SCI. Characters received
-//!  by the SCI port are sent back to the host.
-//!
-//!  \b Running \b the \b Application
-//!  Open a COM port with the following settings using a terminal:
-//!  -  Find correct COM port
-//!  -  Bits per second = 9600
-//!  -  Data Bits = 8
-//!  -  Parity = None
-//!  -  Stop Bits = 1
-//!  -  Hardware Control = None
-//!
-//!  The program will print out a greeting and then ask you to
-//!  enter a character which it will echo back to the terminal.
-//!
-//!  \b Watch \b Variables \n
-//!  - loopCounter - the number of characters sent
-//!
-//! \b External \b Connections \n
-//!  Connect the SCI-A port to a PC via a USB cable.
-//!  Refer to the hardware user guide for the UART/USB connector information.
-//
-//#############################################################################
-//
-// 
-// $Copyright:
-// Copyright (C) 2013-2023 Texas Instruments Incorporated - http://www.ti.com/
-//
-// Redistribution and use in source and binary forms, with or without 
-// modification, are permitted provided that the following conditions 
-// are met:
-// 
-//   Redistributions of source code must retain the above copyright 
-//   notice, this list of conditions and the following disclaimer.
-// 
-//   Redistributions in binary form must reproduce the above copyright
-//   notice, this list of conditions and the following disclaimer in the 
-//   documentation and/or other materials provided with the   
-//   distribution.
-// 
-//   Neither the name of Texas Instruments Incorporated nor the names of
-//   its contributors may be used to endorse or promote products derived
-//   from this software without specific prior written permission.
-// 
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// $
-//#############################################################################
-
-//
-// Included Files
-//
-#include "driverlib.h"
-#include "device.h"
-
-//
-// Defines
-//
-// Define AUTOBAUD to use the autobaud lock feature
-//#define AUTOBAUD
-
-//
-// Globals
-//
-uint16_t loopCounter = 0;
-
-//
-// Main
-//
-void main(void)
-{
-    uint16_t receivedChar;
-    unsigned char *msg;
-    uint16_t rxStatus = 0U;
-
-    //
-    // Configure PLL, disable WD, enable peripheral clocks.
-    //
-    Device_init();
-
-    //
-    // Disable pin locks and enable internal pullups.
-    //
-    Device_initGPIO();
-
-    //
-    // Configuration for the SCI Rx pin.
-    //
-    GPIO_setMasterCore(DEVICE_GPIO_PIN_SCIRXDA, GPIO_CORE_CPU1);
-    GPIO_setPinConfig(DEVICE_GPIO_CFG_SCIRXDA);
-    GPIO_setDirectionMode(DEVICE_GPIO_PIN_SCIRXDA, GPIO_DIR_MODE_IN);
-    GPIO_setPadConfig(DEVICE_GPIO_PIN_SCIRXDA, GPIO_PIN_TYPE_STD);
-    GPIO_setQualificationMode(DEVICE_GPIO_PIN_SCIRXDA, GPIO_QUAL_ASYNC);
-
-    //
-    // Configuration for the SCI Tx pin.
-    //
-    GPIO_setMasterCore(DEVICE_GPIO_PIN_SCITXDA, GPIO_CORE_CPU1);
-    GPIO_setPinConfig(DEVICE_GPIO_CFG_SCITXDA);
-    GPIO_setDirectionMode(DEVICE_GPIO_PIN_SCITXDA, GPIO_DIR_MODE_OUT);
-    GPIO_setPadConfig(DEVICE_GPIO_PIN_SCITXDA, GPIO_PIN_TYPE_STD);
-    GPIO_setQualificationMode(DEVICE_GPIO_PIN_SCITXDA, GPIO_QUAL_ASYNC);
-
-    //
-    // Initialize interrupt controller and vector table.
-    //
-    Interrupt_initModule();
-    Interrupt_initVectorTable();
-
-    //
-    // Initialize SCIA and its FIFO.
-    //
-    SCI_performSoftwareReset(SCIA_BASE);
-
-    //
-    // Configure SCIA for echoback.
-    //
-    SCI_setConfig(SCIA_BASE, DEVICE_LSPCLK_FREQ, 9600, (SCI_CONFIG_WLEN_8 |
-                                                        SCI_CONFIG_STOP_ONE |
-                                                        SCI_CONFIG_PAR_NONE));
-    SCI_resetChannels(SCIA_BASE);
-    SCI_resetRxFIFO(SCIA_BASE);
-    SCI_resetTxFIFO(SCIA_BASE);
-    SCI_clearInterruptStatus(SCIA_BASE, SCI_INT_TXFF | SCI_INT_RXFF);
-    SCI_enableFIFO(SCIA_BASE);
-    SCI_enableModule(SCIA_BASE);
-    SCI_performSoftwareReset(SCIA_BASE);
-
-#ifdef AUTOBAUD
-    //
-    // Perform an autobaud lock.
-    // SCI expects an 'a' or 'A' to lock the baud rate.
-    //
-    SCI_lockAutobaud(SCIA_BASE);
-#endif
-
-    //
-    // Send starting message.
-    //
-    msg = "\r\n\n\nHello World!\0";
-    SCI_writeCharArray(SCIA_BASE, (uint16_t*)msg, 17);
-    msg = "\r\nYou will enter a character, and the DSP will echo it back!\n\0";
-    SCI_writeCharArray(SCIA_BASE, (uint16_t*)msg, 62);
-
-    for(;;)
-    {
-        msg = "\r\nEnter a character: \0";
-        SCI_writeCharArray(SCIA_BASE, (uint16_t*)msg, 22);
-
-        //
-        // Read a character from the FIFO.
-        //
-        receivedChar = SCI_readCharBlockingFIFO(SCIA_BASE);
-
-        rxStatus = SCI_getRxStatus(SCIA_BASE);
-        if((rxStatus & SCI_RXSTATUS_ERROR) != 0)
-        {
-            //
-            //If Execution stops here there is some error
-            //Analyze SCI_getRxStatus() API return value
-            //
-            ESTOP0;
-        }
-
-        //
-        // Echo back the character.
-        //
-        msg = "  You sent: \0";
-        SCI_writeCharArray(SCIA_BASE, (uint16_t*)msg, 13);
-        SCI_writeCharBlockingFIFO(SCIA_BASE, receivedChar);
-
-        //
-        // Increment the loop count variable.
-        //
-        loopCounter++;
-    }
-}
-
-//
-// End of File
-//
-
Add a comment
List