2023-08-15 02:39 AM - last edited on 2023-08-16 12:06 AM by Amelie ACKERMANN
Hi,
I have writen simple callback function for handle end of ADC convertion in main.c file.
In main.h is declared
extern void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc);
main.c
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc)
{
adc_Complete = 1;
}
After command Build All in Project menu is result:
../Core/Src/main.c:203:6: warning: 'HAL_ADC_ConvCpltCallback' defined but not used [-Wunused-function]
My callback function is not used for interrupt handling of course.
In the past I dindn't find any problem with callback in Keil system.
What I do need set in STM32CubeIDE to solve this problem?
Thank you for help.
Solved! Go to Solution.
2023-08-15 06:04 AM
Thank you for your reply.
I did write new souce file in project. I have put there callback function and removed this function from main.c and main.h. And now it is work correctly. I don't know why.
2023-08-15 03:38 AM
Search your project for uses of HAL_ADC_ConvCpltCallback, are there any? There should be several in stm32f4xx_hal_adc.c.
Do you have HAL_ADC_MODULE_ENABLED defined?
2023-08-15 06:04 AM
Thank you for your reply.
I did write new souce file in project. I have put there callback function and removed this function from main.c and main.h. And now it is work correctly. I don't know why.