This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

working on Battery Management System

Hi everyone,

I am working on STM32CubeMX with KEIL compiler. I have performed ADC operation for 12 bit conversion using voltage divider circuit.

Using following code:

HAL_ADC_Start(&hadc1);
HAL_ADC_PollForConversion(&hadc1, 300);

raw = HAL_ADC_GetValue(&hadc1);

vin = raw * (3.3/4096);
v_act = vin * ((100000+4700)/4700);

I need to transfer the voltage converted to the buffer in synchronous mode.

And also the code should check all the pins of ADC where the data is received.

Suggest the code.

Thanks