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;