Типа запустилось, но все равно есть проблемы с расчетом угла
This commit is contained in:
@@ -43,8 +43,10 @@ void deInitialize_MCU(void)
|
||||
memset(&MCU_CORTEX_MEM, 0, sizeof(MCU_CORTEX_MEM));
|
||||
memset(&htim1, 0, sizeof(htim1));
|
||||
|
||||
|
||||
|
||||
ClearStruct(upp);
|
||||
ClearStruct(htim1);
|
||||
ClearStruct(htim2);
|
||||
ClearStruct(htim3);
|
||||
ClearStruct(htim8);
|
||||
ClearStruct(htim11);
|
||||
@@ -107,7 +109,7 @@ struct TIM_Sim tim14s;
|
||||
void Init_TIM_SIM(void)
|
||||
{
|
||||
#ifdef USE_TIM1
|
||||
memset(&tim1s, 0, sizeof(tim1s));
|
||||
memset(&tim1s, 0, sizeof(tim1s));
|
||||
tim1s.tx_cnt = TIM1->CNT;
|
||||
tim1s.tx_step = hmcu.sSimSampleTime * ABP2_TIMS_Value;
|
||||
|
||||
@@ -121,7 +123,7 @@ void Init_TIM_SIM(void)
|
||||
tim1s.Channels.OC4_PIN_SHIFT = 11;
|
||||
#endif
|
||||
#ifdef USE_TIM2
|
||||
memset(&tim2s, 0, sizeof(tim2s));
|
||||
memset(&tim2s, 0, sizeof(tim2s));
|
||||
tim2s.tx_cnt = TIM2->CNT;
|
||||
tim2s.tx_step = hmcu.sSimSampleTime * ABP1_TIMS_Value;
|
||||
|
||||
@@ -135,7 +137,7 @@ void Init_TIM_SIM(void)
|
||||
tim2s.Channels.OC4_PIN_SHIFT = 3;
|
||||
#endif
|
||||
#ifdef USE_TIM3
|
||||
memset(&tim3s, 0, sizeof(tim3s));
|
||||
memset(&tim3s, 0, sizeof(tim3s));
|
||||
tim3s.tx_cnt = TIM3->CNT;
|
||||
tim3s.tx_step = hmcu.sSimSampleTime * ABP1_TIMS_Value;
|
||||
|
||||
@@ -149,7 +151,7 @@ void Init_TIM_SIM(void)
|
||||
tim3s.Channels.OC4_PIN_SHIFT = 9;
|
||||
#endif
|
||||
#ifdef USE_TIM4
|
||||
memset(&tim4s, 0, sizeof(tim4s));
|
||||
memset(&tim4s, 0, sizeof(tim4s));
|
||||
tim4s.tx_cnt = TIM4->CNT;
|
||||
tim4s.tx_step = hmcu.sSimSampleTime * ABP1_TIMS_Value;
|
||||
|
||||
@@ -163,7 +165,7 @@ void Init_TIM_SIM(void)
|
||||
tim4s.Channels.OC4_PIN_SHIFT = 9;
|
||||
#endif
|
||||
#ifdef USE_TIM5
|
||||
memset(&tim5s, 0, sizeof(tim5s));
|
||||
memset(&tim5s, 0, sizeof(tim5s));
|
||||
tim5s.tx_cnt = TIM5->CNT;
|
||||
tim5s.tx_step = hmcu.sSimSampleTime * ABP1_TIMS_Value;
|
||||
|
||||
@@ -177,7 +179,7 @@ void Init_TIM_SIM(void)
|
||||
tim5s.Channels.OC4_PIN_SHIFT = 3;
|
||||
#endif
|
||||
#ifdef USE_TIM6
|
||||
memset(&tim6s, 0, sizeof(tim6s));
|
||||
memset(&tim6s, 0, sizeof(tim6s));
|
||||
tim6s.tx_cnt = TIM6->CNT;
|
||||
tim6s.tx_step = hmcu.sSimSampleTime * ABP1_TIMS_Value;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user