AnsweredAssumed Answered

Problems leaving ADC_Conv_CpltCallback function

Question asked by Seeboerger.Patrick on Mar 10, 2017
Latest reply on Mar 13, 2017 by Seeboerger.Patrick

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,