Solved
__HAL_TIM_SET_PRESCALER error
Posted on June 07, 2017 at 22:50
Hi,
I tried this code :
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{/* USER CODE BEGIN Callback 1 */ if (htim->Instance == TIM2) { HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_5); __HAL_TIM_SET_PRESCALER(&htim2, 30000); }/* USER CODE END Callback 1 */}but gave me :
../Src/main.c(286): error: &sharp20: identifier '__PRESC__' is undefined
../Src/main.c(286): error: &sharp20: identifier '__HANDLE__' is undefined
But if I tried :
__HAL_TIM_SET_COUNTER or others macro, there was no error...
Any clue on how to resolve this ...
Thank you
#__hal_tim_set_prescaler