I got in this news, a code that uses the IRQ8, and the times doesn’t
keep accuracy… all test under 1 millisecond. eg. 2Khz I’ll have plus
49microseconds, and so on… any tips?
I little bit question: Shoul I forget the use of QNX6 for accuracy below
1 millisecond?
Pulse keeps the accuracy beyond 1 millisecond (in 6.2 Beta says 10
microsecs).
I got in this news, a code that uses the IRQ8, and the times doesn’t
keep accuracy… all test under 1 millisecond. eg. 2Khz I’ll have plus
49microseconds, and so on… any tips?
Ok, here is my code snippet:
//period rate selector (status A reg) #define Hz2 15 //period = 500 mS #define Hz4 14 // 250 mS #define Hz8 13 // 125 mS #define Hz16 12 // 62.5 mS #define Hz32 11 // 31.25 mS #define Hz64 10 // 15.625 mS #define Hz128 9 // 7.8125 mS #define Hz256 8 // 3.90625 mS #define Hz512 7 // 1.953125 mS #define Hz1024 6 // 976.5625 uS #define Hz2048 5 // 488.281 uS #define Hz4096 4 // 244.141 us #define Hz8192 3 // 122.070 us
Is your problem you have 2.048 kHz instead of 2 kHz expected? Perhaps no, because you have
additional to expected time How did you time measurements ? I guess hardware (RTC) works fine,
but there is problem with measurements. Did you ClockCycles() in ISR or in event handler?
I little bit question: Shoul I forget the use of QNX6 for accuracy below
1 millisecond?