AnsweredAssumed Answered

eMIOS overflow callback and frequency range

Question asked by Aurelien.Leclercq on Oct 19, 2015
Latest reply on Nov 19, 2015 by Aurelien.Leclercq
Hello,
when I was working on SPC56EL with older SPC5 Studio versions, the overflow callback was called only when the internal counter was overflowing. This was perfect to detect too low frequency which can't be measured.
On SPC564B and SPC5 Studio V3.7, the driver is reworked compared to older versions and the overlow callback is now called all the time, when edges are detected on the input.
Can you please confirm this bug or new behaviour...

Second problem is the frequency range: I have to measure frequencies between 4Hz and 5kHz on different channels with 1Hz resolution. Since the eMIOS clock is the same for all channel, how could I achieve that?
I actually use a clock of 120MHz/2/256=234375 Hz. It allows period measurement down to 3.5Hz with high precision. But at 5kHz, the counter reaches 234375 / 5000 = 46 and this corresponds to 234375 / 46 = 5095 Hz which is far away from 5000Hz.

To be able to reach 1Hz resolution on other micros, I usually have two methods. The edge detection for low frequencies only. For high frequencies, I'm using a timer that counts all edges during a fix period of time determined by another timer.

Outcomes