Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 2 FirstFirst 1 2
Results 26 to 31 of 31

Thread: audio library wakes up teensy from hibernate

  1. #26
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,457
    Both would have to be set after I2S was started but before going to sleep.
    For the transmitter : I2S0_TCSR |= I2S_TCSR_STOPE which keeps it running even in STOP mode
    For the receiver : I2S0_RCSR |= I2S_RCSR_STOPE which keeps it running even in STOP mode

    Another method to give a try would be forcing the I2S enable after waking up, which should also relaunch the clock generation.
    For the transmitter : I2S0_TCSR |= I2S_TCSR_TE
    For the receiver : I2S0_RCSR |= I2S_RCSR_RE

    More info in Chapter 48, page 1297 of the MK20DX256 reference manual.

  2. #27
    Member
    Join Date
    Jun 2018
    Location
    Germany
    Posts
    22
    Quote Originally Posted by Theremingenieur View Post
    Both would have to be set after I2S was started but before going to sleep.
    For the transmitter : I2S0_TCSR |= I2S_TCSR_STOPE which keeps it running even in STOP mode
    For the receiver : I2S0_RCSR |= I2S_RCSR_STOPE which keeps it running even in STOP mode

    Another method to give a try would be forcing the I2S enable after waking up, which should also relaunch the clock generation.
    For the transmitter : I2S0_TCSR |= I2S_TCSR_TE
    For the receiver : I2S0_RCSR |= I2S_RCSR_RE

    More info in Chapter 48, page 1297 of the MK20DX256 reference manual.
    Is this meant to be used in addition to turning off the I2S clock gate or instead?

  3. #28
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,457
    In addition. Just try it out.

    Versuch macht kluch, as the Germans say...

    The SIM handles the clock and the activation of the I2S module. My additional "tweaks" affect a different thing, the clock generated by the I2S module afterwards. IMHO it is not an optimal idea to deactivate the I2S fully via the SIM, especially that the I2S module has support for low power and stop modes.

    Study the reference manual for better understanding.
    Last edited by Theremingenieur; 08-21-2018 at 04:16 PM.

  4. #29
    Senior Member duff's Avatar
    Join Date
    Jan 2013
    Location
    Las Vegas
    Posts
    961
    Quote Originally Posted by j_neu View Post
    BTW: I'm not using the Audio board.
    Oh I guess I didn't read your post carefully!

  5. #30
    Member
    Join Date
    Jun 2018
    Location
    Germany
    Posts
    22
    I tried both your suggestions, with and without shutting down the I2S clock via SIM and also some other configurations that I thought were clever Neither worked as expected.
    Not of the configurations resulted in empty files, others produced the beeping sound again

    Versuch macht kluch, as the Germans say...
    Didn't work out for now

  6. #31
    Senior Member duff's Avatar
    Join Date
    Jan 2013
    Location
    Las Vegas
    Posts
    961
    Quote Originally Posted by Theremingenieur View Post
    Both would have to be set after I2S was started but before going to sleep.
    Quote Originally Posted by Theremingenieur View Post
    For the transmitter : I2S0_TCSR |= I2S_TCSR_STOPE which keeps it running even in STOP mode
    For the receiver : I2S0_RCSR |= I2S_RCSR_STOPE which keeps it running even in STOP mode
    The K66/K20 manuals says: Configures receiver operation in Stop mode. This bit is ignored and the receiver is disabled in all low- leakage stop modes


    and also from the manuals:
    61.1.3.2 Low-leakage modes
    When entering low-leakage modes, the Stop Enable (TCSR[STOPE] and RCSR[STOPE]) bits are ignored and the SAI is disabled after completing the current transmit and receive Frames. Entry into stop mode is prevented (not acknowledged) while waiting for the transmitter and receiver to be disabled at the end of the current frame.

    'deepSleep' and 'hibernate' are low-leakage modes so that clock cannot remain active. You might have to monitor the I2S Transmitter and Receiver for them to be officially disabled before going into low power mode i.e. 'deepSleep', 'hibernate'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •