Przeglądaj źródła

未知BUG

master
Chiri 1 miesiąc temu
rodzic
commit
583d2eae89
11 zmienionych plików z 820 dodań i 810 usunięć
  1. +5
    -2
      Core/Src/main.c
  2. +5
    -2
      Core/Src/stm32f4xx_it.c
  3. +788
    -788
      EWARM/PLSR.dep
  4. +6
    -6
      EWARM/settings/PLSR.dbgdt
  5. +7
    -7
      EWARM/settings/PLSR.dnx
  6. +4
    -4
      EWARM/settings/Project.wsdt
  7. +2
    -0
      Hardware/PLSR.c
  8. +1
    -0
      Hardware/PLSR.h
  9. +2
    -1
      Hardware/modbus.c
  10. BIN
      Words/设计方案书 .doc
  11. BIN
      Words/需求规格书.doc

+ 5
- 2
Core/Src/main.c Wyświetl plik

@@ -134,9 +134,11 @@ int main(void)
SystemClock_Config();

/* USER CODE BEGIN SysInit */
HAL_PWR_EnableBkUpAccess();/* 使能备份域访问 */
__HAL_RCC_BKPSRAM_CLK_ENABLE();/* 使能备份SRAM时钟 */
HAL_PWREx_EnableBkUpReg();/* 使能备份SRAM */
/* USER CODE END SysInit */

/* Initialize all configured peripherals */
@@ -331,6 +333,7 @@ void PulseStartTsk(void *p_arg)
{
EN = 0;
PulseStartFlag = 1;
//NowFrequeny = PulseOutput[NowPulse].Frequency; /* 保存当前脉冲的频率 */
PulseStart();
HAL_TIM_Base_Start_IT(&htim3); /* 启动定时器3和中断 */
}
@@ -507,7 +510,7 @@ void EXTSet(void *p_arg)
*/
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
OSIntEnter(); /* 进入中断 */
//OSIntEnter(); /* 进入中断 */
if (htim == (&htim3))
{
@@ -577,7 +580,7 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
}
}
OSIntExit(); /* 退出中断 */
//OSIntExit(); /* 退出中断 */
}
/* USER CODE END 4 */



+ 5
- 2
Core/Src/stm32f4xx_it.c Wyświetl plik

@@ -213,7 +213,7 @@ void SysTick_Handler(void)
void TIM2_IRQHandler(void)
{
/* USER CODE BEGIN TIM2_IRQn 0 */
// OSIntEnter(); /* 进入中断 */
/* USER CODE END TIM2_IRQn 0 */
HAL_TIM_IRQHandler(&htim2);
/* USER CODE BEGIN TIM2_IRQn 1 */
@@ -250,6 +250,7 @@ void TIM2_IRQHandler(void)
}
ArrFlag = 1;
SetNextPulse();/* 设置下一次进入中断的脉冲数 */
//NowFrequeny = PulseOutput[NowPulse].Frequency; /* 保存当前脉冲的频率 */
HAL_TIM_Base_Start_IT(&htim3); /* 启动定时器3和中断 */
}
@@ -298,6 +299,7 @@ void TIM2_IRQHandler(void)
}
ArrFlag = 1;
SetNextPulse();/* 设置下一次进入中断的脉冲数 */
//NowFrequeny = PulseOutput[NowPulse].Frequency; /* 保存当前脉冲的频率 */
HAL_TIM_Base_Start_IT(&htim3); /* 启动定时器3和中断 */
}

@@ -307,9 +309,10 @@ void TIM2_IRQHandler(void)
{
PulseCount = 0;
ArrFlag = 0;
HAL_TIM_PWM_Stop_IT(&htim10,TIM_CHANNEL_1); /* 停止PWM输出 */
HAL_TIM_PWM_Stop_IT(&htim10,TIM_CHANNEL_1); /* 停止PWM输出 */
}
}
// OSIntExit(); /* 退出中断 */
/* USER CODE END TIM2_IRQn 1 */
}



+ 788
- 788
EWARM/PLSR.dep
Plik diff jest za duży
Wyświetl plik


+ 6
- 6
EWARM/settings/PLSR.dbgdt
Plik diff jest za duży
Wyświetl plik


+ 7
- 7
EWARM/settings/PLSR.dnx Wyświetl plik

@@ -12,15 +12,15 @@
<ByteLimit>50</ByteLimit>
</Stack>
<StLinkDriver>
<stlinkserialNo>44142557</stlinkserialNo>
<stlinkfoundProbes />
<stlinkResetStyle>0</stlinkResetStyle>
<stlinkResetStrategy>2</stlinkResetStrategy>
<CStepIntDis>_ 0</CStepIntDis>
<LeaveTargetRunning>_ 0</LeaveTargetRunning>
<stlinkserialNo>44142557</stlinkserialNo>
<stlinkfoundProbes />
</StLinkDriver>
<DebugChecksum>
<Checksum>223229180</Checksum>
<Checksum>1343253174</Checksum>
</DebugChecksum>
<Exceptions>
<StopOnUncaught>_ 0</StopOnUncaught>
@@ -126,10 +126,6 @@
<ShowTimeSum>1</ShowTimeSum>
<SumSortOrder>0</SumSortOrder>
</EventLog>
<TermIOLog>
<LoggingEnabled>_ 0</LoggingEnabled>
<LogFile>_ ""</LogFile>
</TermIOLog>
<LogFile>
<LoggingEnabled>_ 0</LoggingEnabled>
<LogFile>_ ""</LogFile>
@@ -159,4 +155,8 @@
<Count>1</Count>
<SuppressDialog>0</SuppressDialog>
</Aliases>
<TermIOLog>
<LoggingEnabled>_ 0</LoggingEnabled>
<LogFile>_ ""</LogFile>
</TermIOLog>
</settings>

+ 4
- 4
EWARM/settings/Project.wsdt
Plik diff jest za duży
Wyświetl plik


+ 2
- 0
Hardware/PLSR.c Wyświetl plik

@@ -20,6 +20,8 @@ int32_t AccUpCount; /*
int32_t AccDownCount; /* 减速脉冲数 */
int32_t NowMAXPulse; /* 当前要达到的总脉冲 */

uint32_t NowFrequeny;

int32_t PulseCount = 0;

/**


+ 1
- 0
Hardware/PLSR.h Wyświetl plik

@@ -41,6 +41,7 @@ extern int32_t AccUpCount; ///<<
extern int32_t AccDownCount;///<<减速脉冲数
extern int32_t NowMAXPulse; ///<<当前要达到的总脉冲
extern int32_t PulseCount;
extern uint32_t NowFrequeny;
extern int32_t NextPulseEND;




+ 2
- 1
Hardware/modbus.c Wyświetl plik

@@ -94,7 +94,8 @@ void ProcessModbusFrame(uint8_t buffer[], uint16_t longth)
;break;
case WRITE_ONLY_REGISTER: WriteOnlyRegister(buffer, longth)
;break;
case PLSR_COUNT_CLEAR: PLSRCountClear();
// case PLSR_COUNT_CLEAR: PLSRCountClear()
// ;break;
default :ErrorBack(buffer, longth); /* ÎÞЧָÁîÂë */
;break;


BIN
Words/设计方案书 .doc Wyświetl plik


BIN
Words/需求规格书.doc Wyświetl plik


Ładowanie…
Anuluj
Zapisz