Problems leaving ADC_Conv_CpltCallback function
- March 10, 2017
- 4 replies
- 1278 views
Hallo together,
I am using a STM32Nucleo-Board with the STM32F401RE-Controller in combination with the PLC expansion board.
I have used the Cube MX tool to generate the initialization for the peripherie constisting of one ADC Channel PA0 and
one SPI interface.
Now I want to get the ADC value inside the ADC interrupt function, leave the Callback function when I got the actual value and control the digital outputs of the PLC-expansion board via SPI.
My problem is that my program does not leave the callback function and always reads out the ADC.
I tried to use the function HAL_ADC_Stop_IT(&hadc1) in the Callback function but that did not help to solve the problem.
Can anybody tell me the way to leave the HAL_ADC_ConvCpltCallback function and return back to the code
in the while(1)-function.
You can find my code attached in text-file.
Thank you in advance.
Best regards,
Patrick
