cancel
Showing results for 
Search instead for 
Did you mean: 

Using audio clock (22.5792MHz or 24.576MHz) as STM system clock

John Kenny
Associate II
Posted on April 26, 2018 at 16:37

I've seen STM audio boards (SD card player) with only two audio clocks (5792MHz & 576MHz) on the pcb. Depending on the speed family of the audio file being read, the STM uC is using the relevant audio clock as its system clock. Does anyone have a link to the code which does this, please?

Note: this post was migrated and contained many threaded conversations, some content may be missing.
11 REPLIES 11
Posted on April 27, 2018 at 01:40

If the F04 is powerful enough (& it is for this simple job) then I don't see the need for a different uC

You probably mean 'F40x - 'F04x is from an entirely different line (and that would certainly pose a challenge, but probably wouldn't be impossible to use). 

The audio playback is not something processing intensive; and while as I said I haven't use SD cards yet, I wouldn't anticipate those be processing intensive either. Unless the audio needs substantial processing (DSP or (de)compression), it's mostly just moving data from one pile to other, and leave the hardware (DMA) do the rest. OTOH some of the 'F0xx lack enough I2S-related resources, and also the dedicated SD-card interface.

The presented board is based on 'F407 but that was probably not a very thoroughly though out choice, or those chips were at hand already for some reason. One of the telling signs is that the somewhat cheaper 'F405 is identical except it does not have the ETH interface (which is not used on this board).

This board may also predate the 'F446 I am talking about. I tend to optimize my designs.

I know a SYNCH clock ISN'T needed but that is a design choice that works for me, for various reasons.

Could you please elaborate? The last 7 years I am moving audio and similar data to and from the STM32s and I haven't found a single reason for synchronizing the data stream with the system clock, yet. I don't pretend I know every possible usage case, of course; and I am curious.

Thanks,

JW

Posted on April 27, 2018 at 01:52

Yes, typo, sorry, I meant F40

Thanks for the info on F446, I'll take a look

Agreed audio isn't process intensive

In my past limited experience of SD card players using STM & other uCs that have used a separate system clock, none of them sound as good as this SD player & I'm working on the premise that the simplicity of design (mainly the use of audio clock as system clock which avoids clock mixing in the uC) is the primary ingredient for the quality of this sound