AnsweredAssumed Answered

GP counter gives occasional spurious readings

Question asked by Beade on May 27, 2015
Latest reply on Jun 21, 2015 by Prashant

Using one of the GP counters as a direction counter to monitor the position of a stepper motor, I am getting occasional spurious readings.  The following reading is fine, indicating that it is not a problem with the counter, but it is possible that the counter increments or decrements at the same time as I am reading it.  Any suggestuins as to how I could avoid this please ?


Read code is:


Motor1.Position = pADI_CNT0->CNTR;


Thank you