2018-05-17 05:02 AM
hello everyone,
i've been trying to find the right configuration for my stm in order to acquire data from a ct sensor (ECS 1030) but i can't find the right configuration i've done some tests, i got a sampled signal that only shows four or five points in one period ... i want the signal to be more precise like take more samples
i changed the poll conversion's number of samples but nothing changed
i needed to clear the flag to put the function in a for(); cycle but i couldn't find the right instruction
for(inc=0;inc<200;inc++)
{ HAL_ADC_Start(&hadc1); HAL_ADC_PollForConversion(&hadc1,10); v= HAL_ADC_GetValue(&hadc1); v=v*3.3/4095; v=v-(3.3/2); power=230*v; sprintf(msg,'230;%.3f;%d;%d:%d:%d\n\r',v,power,timeh,timem,times); f_write(&MyFile,msg, sprintf(msg,'230;%.3f;%d;%d:%d:%d\n\r',v,power,timeh,timem,times), (void *)&byteswritten); HAL_ADC_Stop(&hadc1); }pleas answer asap and thanks
#stm32f746-discovery #hal-adc