Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: What Timer is used to derive the 44.1khz clock the audio library runs at?

  1. #1
    Senior Member
    Join Date
    May 2019
    Location
    Brisbane, QLD
    Posts
    104

    What Timer is used to derive the 44.1khz clock the audio library runs at?

    Curious to know how the audio rate clock is derived. Is it a flextimer?

  2. #2
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,722
    depends on device (ADC, I2S) and Teensy (3.x, 4.x)
    as you can see in check the audio library

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,497
    It depends on the first input or output you instantiate in your code.

    On Teensy 3, most use either the PDB timer or the I2S, which gets MCLK from a mult/div circuit from the system clock.

    On Teensy 4, usually I2S is used, but it gets MCLK from a dedicated PLL with very fine grained control over the frequency, rather than the relatively coarse combinations of mults & divs on Teensy 3.

    But if using the slave mode inputs or output (on ether Teensy 3 or 4), the external clock controls the audio sample rate.

  4. #4
    Senior Member
    Join Date
    May 2019
    Location
    Brisbane, QLD
    Posts
    104
    Quote Originally Posted by PaulStoffregen View Post
    It depends on the first input or output you instantiate in your code.

    On Teensy 3, most use either the PDB timer or the I2S, which gets MCLK from a mult/div circuit from the system clock.

    On Teensy 4, usually I2S is used, but it gets MCLK from a dedicated PLL with very fine grained control over the frequency, rather than the relatively coarse combinations of mults & divs on Teensy 3.

    But if using the slave mode inputs or output (on ether Teensy 3 or 4), the external clock controls the audio sample rate.
    Thanks, Paul. I assume using inbuilt DAC/ADC means it's deriving the clock from the programmable delay block. I'll read up on that in the reference manual.

Posting Permissions

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