pingumacpenguin / STM32-O-Scope

STM32F103 based minimalist oscilloscope.
GNU General Public License v2.0
185 stars 70 forks source link

bad serial output of samples? #9

Open jadamcak opened 5 years ago

jadamcak commented 5 years ago

Hi, I am testing serial output on chinese 2$ blue pill (i dont have a display yet) and i think measurements are bad sorted... It looks like ADC2 is 2 measurement delayed/shifted... I think after measurement at 257.83(ADC1) has to be measurement at 259.58(ADC2), than 259.00(ADC1), than 260.75(ADC2), ... I am using timer_set_period(Timer3, 500);

#Toggle Serial
#Time(uS), ADC Number, value, diff
0.58 2 4049 -3 4050
1.17 1 4051 2 4050
1.75 2 4053 2 4052
2.33 1 4051 -2 4052
...
257.83 1 4052 1 4052
258.42 2 4051 -1 4051
259.00 1 4051 0 4051
from here ->
259.58 2 4052 1 4052
260.17 1 63 -3989 2057
260.75 2 4051 3988 2057
261.33 1 29 -4022 2040
261.92 2 62 33 46
262.50 1 30 -32 46
263.08 2 29 -1 29
<- to here
263.67 1 27 -2 28
264.25 2 30 3 29
264.83 1 30 0 30