This commit is contained in:
parent
3cfaa27de4
commit
4d20dfbc49
|
@ -58,15 +58,15 @@ osThreadId ch438_taskHandle;
|
||||||
|
|
||||||
/* USER CODE END FunctionPrototypes */
|
/* USER CODE END FunctionPrototypes */
|
||||||
|
|
||||||
void start_lwip_task(void const *argument);
|
void start_lwip_task(void const * argument);
|
||||||
void start_dac_task(void const *argument);
|
void start_dac_task(void const * argument);
|
||||||
void start_ch438_task(void const *argument);
|
void start_ch438_task(void const * argument);
|
||||||
|
|
||||||
extern void MX_LWIP_Init(void);
|
extern void MX_LWIP_Init(void);
|
||||||
void MX_FREERTOS_Init(void); /* (MISRA C 2004 rule 8.1) */
|
void MX_FREERTOS_Init(void); /* (MISRA C 2004 rule 8.1) */
|
||||||
|
|
||||||
/* GetIdleTaskMemory prototype (linked to static allocation support) */
|
/* GetIdleTaskMemory prototype (linked to static allocation support) */
|
||||||
void vApplicationGetIdleTaskMemory(StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize);
|
void vApplicationGetIdleTaskMemory( StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize );
|
||||||
|
|
||||||
/* USER CODE BEGIN GET_IDLE_TASK_MEMORY */
|
/* USER CODE BEGIN GET_IDLE_TASK_MEMORY */
|
||||||
static StaticTask_t xIdleTaskTCBBuffer;
|
static StaticTask_t xIdleTaskTCBBuffer;
|
||||||
|
@ -82,12 +82,11 @@ void vApplicationGetIdleTaskMemory(StaticTask_t **ppxIdleTaskTCBBuffer, StackTyp
|
||||||
/* USER CODE END GET_IDLE_TASK_MEMORY */
|
/* USER CODE END GET_IDLE_TASK_MEMORY */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief FreeRTOS initialization
|
* @brief FreeRTOS initialization
|
||||||
* @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 */
|
||||||
|
@ -124,6 +123,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_lwip_task */
|
/* USER CODE BEGIN Header_start_lwip_task */
|
||||||
|
@ -133,7 +133,7 @@ void MX_FREERTOS_Init(void)
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
/* USER CODE END Header_start_lwip_task */
|
/* USER CODE END Header_start_lwip_task */
|
||||||
void start_lwip_task(void const *argument)
|
void start_lwip_task(void const * argument)
|
||||||
{
|
{
|
||||||
/* init code for LWIP */
|
/* init code for LWIP */
|
||||||
MX_LWIP_Init();
|
MX_LWIP_Init();
|
||||||
|
@ -158,7 +158,7 @@ void start_lwip_task(void const *argument)
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
/* USER CODE END Header_start_dac_task */
|
/* USER CODE END Header_start_dac_task */
|
||||||
void start_dac_task(void const *argument)
|
void start_dac_task(void const * argument)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN start_dac_task */
|
/* USER CODE BEGIN start_dac_task */
|
||||||
/* Infinite loop */
|
/* Infinite loop */
|
||||||
|
@ -182,7 +182,7 @@ void start_dac_task(void const *argument)
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
/* USER CODE END Header_start_ch438_task */
|
/* USER CODE END Header_start_ch438_task */
|
||||||
void start_ch438_task(void const *argument)
|
void start_ch438_task(void const * argument)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN start_ch438_task */
|
/* USER CODE BEGIN start_ch438_task */
|
||||||
/* Infinite loop */
|
/* Infinite loop */
|
||||||
|
|
|
@ -162,10 +162,10 @@ void MX_GPIO_Init(void)
|
||||||
HAL_GPIO_Init(CH438_1_INT_GPIO_Port, &GPIO_InitStruct);
|
HAL_GPIO_Init(CH438_1_INT_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
/* EXTI interrupt init*/
|
/* EXTI interrupt init*/
|
||||||
HAL_NVIC_SetPriority(EXTI2_IRQn, 6, 0);
|
HAL_NVIC_SetPriority(EXTI2_IRQn, 4, 0);
|
||||||
HAL_NVIC_EnableIRQ(EXTI2_IRQn);
|
HAL_NVIC_EnableIRQ(EXTI2_IRQn);
|
||||||
|
|
||||||
HAL_NVIC_SetPriority(EXTI15_10_IRQn, 6, 0);
|
HAL_NVIC_SetPriority(EXTI15_10_IRQn, 4, 0);
|
||||||
HAL_NVIC_EnableIRQ(EXTI15_10_IRQn);
|
HAL_NVIC_EnableIRQ(EXTI15_10_IRQn);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,9 +65,9 @@ void MX_FREERTOS_Init(void);
|
||||||
/* USER CODE END 0 */
|
/* USER CODE END 0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The application entry point.
|
* @brief The application entry point.
|
||||||
* @retval int
|
* @retval int
|
||||||
*/
|
*/
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN 1 */
|
/* USER CODE BEGIN 1 */
|
||||||
|
@ -119,22 +119,22 @@ int main(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief System Clock Configuration
|
* @brief System Clock Configuration
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
void SystemClock_Config(void)
|
void SystemClock_Config(void)
|
||||||
{
|
{
|
||||||
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
|
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
|
||||||
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
|
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
|
||||||
|
|
||||||
/** Configure the main internal regulator output voltage
|
/** Configure the main internal regulator output voltage
|
||||||
*/
|
*/
|
||||||
__HAL_RCC_PWR_CLK_ENABLE();
|
__HAL_RCC_PWR_CLK_ENABLE();
|
||||||
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
|
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
|
||||||
|
|
||||||
/** Initializes the RCC Oscillators according to the specified parameters
|
/** Initializes the RCC Oscillators according to the specified parameters
|
||||||
* in the RCC_OscInitTypeDef structure.
|
* in the RCC_OscInitTypeDef structure.
|
||||||
*/
|
*/
|
||||||
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
|
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
|
||||||
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
|
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
|
||||||
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
|
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
|
||||||
|
@ -149,8 +149,9 @@ 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;
|
||||||
|
@ -167,32 +168,31 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
|
||||||
{
|
{
|
||||||
if (CH438_1_INT_Pin == GPIO_Pin)
|
if (CH438_1_INT_Pin == GPIO_Pin)
|
||||||
{
|
{
|
||||||
// ch438_1_int_flag = 1; // 设置CH438_1的中断标志,用于中断处理函数中判断是否为CH438_1的中断请求
|
// ch438_1_int_flag = 1; // 设置CH438_1çš„ä¸æ–æ ‡å¿—ï¼Œç”¨äºŽä¸æ–处ç<EFBFBD>†å‡½æ•°ä¸åˆ¤æ–是å<EFBFBD>¦ä¸ºCH438_1çš„ä¸æ–请æ±?
|
||||||
ch438_interrupt_handler_ch438_chip_1();
|
ch438_interrupt_handler_ch438_chip_1();
|
||||||
}
|
}
|
||||||
if (CH438_2_INT_Pin == GPIO_Pin)
|
if (CH438_2_INT_Pin == GPIO_Pin)
|
||||||
{
|
{
|
||||||
// ch438_2_int_flag = 1; // 设置CH438_1的中断标志,用于中断处理函数中判断是否为CH438_1的中断请求
|
// ch438_2_int_flag = 1; // 设置CH438_1çš„ä¸æ–æ ‡å¿—ï¼Œç”¨äºŽä¸æ–处ç<EFBFBD>†å‡½æ•°ä¸åˆ¤æ–是å<EFBFBD>¦ä¸ºCH438_1çš„ä¸æ–请æ±?
|
||||||
ch438_interrupt_handler_ch438_chip_2();
|
ch438_interrupt_handler_ch438_chip_2();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* USER CODE END 4 */
|
/* USER CODE END 4 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Period elapsed callback in non blocking mode
|
* @brief Period elapsed callback in non blocking mode
|
||||||
* @note This function is called when TIM4 interrupt took place, inside
|
* @note This function is called when TIM4 interrupt took place, inside
|
||||||
* HAL_TIM_IRQHandler(). It makes a direct call to HAL_IncTick() to increment
|
* HAL_TIM_IRQHandler(). It makes a direct call to HAL_IncTick() to increment
|
||||||
* a global variable "uwTick" used as application time base.
|
* a global variable "uwTick" used as application time base.
|
||||||
* @param htim : TIM handle
|
* @param htim : TIM handle
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
|
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 */
|
||||||
|
@ -201,9 +201,9 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function is executed in case of error occurrence.
|
* @brief This function is executed in case of error occurrence.
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
void Error_Handler(void)
|
void Error_Handler(void)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN Error_Handler_Debug */
|
/* USER CODE BEGIN Error_Handler_Debug */
|
||||||
|
@ -215,14 +215,14 @@ void Error_Handler(void)
|
||||||
/* USER CODE END Error_Handler_Debug */
|
/* USER CODE END Error_Handler_Debug */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_FULL_ASSERT
|
#ifdef USE_FULL_ASSERT
|
||||||
/**
|
/**
|
||||||
* @brief Reports the name of the source file and the source line number
|
* @brief Reports the name of the source file and the source line number
|
||||||
* where the assert_param error has occurred.
|
* where the assert_param error has occurred.
|
||||||
* @param file: pointer to the source file name
|
* @param file: pointer to the source file name
|
||||||
* @param line: assert_param error line source number
|
* @param line: assert_param error line source number
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
void assert_failed(uint8_t *file, uint32_t line)
|
void assert_failed(uint8_t *file, uint32_t line)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN 6 */
|
/* USER CODE BEGIN 6 */
|
||||||
|
|
|
@ -168,22 +168,6 @@
|
||||||
<Bp>
|
<Bp>
|
||||||
<Number>1</Number>
|
<Number>1</Number>
|
||||||
<Type>0</Type>
|
<Type>0</Type>
|
||||||
<LineNumber>36</LineNumber>
|
|
||||||
<EnabledFlag>1</EnabledFlag>
|
|
||||||
<Address>134290996</Address>
|
|
||||||
<ByteObject>0</ByteObject>
|
|
||||||
<HtxType>0</HtxType>
|
|
||||||
<ManyObjects>0</ManyObjects>
|
|
||||||
<SizeOfObject>0</SizeOfObject>
|
|
||||||
<BreakByAccess>0</BreakByAccess>
|
|
||||||
<BreakIfRCount>1</BreakIfRCount>
|
|
||||||
<Filename>..\User\application\src\tcpserverc.c</Filename>
|
|
||||||
<ExecCommand></ExecCommand>
|
|
||||||
<Expression>\\valve_debugging\../User/application/src/tcpserverc.c\36</Expression>
|
|
||||||
</Bp>
|
|
||||||
<Bp>
|
|
||||||
<Number>2</Number>
|
|
||||||
<Type>0</Type>
|
|
||||||
<LineNumber>142</LineNumber>
|
<LineNumber>142</LineNumber>
|
||||||
<EnabledFlag>1</EnabledFlag>
|
<EnabledFlag>1</EnabledFlag>
|
||||||
<Address>0</Address>
|
<Address>0</Address>
|
||||||
|
@ -193,7 +177,7 @@
|
||||||
<SizeOfObject>0</SizeOfObject>
|
<SizeOfObject>0</SizeOfObject>
|
||||||
<BreakByAccess>0</BreakByAccess>
|
<BreakByAccess>0</BreakByAccess>
|
||||||
<BreakIfRCount>0</BreakIfRCount>
|
<BreakIfRCount>0</BreakIfRCount>
|
||||||
<Filename>../Core/Src/freertos.c</Filename>
|
<Filename>startup_stm32f407xx.s</Filename>
|
||||||
<ExecCommand></ExecCommand>
|
<ExecCommand></ExecCommand>
|
||||||
<Expression></Expression>
|
<Expression></Expression>
|
||||||
</Bp>
|
</Bp>
|
||||||
|
|
|
@ -824,8 +824,8 @@
|
||||||
:1033600004900320059002A91B48FEF7FBF94FF4D7
|
:1033600004900320059002A91B48FEF7FBF94FF4D7
|
||||||
:10337000006002900120039004900320059002A9B0
|
:10337000006002900120039004900320059002A9B0
|
||||||
:103380001648FEF7EFF9042002904FF40410039062
|
:103380001648FEF7EFF9042002904FF40410039062
|
||||||
:103390000120049002A91048FEF7E4F9002206215A
|
:103390000120049002A91048FEF7E4F9002204215C
|
||||||
:1033A0000820FEF7B9FB0820FEF7A6FB0022062145
|
:1033A0000820FEF7B9FB0820FEF7A6FB0022042147
|
||||||
:1033B0002820FEF7B1FB2820FEF79EFB07B000BDDA
|
:1033B0002820FEF7B1FB2820FEF79EFB07B000BDDA
|
||||||
:1033C0003038024000100240001402400000024069
|
:1033C0003038024000100240001402400000024069
|
||||||
:1033D0000004024000180240000C024000080240B5
|
:1033D0000004024000180240000C024000080240B5
|
||||||
|
|
|
@ -154,8 +154,8 @@ MxDb.Version=DB.6.0.92
|
||||||
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
||||||
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
||||||
NVIC.ETH_IRQn=true\:6\:0\:true\:false\:true\:true\:false\:true\:true
|
NVIC.ETH_IRQn=true\:6\:0\:true\:false\:true\:true\:false\:true\:true
|
||||||
NVIC.EXTI15_10_IRQn=true\:6\:0\:true\:false\:true\:true\:true\:true\:true
|
NVIC.EXTI15_10_IRQn=true\:4\:0\:true\:false\:true\:false\:true\:true\:true
|
||||||
NVIC.EXTI2_IRQn=true\:6\:0\:true\:false\:true\:true\:true\:true\:true
|
NVIC.EXTI2_IRQn=true\:4\:0\:true\:false\:true\:false\:true\:true\:true
|
||||||
NVIC.ForceEnableDMAVector=true
|
NVIC.ForceEnableDMAVector=true
|
||||||
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
||||||
NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
|
||||||
|
|
Loading…
Reference in New Issue