The PWM generator does not look accurate
I was trying to control some servos and at first when i set 1.5 ms the motor was not going to the middle (blame the motor)
recently i got my hands on an oscilloscope and i looked at the signal
us set vs us measured
500 = 598
1000 = 1110
1500 = 1706
2000 = 2220
going to the period i set it to
20ms but i'm measuring 21.8 ms (stays fixed for any pulse width)
now looking at your measurements looks like it gives the same values, so maybe we can add some software calibration in our code.
even more data
at 1880 i get 2050us
for 1890 to 1960 i get 2134us
at 1970 to 2030 i get 2218us
at 2040 i get 2306us
we can conclude that you need to work in ~70us increments/decrements
Is the PWM being done by the Linux kernel? Is the ~70us discretization mentioned above a reflection of the scheduling capability of the default kernel? Could this be improved by using the PREEMPT_RT kernel setup from PREEMPT_RT-enabled Linux Kernel 3.10.17 on Intel Edison?
Might this get better when the Quark is enabled in a future Edison BSP release?
There doesn't seem to be a lot new on this. I have more or less given up on the Edison for low level signaling; the CPU is too slow with hardware; the MCU is better but the serial link between the MCU and the main CPU is too slow to be useful. In time, these two (MCU/CPU) will be a potent combination but until the software/hardware matures, I am using the Edison as a fast embedded CPU with wifi.