Hello,
I try to measure the speed of a brushed dc motor using an incremental encoder. I use eCAP module and I have implemented both time difference example and absolute time with Simulink. When I connect the eCAP pin [GPIO5] with GPIOO [PWM1] then I am able to measure the period of the signal. Unfortunately, when I use the signal from the encoder the system get stuck and Simulink loses control. The signal from the encoder as I capture it with the oscilloscope is the following:
I am wondering why the signal is starting from 1V and not from zero? Is that a problem? When Simulink loses control the DSP keeps working and I am able to change the motor speed but there are times where the speed it isn' t stable. The higher the frequency the speed gets more stable.
The pull-up resistor is enabled.