Compare commits
4 Commits
2dc7c95b7a
...
fbe63f0ef8
Author | SHA1 | Date |
---|---|---|
|
fbe63f0ef8 | |
|
4d09e4ab4f | |
|
7e0b0a63a6 | |
|
d343ec514c |
|
@ -23,8 +23,7 @@
|
||||||
#define __MAIN_H
|
#define __MAIN_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C" {
|
||||||
{
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
|
|
|
@ -111,8 +111,7 @@ void vApplicationGetIdleTaskMemory(StaticTask_t **ppxIdleTaskTCBBuffer, StackTyp
|
||||||
* @param None
|
* @param None
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
void MX_FREERTOS_Init(void)
|
void MX_FREERTOS_Init(void) {
|
||||||
{
|
|
||||||
/* USER CODE BEGIN Init */
|
/* USER CODE BEGIN Init */
|
||||||
|
|
||||||
/* USER CODE END Init */
|
/* USER CODE END Init */
|
||||||
|
@ -161,6 +160,7 @@ void MX_FREERTOS_Init(void)
|
||||||
/* USER CODE BEGIN RTOS_THREADS */
|
/* USER CODE BEGIN RTOS_THREADS */
|
||||||
/* add threads, ... */
|
/* add threads, ... */
|
||||||
/* USER CODE END RTOS_THREADS */
|
/* USER CODE END RTOS_THREADS */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* USER CODE BEGIN Header_start_tcp_task */
|
/* USER CODE BEGIN Header_start_tcp_task */
|
||||||
|
@ -271,7 +271,7 @@ void start_dac_task(void const *argument)
|
||||||
/* Infinite loop */
|
/* Infinite loop */
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
osThreadSuspend(adc_taskHandle); // 暂停ADC任务,防止DAC采集时产生干<E7949F>????????,因为ADC和DAC采用的是同一路SPI,但是时序不<E5BA8F>????????
|
osThreadSuspend(adc_taskHandle); // 暂停ADC任务,防止DAC采集时产生干<E7949F><EFBFBD>?????????,因为ADC和DAC采用的是同一路SPI,但是时序不<E5BA8F><EFBFBD>?????????
|
||||||
dac161s997_output(DAC161S997_1, current_buff[0]);
|
dac161s997_output(DAC161S997_1, current_buff[0]);
|
||||||
dac161s997_output(DAC161S997_2, current_buff[1]);
|
dac161s997_output(DAC161S997_2, current_buff[1]);
|
||||||
osThreadResume(adc_taskHandle);
|
osThreadResume(adc_taskHandle);
|
||||||
|
@ -294,7 +294,7 @@ void start_adc_task(void const *argument)
|
||||||
/* Infinite loop */
|
/* Infinite loop */
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
osThreadSuspend(dac_taskHandle); // 暂停DAC任务,防止ADC采集时产生干<E7949F>????????,因为ADC和DAC采用的是同一路SPI,但是时序不<E5BA8F>????????
|
osThreadSuspend(dac_taskHandle); // 暂停DAC任务,防止ADC采集时产生干<E7949F><EFBFBD>?????????,因为ADC和DAC采用的是同一路SPI,但是时序不<E5BA8F><EFBFBD>?????????
|
||||||
uint8_t ch = 0;
|
uint8_t ch = 0;
|
||||||
for (ch = STOP_NC_ADC; ch < AD7124_CHANNEL_EN_MAX; ch++)
|
for (ch = STOP_NC_ADC; ch < AD7124_CHANNEL_EN_MAX; ch++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -206,7 +206,8 @@ void SystemClock_Config(void)
|
||||||
|
|
||||||
/** Initializes the CPU, AHB and APB buses clocks
|
/** Initializes the CPU, AHB and APB buses clocks
|
||||||
*/
|
*/
|
||||||
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
|
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|
||||||
|
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
|
||||||
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
|
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
|
||||||
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
|
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
|
||||||
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
|
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
|
||||||
|
@ -375,8 +376,7 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
|
||||||
/* USER CODE BEGIN Callback 0 */
|
/* USER CODE BEGIN Callback 0 */
|
||||||
|
|
||||||
/* USER CODE END Callback 0 */
|
/* USER CODE END Callback 0 */
|
||||||
if (htim->Instance == TIM4)
|
if (htim->Instance == TIM4) {
|
||||||
{
|
|
||||||
HAL_IncTick();
|
HAL_IncTick();
|
||||||
}
|
}
|
||||||
/* USER CODE BEGIN Callback 1 */
|
/* USER CODE BEGIN Callback 1 */
|
||||||
|
|
|
@ -220,3 +220,4 @@ u32_t sio_tryread(sio_fd_t fd, u8_t *data, u32_t len)
|
||||||
return recved_bytes;
|
return recved_bytes;
|
||||||
}
|
}
|
||||||
#endif /* MDK ARM Compiler */
|
#endif /* MDK ARM Compiler */
|
||||||
|
|
||||||
|
|
|
@ -315,6 +315,7 @@ static void low_level_init(struct netif *netif)
|
||||||
|
|
||||||
/* USER CODE END PHY_POST_CONFIG */
|
/* USER CODE END PHY_POST_CONFIG */
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -460,6 +461,7 @@ static err_t low_level_output_arp_off(struct netif *netif, struct pbuf *q, const
|
||||||
/* USER CODE END 5 */
|
/* USER CODE END 5 */
|
||||||
|
|
||||||
return errval;
|
return errval;
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif /* LWIP_ARP */
|
#endif /* LWIP_ARP */
|
||||||
|
|
||||||
|
@ -872,3 +874,4 @@ void HAL_ETH_TxFreeCallback(uint32_t *buff)
|
||||||
/* USER CODE BEGIN 8 */
|
/* USER CODE BEGIN 8 */
|
||||||
|
|
||||||
/* USER CODE END 8 */
|
/* USER CODE END 8 */
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ProjectOpt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_optx.xsd">
|
<ProjectOpt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_optx.xsd">
|
||||||
|
|
||||||
<SchemaVersion>1.0</SchemaVersion>
|
<SchemaVersion>1.0</SchemaVersion>
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
<PageWidth>79</PageWidth>
|
<PageWidth>79</PageWidth>
|
||||||
<PageLength>66</PageLength>
|
<PageLength>66</PageLength>
|
||||||
<TabStop>8</TabStop>
|
<TabStop>8</TabStop>
|
||||||
<ListingPath></ListingPath>
|
<ListingPath />
|
||||||
</OPTLEX>
|
</OPTLEX>
|
||||||
<ListingPage>
|
<ListingPage>
|
||||||
<CreateCListing>1</CreateCListing>
|
<CreateCListing>1</CreateCListing>
|
||||||
|
@ -104,16 +104,16 @@
|
||||||
<bSchkAxf>0</bSchkAxf>
|
<bSchkAxf>0</bSchkAxf>
|
||||||
<bTchkAxf>0</bTchkAxf>
|
<bTchkAxf>0</bTchkAxf>
|
||||||
<nTsel>6</nTsel>
|
<nTsel>6</nTsel>
|
||||||
<sDll></sDll>
|
<sDll />
|
||||||
<sDllPa></sDllPa>
|
<sDllPa />
|
||||||
<sDlgDll></sDlgDll>
|
<sDlgDll />
|
||||||
<sDlgPa></sDlgPa>
|
<sDlgPa />
|
||||||
<sIfile></sIfile>
|
<sIfile />
|
||||||
<tDll></tDll>
|
<tDll />
|
||||||
<tDllPa></tDllPa>
|
<tDllPa />
|
||||||
<tDlgDll></tDlgDll>
|
<tDlgDll />
|
||||||
<tDlgPa></tDlgPa>
|
<tDlgPa />
|
||||||
<tIfile></tIfile>
|
<tIfile />
|
||||||
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
|
<pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
|
||||||
</DebugOpt>
|
</DebugOpt>
|
||||||
<TargetDriverDllRegistry>
|
<TargetDriverDllRegistry>
|
||||||
|
@ -130,7 +130,7 @@
|
||||||
<SetRegEntry>
|
<SetRegEntry>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
<Key>ARMDBGFLAGS</Key>
|
<Key>ARMDBGFLAGS</Key>
|
||||||
<Name></Name>
|
<Name />
|
||||||
</SetRegEntry>
|
</SetRegEntry>
|
||||||
<SetRegEntry>
|
<SetRegEntry>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
|
@ -162,7 +162,7 @@
|
||||||
<BreakByAccess>0</BreakByAccess>
|
<BreakByAccess>0</BreakByAccess>
|
||||||
<BreakIfRCount>1</BreakIfRCount>
|
<BreakIfRCount>1</BreakIfRCount>
|
||||||
<Filename>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c</Filename>
|
<Filename>../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c</Filename>
|
||||||
<ExecCommand></ExecCommand>
|
<ExecCommand />
|
||||||
<Expression>\\semi_finished_product_testing\../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c\2413</Expression>
|
<Expression>\\semi_finished_product_testing\../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c\2413</Expression>
|
||||||
</Bp>
|
</Bp>
|
||||||
</Breakpoint>
|
</Breakpoint>
|
||||||
|
@ -280,19 +280,19 @@
|
||||||
<newCpu>0</newCpu>
|
<newCpu>0</newCpu>
|
||||||
<uProt>0</uProt>
|
<uProt>0</uProt>
|
||||||
</DebugFlag>
|
</DebugFlag>
|
||||||
<LintExecutable></LintExecutable>
|
<LintExecutable />
|
||||||
<LintConfigFile></LintConfigFile>
|
<LintConfigFile />
|
||||||
<bLintAuto>0</bLintAuto>
|
<bLintAuto>0</bLintAuto>
|
||||||
<bAutoGenD>0</bAutoGenD>
|
<bAutoGenD>0</bAutoGenD>
|
||||||
<LntExFlags>0</LntExFlags>
|
<LntExFlags>0</LntExFlags>
|
||||||
<pMisraName></pMisraName>
|
<pMisraName />
|
||||||
<pszMrule></pszMrule>
|
<pszMrule />
|
||||||
<pSingCmds></pSingCmds>
|
<pSingCmds />
|
||||||
<pMultCmds></pMultCmds>
|
<pMultCmds />
|
||||||
<pMisraNamep></pMisraNamep>
|
<pMisraNamep />
|
||||||
<pszMrulep></pszMrulep>
|
<pszMrulep />
|
||||||
<pSingCmdsp></pSingCmdsp>
|
<pSingCmdsp />
|
||||||
<pMultCmdsp></pMultCmdsp>
|
<pMultCmdsp />
|
||||||
<DebugDescription>
|
<DebugDescription>
|
||||||
<Enable>0</Enable>
|
<Enable>0</Enable>
|
||||||
<EnableFlashSeq>0</EnableFlashSeq>
|
<EnableFlashSeq>0</EnableFlashSeq>
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_projx.xsd">
|
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" noNamespaceSchemaLocation="project_projx.xsd">
|
||||||
|
|
||||||
<SchemaVersion>2.1</SchemaVersion>
|
<SchemaVersion>2.1</SchemaVersion>
|
||||||
|
|
||||||
<Header>### uVision Project, (C) Keil Software</Header>
|
<Header>### uVision Project, (C) Keil Software</Header>
|
||||||
|
|
||||||
<Targets>
|
<Targets>
|
||||||
<Target>
|
<Target>
|
||||||
<TargetName>semi-finished_product_testing</TargetName>
|
<TargetName>semi-finished_product_testing</TargetName>
|
||||||
|
@ -19,28 +16,28 @@
|
||||||
<PackID>Keil.STM32F4xx_DFP.2.12.0</PackID>
|
<PackID>Keil.STM32F4xx_DFP.2.12.0</PackID>
|
||||||
<PackURL>http://www.keil.com/pack</PackURL>
|
<PackURL>http://www.keil.com/pack</PackURL>
|
||||||
<Cpu>IRAM(0x20000000-0x2001BFFF) IRAM2(0x2001C000-0x2001FFFF) IROM(0x8000000-0x80FFFFF) CLOCK(25000000) FPU2 CPUTYPE("Cortex-M4") TZ</Cpu>
|
<Cpu>IRAM(0x20000000-0x2001BFFF) IRAM2(0x2001C000-0x2001FFFF) IROM(0x8000000-0x80FFFFF) CLOCK(25000000) FPU2 CPUTYPE("Cortex-M4") TZ</Cpu>
|
||||||
<FlashUtilSpec></FlashUtilSpec>
|
<FlashUtilSpec />
|
||||||
<StartupFile></StartupFile>
|
<StartupFile />
|
||||||
<FlashDriverDll></FlashDriverDll>
|
<FlashDriverDll />
|
||||||
<DeviceId>0</DeviceId>
|
<DeviceId>0</DeviceId>
|
||||||
<RegisterFile></RegisterFile>
|
<RegisterFile />
|
||||||
<MemoryEnv></MemoryEnv>
|
<MemoryEnv />
|
||||||
<Cmp></Cmp>
|
<Cmp />
|
||||||
<Asm></Asm>
|
<Asm />
|
||||||
<Linker></Linker>
|
<Linker />
|
||||||
<OHString></OHString>
|
<OHString />
|
||||||
<InfinionOptionDll></InfinionOptionDll>
|
<InfinionOptionDll />
|
||||||
<SLE66CMisc></SLE66CMisc>
|
<SLE66CMisc />
|
||||||
<SLE66AMisc></SLE66AMisc>
|
<SLE66AMisc />
|
||||||
<SLE66LinkerMisc></SLE66LinkerMisc>
|
<SLE66LinkerMisc />
|
||||||
<SFDFile>$$Device:STM32F407VGTx$CMSIS\SVD\STM32F40x.svd</SFDFile>
|
<SFDFile>$$Device:STM32F407VGTx$CMSIS\SVD\STM32F40x.svd</SFDFile>
|
||||||
<bCustSvd>0</bCustSvd>
|
<bCustSvd>0</bCustSvd>
|
||||||
<UseEnv>0</UseEnv>
|
<UseEnv>0</UseEnv>
|
||||||
<BinPath></BinPath>
|
<BinPath />
|
||||||
<IncludePath></IncludePath>
|
<IncludePath />
|
||||||
<LibPath></LibPath>
|
<LibPath />
|
||||||
<RegisterFilePath></RegisterFilePath>
|
<RegisterFilePath />
|
||||||
<DBRegisterFilePath></DBRegisterFilePath>
|
<DBRegisterFilePath />
|
||||||
<TargetStatus>
|
<TargetStatus>
|
||||||
<Error>0</Error>
|
<Error>0</Error>
|
||||||
<ExitCodeStop>0</ExitCodeStop>
|
<ExitCodeStop>0</ExitCodeStop>
|
||||||
|
@ -55,15 +52,15 @@
|
||||||
<CreateHexFile>1</CreateHexFile>
|
<CreateHexFile>1</CreateHexFile>
|
||||||
<DebugInformation>1</DebugInformation>
|
<DebugInformation>1</DebugInformation>
|
||||||
<BrowseInformation>0</BrowseInformation>
|
<BrowseInformation>0</BrowseInformation>
|
||||||
<ListingPath></ListingPath>
|
<ListingPath />
|
||||||
<HexFormatSelection>1</HexFormatSelection>
|
<HexFormatSelection>1</HexFormatSelection>
|
||||||
<Merge32K>0</Merge32K>
|
<Merge32K>0</Merge32K>
|
||||||
<CreateBatchFile>0</CreateBatchFile>
|
<CreateBatchFile>0</CreateBatchFile>
|
||||||
<BeforeCompile>
|
<BeforeCompile>
|
||||||
<RunUserProg1>0</RunUserProg1>
|
<RunUserProg1>0</RunUserProg1>
|
||||||
<RunUserProg2>0</RunUserProg2>
|
<RunUserProg2>0</RunUserProg2>
|
||||||
<UserProg1Name></UserProg1Name>
|
<UserProg1Name />
|
||||||
<UserProg2Name></UserProg2Name>
|
<UserProg2Name />
|
||||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||||
<nStopU1X>0</nStopU1X>
|
<nStopU1X>0</nStopU1X>
|
||||||
|
@ -72,8 +69,8 @@
|
||||||
<BeforeMake>
|
<BeforeMake>
|
||||||
<RunUserProg1>0</RunUserProg1>
|
<RunUserProg1>0</RunUserProg1>
|
||||||
<RunUserProg2>0</RunUserProg2>
|
<RunUserProg2>0</RunUserProg2>
|
||||||
<UserProg1Name></UserProg1Name>
|
<UserProg1Name />
|
||||||
<UserProg2Name></UserProg2Name>
|
<UserProg2Name />
|
||||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||||
<nStopB1X>0</nStopB1X>
|
<nStopB1X>0</nStopB1X>
|
||||||
|
@ -82,15 +79,15 @@
|
||||||
<AfterMake>
|
<AfterMake>
|
||||||
<RunUserProg1>0</RunUserProg1>
|
<RunUserProg1>0</RunUserProg1>
|
||||||
<RunUserProg2>0</RunUserProg2>
|
<RunUserProg2>0</RunUserProg2>
|
||||||
<UserProg1Name></UserProg1Name>
|
<UserProg1Name />
|
||||||
<UserProg2Name></UserProg2Name>
|
<UserProg2Name />
|
||||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||||
<nStopA1X>0</nStopA1X>
|
<nStopA1X>0</nStopA1X>
|
||||||
<nStopA2X>0</nStopA2X>
|
<nStopA2X>0</nStopA2X>
|
||||||
</AfterMake>
|
</AfterMake>
|
||||||
<SelectedForBatchBuild>1</SelectedForBatchBuild>
|
<SelectedForBatchBuild>1</SelectedForBatchBuild>
|
||||||
<SVCSIdString></SVCSIdString>
|
<SVCSIdString />
|
||||||
</TargetCommonOption>
|
</TargetCommonOption>
|
||||||
<CommonProperty>
|
<CommonProperty>
|
||||||
<UseCPPCompiler>0</UseCPPCompiler>
|
<UseCPPCompiler>0</UseCPPCompiler>
|
||||||
|
@ -104,8 +101,8 @@
|
||||||
<AssembleAssemblyFile>0</AssembleAssemblyFile>
|
<AssembleAssemblyFile>0</AssembleAssemblyFile>
|
||||||
<PublicsOnly>0</PublicsOnly>
|
<PublicsOnly>0</PublicsOnly>
|
||||||
<StopOnExitCode>3</StopOnExitCode>
|
<StopOnExitCode>3</StopOnExitCode>
|
||||||
<CustomArgument></CustomArgument>
|
<CustomArgument />
|
||||||
<IncludeLibraryModules></IncludeLibraryModules>
|
<IncludeLibraryModules />
|
||||||
<ComprImg>0</ComprImg>
|
<ComprImg>0</ComprImg>
|
||||||
</CommonProperty>
|
</CommonProperty>
|
||||||
<DllOption>
|
<DllOption>
|
||||||
|
@ -139,10 +136,10 @@
|
||||||
<bUseTDR>1</bUseTDR>
|
<bUseTDR>1</bUseTDR>
|
||||||
<Flash2>BIN\UL2V8M.DLL</Flash2>
|
<Flash2>BIN\UL2V8M.DLL</Flash2>
|
||||||
<Flash3>"" ()</Flash3>
|
<Flash3>"" ()</Flash3>
|
||||||
<Flash4></Flash4>
|
<Flash4 />
|
||||||
<pFcarmOut></pFcarmOut>
|
<pFcarmOut />
|
||||||
<pFcarmGrp></pFcarmGrp>
|
<pFcarmGrp />
|
||||||
<pFcArmRoot></pFcArmRoot>
|
<pFcArmRoot />
|
||||||
<FcArmLst>0</FcArmLst>
|
<FcArmLst>0</FcArmLst>
|
||||||
</Utilities>
|
</Utilities>
|
||||||
<TargetArmAds>
|
<TargetArmAds>
|
||||||
|
@ -175,7 +172,7 @@
|
||||||
<RvctClst>0</RvctClst>
|
<RvctClst>0</RvctClst>
|
||||||
<GenPPlst>0</GenPPlst>
|
<GenPPlst>0</GenPPlst>
|
||||||
<AdsCpuType>"Cortex-M4"</AdsCpuType>
|
<AdsCpuType>"Cortex-M4"</AdsCpuType>
|
||||||
<RvctDeviceName></RvctDeviceName>
|
<RvctDeviceName />
|
||||||
<mOS>0</mOS>
|
<mOS>0</mOS>
|
||||||
<uocRom>0</uocRom>
|
<uocRom>0</uocRom>
|
||||||
<uocRam>0</uocRam>
|
<uocRam>0</uocRam>
|
||||||
|
@ -309,7 +306,7 @@
|
||||||
<Size>0x4000</Size>
|
<Size>0x4000</Size>
|
||||||
</OCR_RVCT10>
|
</OCR_RVCT10>
|
||||||
</OnChipMemories>
|
</OnChipMemories>
|
||||||
<RvctStartVector></RvctStartVector>
|
<RvctStartVector />
|
||||||
</ArmAdsMisc>
|
</ArmAdsMisc>
|
||||||
<Cads>
|
<Cads>
|
||||||
<interw>1</interw>
|
<interw>1</interw>
|
||||||
|
@ -336,9 +333,9 @@
|
||||||
<v6WtE>0</v6WtE>
|
<v6WtE>0</v6WtE>
|
||||||
<v6Rtti>0</v6Rtti>
|
<v6Rtti>0</v6Rtti>
|
||||||
<VariousControls>
|
<VariousControls>
|
||||||
<MiscControls></MiscControls>
|
<MiscControls />
|
||||||
<Define>USE_HAL_DRIVER,STM32F407xx</Define>
|
<Define>USE_HAL_DRIVER,STM32F407xx</Define>
|
||||||
<Undefine></Undefine>
|
<Undefine />
|
||||||
<IncludePath>../Core/Inc;../LWIP/App;../LWIP/Target;../Middlewares/Third_Party/LwIP/src/include;../Middlewares/Third_Party/LwIP/system;../Drivers/STM32F4xx_HAL_Driver/Inc;../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy;../Middlewares/Third_Party/FreeRTOS/Source/include;../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS;../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F;../Drivers/BSP/Components/lan8742;../Middlewares/Third_Party/LwIP/src/include/netif/ppp;../Drivers/CMSIS/Device/ST/STM32F4xx/Include;../Middlewares/Third_Party/LwIP/src/include/lwip;../Middlewares/Third_Party/LwIP/src/include/lwip/apps;../Middlewares/Third_Party/LwIP/src/include/lwip/priv;../Middlewares/Third_Party/LwIP/src/include/lwip/prot;../Middlewares/Third_Party/LwIP/src/include/netif;../Middlewares/Third_Party/LwIP/src/include/compat/posix;../Middlewares/Third_Party/LwIP/src/include/compat/posix/arpa;../Middlewares/Third_Party/LwIP/src/include/compat/posix/net;../Middlewares/Third_Party/LwIP/src/include/compat/posix/sys;../Middlewares/Third_Party/LwIP/src/include/compat/stdc;../Middlewares/Third_Party/LwIP/system/arch;../Drivers/CMSIS/Include;../User/application/inc;../User/board/inc;../User/driver;../User/system</IncludePath>
|
<IncludePath>../Core/Inc;../LWIP/App;../LWIP/Target;../Middlewares/Third_Party/LwIP/src/include;../Middlewares/Third_Party/LwIP/system;../Drivers/STM32F4xx_HAL_Driver/Inc;../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy;../Middlewares/Third_Party/FreeRTOS/Source/include;../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS;../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F;../Drivers/BSP/Components/lan8742;../Middlewares/Third_Party/LwIP/src/include/netif/ppp;../Drivers/CMSIS/Device/ST/STM32F4xx/Include;../Middlewares/Third_Party/LwIP/src/include/lwip;../Middlewares/Third_Party/LwIP/src/include/lwip/apps;../Middlewares/Third_Party/LwIP/src/include/lwip/priv;../Middlewares/Third_Party/LwIP/src/include/lwip/prot;../Middlewares/Third_Party/LwIP/src/include/netif;../Middlewares/Third_Party/LwIP/src/include/compat/posix;../Middlewares/Third_Party/LwIP/src/include/compat/posix/arpa;../Middlewares/Third_Party/LwIP/src/include/compat/posix/net;../Middlewares/Third_Party/LwIP/src/include/compat/posix/sys;../Middlewares/Third_Party/LwIP/src/include/compat/stdc;../Middlewares/Third_Party/LwIP/system/arch;../Drivers/CMSIS/Include;../User/application/inc;../User/board/inc;../User/driver;../User/system</IncludePath>
|
||||||
</VariousControls>
|
</VariousControls>
|
||||||
</Cads>
|
</Cads>
|
||||||
|
@ -354,9 +351,9 @@
|
||||||
<useXO>0</useXO>
|
<useXO>0</useXO>
|
||||||
<ClangAsOpt>1</ClangAsOpt>
|
<ClangAsOpt>1</ClangAsOpt>
|
||||||
<VariousControls>
|
<VariousControls>
|
||||||
<MiscControls></MiscControls>
|
<MiscControls />
|
||||||
<Define></Define>
|
<Define />
|
||||||
<Undefine></Undefine>
|
<Undefine />
|
||||||
<IncludePath>../Core/Inc</IncludePath>
|
<IncludePath>../Core/Inc</IncludePath>
|
||||||
</VariousControls>
|
</VariousControls>
|
||||||
</Aads>
|
</Aads>
|
||||||
|
@ -367,15 +364,15 @@
|
||||||
<noStLib>0</noStLib>
|
<noStLib>0</noStLib>
|
||||||
<RepFail>1</RepFail>
|
<RepFail>1</RepFail>
|
||||||
<useFile>0</useFile>
|
<useFile>0</useFile>
|
||||||
<TextAddressRange></TextAddressRange>
|
<TextAddressRange />
|
||||||
<DataAddressRange></DataAddressRange>
|
<DataAddressRange />
|
||||||
<pXoBase></pXoBase>
|
<pXoBase />
|
||||||
<ScatterFile></ScatterFile>
|
<ScatterFile />
|
||||||
<IncludeLibs></IncludeLibs>
|
<IncludeLibs />
|
||||||
<IncludeLibsPath></IncludeLibsPath>
|
<IncludeLibsPath />
|
||||||
<Misc></Misc>
|
<Misc />
|
||||||
<LinkerInputFile></LinkerInputFile>
|
<LinkerInputFile />
|
||||||
<DisabledWarnings></DisabledWarnings>
|
<DisabledWarnings />
|
||||||
</LDads>
|
</LDads>
|
||||||
</TargetArmAds>
|
</TargetArmAds>
|
||||||
</TargetOption>
|
</TargetOption>
|
||||||
|
@ -1141,7 +1138,6 @@
|
||||||
</Groups>
|
</Groups>
|
||||||
</Target>
|
</Target>
|
||||||
</Targets>
|
</Targets>
|
||||||
|
|
||||||
<RTE>
|
<RTE>
|
||||||
<apis />
|
<apis />
|
||||||
<components>
|
<components>
|
||||||
|
@ -1154,7 +1150,6 @@
|
||||||
</components>
|
</components>
|
||||||
<files />
|
<files />
|
||||||
</RTE>
|
</RTE>
|
||||||
|
|
||||||
<LayerInfo>
|
<LayerInfo>
|
||||||
<Layers>
|
<Layers>
|
||||||
<Layer>
|
<Layer>
|
||||||
|
@ -1163,5 +1158,5 @@
|
||||||
</Layer>
|
</Layer>
|
||||||
</Layers>
|
</Layers>
|
||||||
</LayerInfo>
|
</LayerInfo>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,3 +1,11 @@
|
||||||
|
/*
|
||||||
|
* @Author: wangxujie 390834610@qq.com
|
||||||
|
* @Date: 2025-02-19 08:33:14
|
||||||
|
* @LastEditors: wangxujie 390834610@qq.com
|
||||||
|
* @LastEditTime: 2025-04-18 13:36:18
|
||||||
|
* @FilePath: \Semi-finished product testing\User\application\inc\tcpserverc.h
|
||||||
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
|
*/
|
||||||
#ifndef _TCPECHO_H_
|
#ifndef _TCPECHO_H_
|
||||||
#define _TCPECHO_H_
|
#define _TCPECHO_H_
|
||||||
|
|
||||||
|
|
|
@ -370,7 +370,6 @@ void user_send_data_ble2(uint8_t *data, uint16_t len)
|
||||||
|
|
||||||
void user_send_data_control(uint8_t *data, uint16_t len)
|
void user_send_data_control(uint8_t *data, uint16_t len)
|
||||||
{
|
{
|
||||||
|
|
||||||
tcp_write(server_pcb_control, data, len, 1);
|
tcp_write(server_pcb_control, data, len, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,70 @@
|
||||||
|
# 开发环境说明
|
||||||
|
|
||||||
|
## 1. 硬件平台
|
||||||
|
- 主控芯片:STM32F407xx系列(ARM Cortex-M4F内核)
|
||||||
|
- 外设芯片:
|
||||||
|
- ADC:AD7124-8(高精度模拟量输入)
|
||||||
|
- DAC:DAC161S997(高精度模拟量输出)
|
||||||
|
- 以太网:LAN8742(网络通信)
|
||||||
|
- LCD:串口显示屏
|
||||||
|
- 编码器接口
|
||||||
|
|
||||||
|
## 2. 开发工具
|
||||||
|
### 主要IDE
|
||||||
|
- Keil MDK-ARM (MDK-ARM目录存在)
|
||||||
|
- 项目文件:semi-finished_product_testing.uvprojx
|
||||||
|
- 编译配置:semi-finished_product_testing.uvoptx
|
||||||
|
- Visual Studio Code (存在.vscode配置目录)
|
||||||
|
- 用于代码编辑和查看
|
||||||
|
|
||||||
|
### 编译工具
|
||||||
|
- ARMCC编译器 (ARM编译工具链)
|
||||||
|
- 启动文件:startup_stm32f407xx.s
|
||||||
|
|
||||||
|
## 3. 软件框架
|
||||||
|
### 操作系统
|
||||||
|
- FreeRTOS实时操作系统
|
||||||
|
- 版本:位于Middlewares/Third_Party/FreeRTOS/Source/
|
||||||
|
- 配置文件:FreeRTOSConfig.h
|
||||||
|
|
||||||
|
### 驱动库
|
||||||
|
- STM32 HAL库 (Hardware Abstraction Layer)
|
||||||
|
- 位置:Drivers/STM32F4xx_HAL_Driver/
|
||||||
|
- 包含各种外设驱动
|
||||||
|
|
||||||
|
### 网络协议栈
|
||||||
|
- LwIP (Lightweight IP)
|
||||||
|
- 位置:Middlewares/Third_Party/LwIP/
|
||||||
|
- 支持TCP/IP协议
|
||||||
|
- MQTT支持
|
||||||
|
|
||||||
|
### BSP支持
|
||||||
|
- LAN8742网络驱动
|
||||||
|
- 位置:Drivers/BSP/Components/lan8742/
|
||||||
|
|
||||||
|
## 4. 项目结构
|
||||||
|
```
|
||||||
|
项目主要目录:
|
||||||
|
├── Core/ # 核心应用代码
|
||||||
|
├── Drivers/ # 驱动程序
|
||||||
|
├── LWIP/ # 网络协议栈
|
||||||
|
├── MDK-ARM/ # Keil工程文件
|
||||||
|
└── Middlewares/ # 中间件(FreeRTOS/LwIP)
|
||||||
|
```
|
||||||
|
|
||||||
|
## 5. 开发规范
|
||||||
|
- 基于HAL库的驱动开发
|
||||||
|
- FreeRTOS多任务架构
|
||||||
|
- 模块化的设计结构
|
||||||
|
- 标准C语言开发规范
|
||||||
|
|
||||||
|
## 6. 调试方式
|
||||||
|
- ST-Link/J-Link调试器支持
|
||||||
|
- 串口调试
|
||||||
|
- 以太网远程调试
|
||||||
|
|
||||||
|
## 7. 项目文档
|
||||||
|
位于Documents/目录:
|
||||||
|
- 数据手册 (datasheet/)
|
||||||
|
- 项目文档 (project documents/)
|
||||||
|
- 原理图 (schematic diagram/)
|
|
@ -0,0 +1,55 @@
|
||||||
|
```mermaid
|
||||||
|
graph TB
|
||||||
|
%% 主要流程
|
||||||
|
Start[系统启动] --> Init[系统初始化]
|
||||||
|
Init --> Tasks[任务创建]
|
||||||
|
|
||||||
|
%% 主要任务分支
|
||||||
|
Tasks --> Network[网络通信]
|
||||||
|
Tasks --> DataAcq[数据采集]
|
||||||
|
Tasks --> DataOut[数据输出]
|
||||||
|
Tasks --> UserInterface[人机交互]
|
||||||
|
|
||||||
|
%% 网络通信详细
|
||||||
|
Network --> |TCP/IP|RemoteControl[远程控制]
|
||||||
|
RemoteControl --> |命令|CommandProcess[命令处理]
|
||||||
|
RemoteControl --> |数据|DataUpload[数据上传]
|
||||||
|
|
||||||
|
%% 数据采集详细
|
||||||
|
DataAcq --> |ADC|AnalogIn[模拟量输入]
|
||||||
|
DataAcq --> |GPIO|DigitalIn[数字量输入]
|
||||||
|
AnalogIn --> DataProcess[数据处理]
|
||||||
|
DigitalIn --> DataProcess
|
||||||
|
|
||||||
|
%% 数据输出详细
|
||||||
|
DataOut --> |DAC|AnalogOut[模拟量输出]
|
||||||
|
DataOut --> |GPIO|DigitalOut[数字量输出]
|
||||||
|
CommandProcess --> DataOut
|
||||||
|
|
||||||
|
%% 人机交互详细
|
||||||
|
UserInterface --> |LCD|Display[状态显示]
|
||||||
|
UserInterface --> |编码器|LocalControl[本地控制]
|
||||||
|
LocalControl --> DataOut
|
||||||
|
DataProcess --> Display
|
||||||
|
|
||||||
|
%% 通信协议
|
||||||
|
subgraph 通信协议
|
||||||
|
HART[HART协议]
|
||||||
|
BLE[蓝牙通信]
|
||||||
|
TCP[TCP/IP]
|
||||||
|
end
|
||||||
|
|
||||||
|
%% 硬件接口
|
||||||
|
subgraph 硬件接口
|
||||||
|
ADC[AD7124]
|
||||||
|
DAC[DAC161S997]
|
||||||
|
DIO[数字IO]
|
||||||
|
LCD[串口LCD]
|
||||||
|
ETH[以太网]
|
||||||
|
Encoder[编码器]
|
||||||
|
end
|
||||||
|
|
||||||
|
%% 数据流向
|
||||||
|
DataProcess --> |测量数据|DataUpload
|
||||||
|
CommandProcess --> |控制命令|DataOut
|
||||||
|
```
|
Loading…
Reference in New Issue