Hi I want to draw graphs of position of 2-phased QEI versus time. so I want to capture QEI position every time period. time gap between to position pulses is at least 7.2 microseconds. I think I have to choose one of these methods:
1-send position to USB during time overflow interrupt(TIM_INT)
2-send content of the timer when the situation changes. (I don't know if it is possible to sense the changes as an interrupt?)
I think there are some restrictions due to interrupt latancy. so what is the highest resolution for my system. and which method is better? How can I define interrupt for 2nd method? can i send data to buffer and send batch buffer to USB? Is it help me Reduce interrupt latancy effects? HOW? Please Help me Best Regards
OK the datasheet says:
GPDMA supports the SSP, I2S, UART, A/D Converter, and D/A Converter peripherals. DMA can also be triggered by a timer match condition. Memory-to-memory transfers and transfers to or from GPIO are also supported.
and it appears that DMA doesn't support QEI. so I must define a normal vector as a buffer, am I right? and due to the low rate of data changes(least than 1 MHz) the ISR should "pick up a single value and put in a buffer."
I am a beginner in ARM and embedded systems, and need to learn too much about architecture. ;-)
thanks Amir
Yes - you need to take care of the results one-by-one in an ISR. And invent a buffer to store the result in.