Selaa lähdekoodia

update,函数名词修改

Signed-off-by: huhui <huhui@sharkgulf.com>
huhui 4 vuotta sitten
vanhempi
commit
b30532af1d

+ 1 - 1
Applications/foc/circle_limitation.c

@@ -1,6 +1,6 @@
 #include "circle_limitation.h"
 
-void CirCle_Limitation_Process(dq_t *inout_vdq, float in_vbus, float svm_ration){
+void circle_limitation(dq_t *inout_vdq, float in_vbus, float svm_ration){
 	float svd = SQ(inout_vdq->Vd);
 	float svq = SQ(inout_vdq->Vq);
 	float svBus = SQ(in_vbus*svm_ration);

+ 1 - 1
Applications/foc/circle_limitation.h

@@ -2,6 +2,6 @@
 #define _CIRCLE_LIMITATION_H__
 #include "foc_type.h"
 
-void CirCle_Limitation_Process(dq_t *inout_vdq, float in_vbus, float svm_ration);
+void circle_limitation(dq_t *inout_vdq, float in_vbus, float svm_ration);
 #endif /*_CIRCLE_LIMITATION_H__ */
 

+ 3 - 3
Applications/foc/foc_api.c

@@ -9,7 +9,7 @@
 #include "foc/park_clark.h"
 #include "foc/svpwm.h"
 #include "foc/foc_core.h"
-#include "foc/foc_stm.h"
+#include "foc/foc_fsm.h"
 #include "foc/phase_current.h"
 #include "foc/hall_sensor.h"
 #include "foc/gas_sensor.h"
@@ -117,14 +117,14 @@ foc_fault_t foc_start_motor(void){
 	if (gas_detect_speed_signal()) {
 		return foc_start_with_gas_error;
 	}
-	return foc_stm_nextstate(START);
+	return foc_fsm_next_state(START);
 }
 
 foc_fault_t foc_stop_motor(void) {
 	if (foc_get_speed() > 0) {
 		return foc_stop_with_speed_error;
 	}
-	return foc_stm_nextstate(ANY_STOP);
+	return foc_fsm_next_state(ANY_STOP);
 }
 
 bool foc_motor_is_started(void) {

+ 16 - 17
Applications/foc/foc_core.c

@@ -3,7 +3,7 @@
 #include "bsp/adc.h"
 #include "foc_core.h"
 #include "foc_api.h"
-#include "foc_stm.h"
+#include "foc_fsm.h"
 #include "phase_current.h"
 #include "park_clark.h"
 #include "hall_sensor.h"
@@ -78,7 +78,7 @@ static void __inline foc_update_theta(motor_foc_t *foc) {
 #endif
 
 
-static void __inline Foc_Calc_Voltage(motor_foc_t *foc, dq_t *sampled, dq_t *ref_out) {
+static void __inline foc_calc_voltage(motor_foc_t *foc, dq_t *sampled, dq_t *ref_out) {
 	//float vd = pi_control(&foc->PI_id, foc->dq_ref.Id - sampled->Id);
 	//float vq = pi_control(&foc->PI_iq, foc->dq_ref.Iq - sampled->Iq);
 	if (foc->mode == FOC_MODE_CURRENT_LOOP || foc->mode == FOC_MODE_CLOSE_LOOP) {
@@ -93,7 +93,7 @@ static void __inline Foc_Calc_Voltage(motor_foc_t *foc, dq_t *sampled, dq_t *ref
 	foc->dq_last.Vq = ref_out->Vq;
 }
 
-static void __inline DeadTime_Compensation(current_samp_t *c_sample, phase_time_t *time) {
+static void __inline deadtime_compensation(current_samp_t *c_sample, phase_time_t *time) {
 #if 0
     /* Dead time compensation */
     if ( c_sample->Ia > 0)
@@ -146,7 +146,7 @@ static void __inline Debug_dq(dq_t *dq){
 }
 
 /* FOC 主控制任务 */
-void FOC_Fast_Task(motor_foc_t *foc){
+void do_motor_foc(motor_foc_t *foc){
 	current_samp_t *c_sample = &foc->current_samp;
 	alpha_beta_t sample_ab, pwm_ab;
 	dq_t         sample_dq, v_dq;
@@ -158,21 +158,21 @@ void FOC_Fast_Task(motor_foc_t *foc){
 	/* 采集相电流 */
 	phase_current_sample(c_sample);
 	/* ABC三相坐标到alpha-beta坐标 */
-	Clark(c_sample->Ia, c_sample->Ib, c_sample->Ic, &sample_ab);
+	do_clark(c_sample->Ia, c_sample->Ib, c_sample->Ic, &sample_ab);
 	/* alpha-beta坐标系到D-Q旋转坐标系 */
-	Park(&sample_ab, foc->motor_stat.theta, &sample_dq);
+	do_park(&sample_ab, foc->motor_stat.theta, &sample_dq);
 	/* 电流环,输出电压给SVPWM */
-	Foc_Calc_Voltage(foc, &sample_dq, &v_dq);
+	foc_calc_voltage(foc, &sample_dq, &v_dq);
 	/* 确保电压在6个扇区的内切圆中 */
-	CirCle_Limitation_Process(&v_dq, foc->vbus, 1.0f);
+	circle_limitation(&v_dq, foc->vbus, 1.0f);
 	/* d-q坐标系到alpha-beta坐标系,输出给svpwm */
 	Rev_Park(&v_dq, foc->motor_stat.theta, &pwm_ab);
 	/* SVPWM,获取三相逆变器的开关时间,用的是pwm1模式,如果是pwm2模式,这个函数需要修改 */
-	SVM_Get_Phase_Time(&pwm_ab, foc->vbus, FOC_PWM_Half_Period, &phase_time, &foc->sector);
+	svpwm_get_phase_time(&pwm_ab, foc->vbus, FOC_PWM_Half_Period, &phase_time, &foc->sector);
 	/* 计算三相电流的采样点 */
 	sample_point = get_phase_sample_point(c_sample, &phase_time, foc->sector);
 	/* 死区补偿 */
-	DeadTime_Compensation(c_sample, &phase_time);
+	deadtime_compensation(c_sample, &phase_time);
 	/* 更新 TIM1的CCR0-2,生成互补pwm, 相电流更新采样点 */
 	pwm_update_duty(phase_time.A, phase_time.B, phase_time.C, sample_point);
 
@@ -182,7 +182,7 @@ void FOC_Fast_Task(motor_foc_t *foc){
 }
 
 /* 计算电流环的参考输入 */
-void Foc_Calc_Current_Ref(motor_foc_t *foc) {
+void foc_calc_current(motor_foc_t *foc) {
 	float speed_ref = ramp_get_target(&foc->speed_ramp);
 	float speed_feedback = foc_get_speed();
 	float vq_out = pi_control(&foc->speed_controller, speed_ref - speed_feedback);	
@@ -195,7 +195,7 @@ void Foc_Calc_Current_Ref(motor_foc_t *foc) {
 	}
 }
 
-void Foc_Speed_Ramp(motor_foc_t *foc){
+void foc_speed_ramp(motor_foc_t *foc){
 	if (foc->speed_command.speed >= 0 && foc->mode != FOC_MODE_OPEN_LOOP){
 		u16 current_rpm = foc_get_speed();
 		u16 ref_rpm = foc->speed_command.speed;
@@ -219,16 +219,14 @@ void foc_pwm_up_handler(void){
 }
 
 measure_time_t g_meas_foc = {.exec_max_time = 15,};
+/*ADC 电流采集中断,调用FOC的核心处理函数*/
 void mc_phase_current_irq(void) {
 	if (g_foc.current_samp.is_calibrating_offset) {
 		phase_current_offset(&g_foc.current_samp);
 		return;
-	}else if (adc_is_trigged_vbus()) {
-		phase_Rds_calibrate(&g_foc.current_samp);
-		return;
 	}
 	time_measure_start(&g_meas_foc);
-	FOC_Fast_Task(&g_foc);
+	do_motor_foc(&g_foc);
 	time_measure_end(&g_meas_foc);
 	if (g_meas_foc.intval_time < 32 || g_meas_foc.intval_time > 34) {
 		//log_chan_value(1, g_meas_foc.intval_time);
@@ -247,8 +245,9 @@ void foc_pwm_start(bool start) {
 	g_foc.mosfec_gate = start;	
 }
 
+/*10ms 定时任务,主要处理foc状态机(里面包含速度环)*/
 void foc_normal_task(void) {
-	FOC_Normal_Task(&g_foc);
+	foc_fsm(&g_foc);
 }
 
 static void foc_measure_task(void *args){

+ 3 - 3
Applications/foc/foc_core.h

@@ -1,9 +1,9 @@
 #ifndef _FOC_CORE_H__
 #define _FOC_CORE_H__
 #include "foc_type.h"
-void FOC_Fast_Task(motor_foc_t *foc);
-void Foc_Calc_Current_Ref(motor_foc_t *foc);
-void Foc_Speed_Ramp(motor_foc_t *foc);
+void do_motor_foc(motor_foc_t *foc);
+void foc_calc_current(motor_foc_t *foc);
+void foc_speed_ramp(motor_foc_t *foc);
 void foc_core_init(void);
 
 #endif /* _FOC_CORE_H__ */

+ 14 - 14
Applications/foc/foc_stm.c → Applications/foc/foc_fsm.c

@@ -7,11 +7,11 @@
 
 extern motor_foc_t g_foc;
 
-foc_state_t foc_stm_state(void){
+foc_state_t foc_fsm_state(void){
 	return g_foc.state;
 }
 
-foc_fault_t foc_stm_nextstate(foc_state_t state) {
+foc_fault_t foc_fsm_next_state(foc_state_t state) {
 	bool changed = false;
 	if (state == g_foc.state) {
 		return foc_success;
@@ -48,49 +48,49 @@ foc_fault_t foc_stm_nextstate(foc_state_t state) {
 	return foc_not_allowed;
 }
 
-void FOC_Normal_Task(motor_foc_t *foc) {
+void foc_fsm(motor_foc_t *foc) {
 	switch (foc->state) {
 		case IDLE:
 			foc->mode = FOC_MODE_OPEN_LOOP;
 			break;
 		case START:
 			pwm_turn_on_low_side();
-			foc_stm_nextstate(CURRENT_CALIBRATE);
+			foc_fsm_next_state(CURRENT_CALIBRATE);
 			break;
 		case CURRENT_CALIBRATE:
 			foc_current_calibrate();
-			foc_stm_nextstate(READY_TO_RUN);
+			foc_fsm_next_state(READY_TO_RUN);
 			break;
 		case READY_TO_RUN:
 			foc_pwm_start(true);
-			foc_stm_nextstate(RAMPING_START);
+			foc_fsm_next_state(RAMPING_START);
 			break;
 		case RAMPING_START:
 			foc_set_dq_command(0.0f, ramp_get_target(&foc->voltage_ramp));
 			//printf("target %f\n", ramp_get_target(&foc->voltage_ramp));
 			if (foc_get_speed() >= RPM_FOR_CLOSE_LOOP){
-				//foc_stm_nextstate(CLOSED_LOOP);
+				//foc_fsm_next_state(CLOSED_LOOP);
 				//foc_overide_vdq(false);
 			}
 			break;
 		// case CLOSED_LOOP:
-		// 	Foc_Speed_Ramp(foc);
+		// 	foc_speed_ramp(foc);
 		// 	foc->mode = FOC_MODE_PI_FULL;
-		// 	foc_stm_nextstate(RUNNING);
+		// 	foc_fsm_next_state(RUNNING);
 		// 	ramp_clear(&foc->voltage_ramp);
 		// 	break;
 		case RUNNING:
-			Foc_Speed_Ramp(foc);
-			Foc_Calc_Current_Ref(foc);
+			foc_speed_ramp(foc);
+			foc_calc_current(foc);
 			if (foc->foc_fault == foc_brake_error){
-				foc_stm_nextstate(ANY_STOP);
+				foc_fsm_next_state(ANY_STOP);
 				break;
 			}
 			/*
 			if (foc_get_speed() <= RPM_FOR_CLOSE_LOOP){
 				foc_set_voltage_ramp(speed_to_voltage(foc_get_speed()));
 				ramp_exc(&foc->voltage_ramp);
-				foc_stm_nextstate(RAMPING_START);
+				foc_fsm_next_state(RAMPING_START);
 				foc->mode = FOC_MODE_OPEN_LOOP;
 				foc_overide_vdq(true);
 			}*/
@@ -98,7 +98,7 @@ void FOC_Normal_Task(motor_foc_t *foc) {
 		case ANY_STOP:
 			ramp_clear(&foc->current_ramp);
 			foc_clear();
-			foc_stm_nextstate(IDLE);
+			foc_fsm_next_state(IDLE);
 			break;
 		default:
 			break;

+ 9 - 0
Applications/foc/foc_fsm.h

@@ -0,0 +1,9 @@
+#ifndef _FOC_STM_H__
+#define _FOC_STM_H__
+#include "foc/foc_api.h"
+#include "foc/foc_core.h"
+
+foc_state_t foc_fsm_state(void);
+foc_fault_t foc_fsm_next_state(foc_state_t state);
+void foc_fsm(motor_foc_t *foc);
+#endif /* _FOC_STM_H__ */

+ 0 - 9
Applications/foc/foc_stm.h

@@ -1,9 +0,0 @@
-#ifndef _FOC_STM_H__
-#define _FOC_STM_H__
-#include "foc/foc_api.h"
-#include "foc/foc_core.h"
-
-foc_state_t foc_stm_state(void);
-foc_fault_t foc_stm_nextstate(foc_state_t state);
-void FOC_Normal_Task(motor_foc_t *foc);
-#endif /* _FOC_STM_H__ */

+ 2 - 2
Applications/foc/park_clark.h

@@ -12,12 +12,12 @@ static __INLINE void Rev_Park(dq_t *dq, float angle, alpha_beta_t *alpha_bata) {
 	alpha_bata->beta = dq->Vd * s + dq->Vq * c;
 }
 
-static __INLINE void Clark(float phaseU, float phaseV, float phaseW, alpha_beta_t *alpha_bata){
+static __INLINE void do_clark(float phaseU, float phaseV, float phaseW, alpha_beta_t *alpha_bata){
 	alpha_bata->alpha = (2.0f * phaseU - phaseV - phaseW) / 3.0f;
 	alpha_bata->beta = (ONE_BY_SQRT3 * (phaseV - phaseW));
 }
 
-static __INLINE void Park(alpha_beta_t *alpha_beta, float angle, dq_t *dq) {
+static __INLINE void do_park(alpha_beta_t *alpha_beta, float angle, dq_t *dq) {
 	float c,s;
 	normal_sincosf(angle, &s, &c);
 

+ 1 - 1
Applications/foc/svpwm.c

@@ -9,7 +9,7 @@
    就是高电平的时间 pwm_period - ccr,我们用PWM1模式,所以最后abc的计算稍微有些不一样
 */
 
-void SVM_Get_Phase_Time(alpha_beta_t *alpha_beta, float vbus, u32 PWM_half_period, phase_time_t *phase_out, u8 *sector_out) {
+void svpwm_get_phase_time(alpha_beta_t *alpha_beta, float vbus, u32 PWM_half_period, phase_time_t *phase_out, u8 *sector_out) {
 	float alpha = alpha_beta->alpha * SQRT3_BY_2;
 	float beta  = alpha_beta->beta  * SQRT3_BY_2;
 	u32   PWM_Period = PWM_half_period * 2;

+ 1 - 1
Applications/foc/svpwm.h

@@ -5,6 +5,6 @@
 void svpwm(alpha_beta_t *alpha_beta, float vbus, u32 PWW_half_period, phase_time_t *phase_out, u8 *sector_out);
 void SVPWM_7(alpha_beta_t *alpha_beta, float vbus, u32 PWM_half_period, phase_time_t *phase_out, u8 *sector_out);
 void SVPWM_ST(alpha_beta_t *alpha_beta, float vbus, u32 PWM_half_period, phase_time_t *phase_out, u8 *sector_out);
-void SVM_Get_Phase_Time(alpha_beta_t *alpha_beta, float vbus, u32 PWM_half_period, phase_time_t *phase_out, u8 *sector_out);
+void svpwm_get_phase_time(alpha_beta_t *alpha_beta, float vbus, u32 PWM_half_period, phase_time_t *phase_out, u8 *sector_out);
 #endif /* _SVPWM_H__ */
 

+ 12 - 12
Librarys/CMSIS/Include/arm_math.h

@@ -6221,10 +6221,10 @@ __STATIC_FORCEINLINE void arm_inv_clarke_q31(
    */
 
   /**
-   * @defgroup park Vector Park Transform
+   * @defgroup park Vector do_park Transform
    *
-   * Forward Park transform converts the input two-coordinate vector to flux and torque components.
-   * The Park transform can be used to realize the transformation of the <code>Ialpha</code> and the <code>Ibeta</code> currents
+   * Forward do_park transform converts the input two-coordinate vector to flux and torque components.
+   * The do_park transform can be used to realize the transformation of the <code>Ialpha</code> and the <code>Ibeta</code> currents
    * from the stationary to the moving reference frame and control the spatial relationship between
    * the stator vector current and rotor flux vector.
    * If we consider the d axis aligned with the rotor flux, the diagram below shows the
@@ -6239,7 +6239,7 @@ __STATIC_FORCEINLINE void arm_inv_clarke_q31(
    * <code>pId</code> and <code>pIq</code> are rotor vector components and <code>cosVal</code> and <code>sinVal</code> are the
    * cosine and sine values of theta (rotor flux position).
    * \par Fixed-Point Behavior
-   * Care must be taken when using the Q31 version of the Park transform.
+   * Care must be taken when using the Q31 version of the do_park transform.
    * In particular, the overflow and saturation behavior of the accumulator used must be considered.
    * Refer to the function specific documentation below for usage guidelines.
    */
@@ -6250,7 +6250,7 @@ __STATIC_FORCEINLINE void arm_inv_clarke_q31(
    */
 
   /**
-   * @brief Floating-point Park transform
+   * @brief Floating-point do_park transform
    * @param[in]  Ialpha  input two-phase vector coordinate alpha
    * @param[in]  Ibeta   input two-phase vector coordinate beta
    * @param[out] pId     points to output   rotor reference frame d
@@ -6259,7 +6259,7 @@ __STATIC_FORCEINLINE void arm_inv_clarke_q31(
    * @param[in]  cosVal  cosine value of rotation angle theta
    * @return     none
    *
-   * The function implements the forward Park transform.
+   * The function implements the forward do_park transform.
    *
    */
   __STATIC_FORCEINLINE void arm_park_f32(
@@ -6279,7 +6279,7 @@ __STATIC_FORCEINLINE void arm_inv_clarke_q31(
 
 
 /**
-  @brief  Park transform for Q31 version
+  @brief  do_park transform for Q31 version
   @param[in]  Ialpha  input two-phase vector coordinate alpha
   @param[in]  Ibeta   input two-phase vector coordinate beta
   @param[out] pId     points to output rotor reference frame d
@@ -6334,8 +6334,8 @@ __STATIC_FORCEINLINE void arm_park_q31(
    */
 
   /**
-   * @defgroup inv_park Vector Inverse Park transform
-   * Inverse Park transform converts the input flux and torque components to two-coordinate vector.
+   * @defgroup inv_park Vector Inverse do_park transform
+   * Inverse do_park transform converts the input flux and torque components to two-coordinate vector.
    *
    * The function operates on a single sample of data and each call to the function returns the processed output.
    * The library provides separate functions for Q31 and floating-point data types.
@@ -6345,7 +6345,7 @@ __STATIC_FORCEINLINE void arm_park_q31(
    * <code>Id</code> and <code>Iq</code> are rotor vector components and <code>cosVal</code> and <code>sinVal</code> are the
    * cosine and sine values of theta (rotor flux position).
    * \par Fixed-Point Behavior
-   * Care must be taken when using the Q31 version of the Park transform.
+   * Care must be taken when using the Q31 version of the do_park transform.
    * In particular, the overflow and saturation behavior of the accumulator used must be considered.
    * Refer to the function specific documentation below for usage guidelines.
    */
@@ -6356,7 +6356,7 @@ __STATIC_FORCEINLINE void arm_park_q31(
    */
 
    /**
-   * @brief  Floating-point Inverse Park transform
+   * @brief  Floating-point Inverse do_park transform
    * @param[in]  Id       input coordinate of rotor reference frame d
    * @param[in]  Iq       input coordinate of rotor reference frame q
    * @param[out] pIalpha  points to output two-phase orthogonal vector axis alpha
@@ -6382,7 +6382,7 @@ __STATIC_FORCEINLINE void arm_park_q31(
 
 
 /**
-  @brief  Inverse Park transform for   Q31 version
+  @brief  Inverse do_park transform for   Q31 version
   @param[in]  Id       input coordinate of rotor reference frame d
   @param[in]  Iq       input coordinate of rotor reference frame q
   @param[out] pIalpha  points to output two-phase orthogonal vector axis alpha

+ 20 - 20
Project/MC100_OS.uvoptx

@@ -287,18 +287,6 @@
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
       <bDave2>0</bDave2>
-      <PathWithFileName>..\Applications\foc\foc_stm.c</PathWithFileName>
-      <FilenameWithoutPath>foc_stm.c</FilenameWithoutPath>
-      <RteFlg>0</RteFlg>
-      <bShared>0</bShared>
-    </File>
-    <File>
-      <GroupNumber>2</GroupNumber>
-      <FileNumber>8</FileNumber>
-      <FileType>1</FileType>
-      <tvExp>0</tvExp>
-      <tvExpOptDlg>0</tvExpOptDlg>
-      <bDave2>0</bDave2>
       <PathWithFileName>..\Applications\foc\gas_sensor.c</PathWithFileName>
       <FilenameWithoutPath>gas_sensor.c</FilenameWithoutPath>
       <RteFlg>0</RteFlg>
@@ -306,7 +294,7 @@
     </File>
     <File>
       <GroupNumber>2</GroupNumber>
-      <FileNumber>9</FileNumber>
+      <FileNumber>8</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -318,7 +306,7 @@
     </File>
     <File>
       <GroupNumber>2</GroupNumber>
-      <FileNumber>10</FileNumber>
+      <FileNumber>9</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -330,7 +318,7 @@
     </File>
     <File>
       <GroupNumber>2</GroupNumber>
-      <FileNumber>11</FileNumber>
+      <FileNumber>10</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -342,7 +330,7 @@
     </File>
     <File>
       <GroupNumber>2</GroupNumber>
-      <FileNumber>12</FileNumber>
+      <FileNumber>11</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -354,7 +342,7 @@
     </File>
     <File>
       <GroupNumber>2</GroupNumber>
-      <FileNumber>13</FileNumber>
+      <FileNumber>12</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -366,7 +354,7 @@
     </File>
     <File>
       <GroupNumber>2</GroupNumber>
-      <FileNumber>14</FileNumber>
+      <FileNumber>13</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -378,7 +366,7 @@
     </File>
     <File>
       <GroupNumber>2</GroupNumber>
-      <FileNumber>15</FileNumber>
+      <FileNumber>14</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -390,7 +378,7 @@
     </File>
     <File>
       <GroupNumber>2</GroupNumber>
-      <FileNumber>16</FileNumber>
+      <FileNumber>15</FileNumber>
       <FileType>1</FileType>
       <tvExp>0</tvExp>
       <tvExpOptDlg>0</tvExpOptDlg>
@@ -400,6 +388,18 @@
       <RteFlg>0</RteFlg>
       <bShared>0</bShared>
     </File>
+    <File>
+      <GroupNumber>2</GroupNumber>
+      <FileNumber>16</FileNumber>
+      <FileType>1</FileType>
+      <tvExp>0</tvExp>
+      <tvExpOptDlg>0</tvExpOptDlg>
+      <bDave2>0</bDave2>
+      <PathWithFileName>..\Applications\foc\foc_fsm.c</PathWithFileName>
+      <FilenameWithoutPath>foc_fsm.c</FilenameWithoutPath>
+      <RteFlg>0</RteFlg>
+      <bShared>0</bShared>
+    </File>
   </Group>
 
   <Group>

+ 5 - 5
Project/MC100_OS.uvprojx

@@ -418,11 +418,6 @@
               <FileType>1</FileType>
               <FilePath>..\Applications\foc\foc_core.c</FilePath>
             </File>
-            <File>
-              <FileName>foc_stm.c</FileName>
-              <FileType>1</FileType>
-              <FilePath>..\Applications\foc\foc_stm.c</FilePath>
-            </File>
             <File>
               <FileName>gas_sensor.c</FileName>
               <FileType>1</FileType>
@@ -468,6 +463,11 @@
               <FileType>1</FileType>
               <FilePath>..\Applications\foc\foc_cmd.c</FilePath>
             </File>
+            <File>
+              <FileName>foc_fsm.c</FileName>
+              <FileType>1</FileType>
+              <FilePath>..\Applications\foc\foc_fsm.c</FilePath>
+            </File>
           </Files>
         </Group>
         <Group>