富士山下_LJH
富士山下_LJH
This guy hasn't written anything yet

注册于 9 months ago

回答
9
文章
0
关注者
0

我添加后出现报错
a value of type "void (*)(void)" cannot be used to initialize an entity of type "const_init_fn_t"

楼主 我的情况是telnet运行时,只打印了一条信息就没了 你也是吗

void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base)
{

if(htim_base->Instance==TIM3)
{
/ USER CODE BEGIN TIM2_MspInit 0 /

/ USER CODE END TIM2_MspInit 0 /

/* Peripheral clock enable */
__HAL_RCC_TIM3_CLK_ENABLE();

/ USER CODE BEGIN TIM2_MspInit 1 /

/ USER CODE END TIM2_MspInit 1 /
}
else if(htim_base->Instance==TIM11)
{
/ USER CODE BEGIN TIM11_MspInit 0 /

/ USER CODE END TIM11_MspInit 0 /

/* Peripheral clock enable */
__HAL_RCC_TIM11_CLK_ENABLE();

/ USER CODE BEGIN TIM11_MspInit 1 /

/ USER CODE END TIM11_MspInit 1 /
}
else if(htim_base->Instance==TIM13)
{
/ USER CODE BEGIN TIM13_MspInit 0 /

/ USER CODE END TIM13_MspInit 0 /

/* Peripheral clock enable */
__HAL_RCC_TIM13_CLK_ENABLE();

/ USER CODE BEGIN TIM13_MspInit 1 /

/ USER CODE END TIM13_MspInit 1 /
}
else if(htim_base->Instance==TIM14)
{
/ USER CODE BEGIN TIM14_MspInit 0 /

/ USER CODE END TIM14_MspInit 0 /

/* Peripheral clock enable */
__HAL_RCC_TIM14_CLK_ENABLE();

/ USER CODE BEGIN TIM14_MspInit 1 /

/ USER CODE END TIM14_MspInit 1 /
}

}

void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim)
{

GPIO_InitTypeDef GPIO_InitStruct = {0};
if(htim->Instance==TIM3)
{
/ USER CODE BEGIN TIM3_MspPostInit 0 /

/ USER CODE END TIM3_MspPostInit 0 /

__HAL_RCC_GPIOC_CLK_ENABLE();
/**TIM3 GPIO Configuration    
PC63     ------> TIM3_CH1 
*/
GPIO_InitStruct.Pin = GPIO_PIN_6;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF2_TIM3;
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);

/ USER CODE BEGIN TIM2_MspPostInit 1 /

/ USER CODE END TIM2_MspPostInit 1 /
}

}
/**

  • @brief TIM_Base MSP De-Initialization
  • This function freeze the hardware resources used in this example
  • @param htim_base: TIM_Base handle pointer
  • @retval None

*/

void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base)
{

if(htim_base->Instance==TIM3)
{
/ USER CODE BEGIN TIM2_MspDeInit 0 /

/ USER CODE END TIM2_MspDeInit 0 /

/* Peripheral clock disable */
__HAL_RCC_TIM3_CLK_DISABLE();

/ USER CODE BEGIN TIM2_MspDeInit 1 /

/ USER CODE END TIM2_MspDeInit 1 /
}
else if(htim_base->Instance==TIM11)
{
/ USER CODE BEGIN TIM11_MspDeInit 0 /

/ USER CODE END TIM11_MspDeInit 0 /

/* Peripheral clock disable */
__HAL_RCC_TIM11_CLK_DISABLE();

/ USER CODE BEGIN TIM11_MspDeInit 1 /

/ USER CODE END TIM11_MspDeInit 1 /
}
else if(htim_base->Instance==TIM13)
{
/ USER CODE BEGIN TIM13_MspDeInit 0 /

/ USER CODE END TIM13_MspDeInit 0 /

/* Peripheral clock disable */
__HAL_RCC_TIM13_CLK_DISABLE();

/ USER CODE BEGIN TIM13_MspDeInit 1 /

/ USER CODE END TIM13_MspDeInit 1 /
}
else if(htim_base->Instance==TIM14)
{
/ USER CODE BEGIN TIM14_MspDeInit 0 /

/ USER CODE END TIM14_MspDeInit 0 /

/* Peripheral clock disable */
__HAL_RCC_TIM14_CLK_DISABLE();

/ USER CODE BEGIN TIM14_MspDeInit 1 /

/ USER CODE END TIM14_MspDeInit 1 /
}

}

您好请问 您移植的时候遇到过程序卡在rt_system_scheduler_start();这里的情况吗

发布
问题