Deep Sleep not working using Audio Library

Status
Not open for further replies.

ajay.dusa

Member
I am trying to establish ‘DeepSleep’ in my code, but I am unable to do it. The Teensy Board does go to deepSleep mode(USB and other digital pins get disconnected). But it consumes 35mA which is huge. I know the problem is because of the Teensy Audio Library, I tried without the Audio Library on the same board it consumes <5mA which is what I want. But with the Audio Library I am unable to get. I tried each and every technique also read lot of forums but couldn’t get what I wanted.
The code works as follows, List of songs get played once a day. For Time keeping I am using Teensy internal RTC with external crystal attach to it.
Please if you can find any error in my Code please point it out.


View attachment Teensy_forum_2.ino
 
Hi,

You seem to turn I2S off for the audio (logical when going to sleep) with:
Code:
  SIM_SCGC6 &= ~SIM_SCGC6_I2S;
but never seem to turn it back on when you wake up with:
Code:
SIM_SCGC6 |= SIM_SCGC6_I2S;

cheers
Cor
 
Status
Not open for further replies.
Back
Top