Question
how to use extern "C"
hi everyone want to use interrupt in main.c i am using extern "C" for this purpose but its couldn't compile
/* USER CODE BEGIN 4 */
extern "C" void TIM2_IRQHandler(void) {
// Handle update interrupts (update interrupt flag is set)
if (TIM2->SR & TIM_SR_UIF) {
// Reset the update interrupt flag
TIM2->SR &= ~(TIM_SR_UIF);
// Toggle the LED
HAL_GPIO_TogglePin(GPIOD, GPIO_PIN_14);
Flag_Angle = 1;
}
}
Error: L6200E: Symbol TIM2_IRQHandler multiply defined (by stm32f4xx_it.o and main.o).
also infinite while is executed just one time .
