Hi All, PJRC,
I am using FreqMeasureMulti and Snooze together. FreqMeasureMulti reads a speed sensor (bit like an RPM sensor). I need to sleep the Teensy when it's not actively in use.
My issue is that FreqMeasureMulti causes instant wakeups with Snooze, particularly with using Snooze in sleep mode (not deepSleep or Hibernate).
So I needed a way to turn off FreqMeasureMulti. Therefore I added a couple of (static) functions to the FreqMeasureMulti library on my local machine:
This solved the issue for me - an idea to include in the library?
Andrew
I am using FreqMeasureMulti and Snooze together. FreqMeasureMulti reads a speed sensor (bit like an RPM sensor). I need to sleep the Teensy when it's not actively in use.
My issue is that FreqMeasureMulti causes instant wakeups with Snooze, particularly with using Snooze in sleep mode (not deepSleep or Hibernate).
So I needed a way to turn off FreqMeasureMulti. Therefore I added a couple of (static) functions to the FreqMeasureMulti library on my local machine:
Code:
void FreqMeasureMulti::disableAll(void)
{
NVIC_DISABLE_IRQ(IRQ_FTM0);
}
void FreqMeasureMulti::enableAll(void)
{
NVIC_ENABLE_IRQ(IRQ_FTM0);
}
This solved the issue for me - an idea to include in the library?
Andrew