Can low jitter be achieved with STM32 microcontroller - diyAudio
Go Back   Home > Forums > Source & Line > Digital Line Level
Home Forums Rules Articles diyAudio Store Gallery Wiki Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Digital Line Level DACs, Digital Crossovers, Equalizers, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 30th June 2016, 09:46 AM   #1
JMF11 is offline JMF11  France
diyAudio Member
 
Join Date: Dec 2013
Default Can low jitter be achieved with STM32 microcontroller

Hello,

I consider starting a project tha would basically use receive music from USB, apply DSP and Crossover management and output I2S or SPDIF fo feed 4 x Full Digital Amplifiers channels (here 2x FX-Audio D802 with SPDIF), using a STM32F7 Nucleo board.

The chips have a DSP instruction set. Those boards can address in a quite rich way multiple I2S and SPDIF, in a synchronized way. They can use a dedicated oscillator for the audio part and have dedicated audio PLL. Last, they are cheap. It seems to me a good basis for a low jitter system.

But, I'm a beginner here, I lack a lot of knowledge, and for those topics the devil is in the details...

Objective is to be at least better than what would be achieved on a Raspberry Pi on the I2S output (should not be too difficult), and ideally achieving 95% of the performance of the "reclocking" boards considered here (I know how the last 5% can be hard to achieve in many cases).

Any comment, warning and advice is warmly welcomed.

JMF
  Reply With Quote
Old 30th June 2016, 07:34 PM   #2
diyAudio Member
 
Join Date: May 2016
I dunno, but I have to say, that ST's site has absolutely dismal information architecture. I found the product pages for two Nucleo boards with chips in the STM32F7 family, but there is no clear path to the datasheets for the relevant MCUs.

Saving others the trouble it took:

Nucleo-f767zi board
stm32f767zi MCU

Nucleo-f746zg board
stm32f746zg MCU
  Reply With Quote
Old 30th June 2016, 09:40 PM   #3
JMF11 is offline JMF11  France
diyAudio Member
 
Join Date: Dec 2013
I agree with you. Not easy to find the information, the applications, the reference data...

However, the platform looks to me promising. And (I do some advertising), if I didn't needed more power, I think that the extension board that plugs on top, with the 2x40W amplifier based on the STA350BW, with all the software provided by ST, would beed a try: full digita chain from the USB to tha amp. One single clock to manage DSP, I2S to amps, Amps.

http://www.st.com/content/st_com/en/...o-cca01m1.html

JMF
  Reply With Quote
Old 1st July 2016, 01:41 AM   #4
diyAudio Member
 
abraxalito's Avatar
 
Join Date: Sep 2007
Location: Hangzhou - Marco Polo's 'most beautiful city'. 700yrs is a long time though...
Blog Entries: 142
Send a message via MSN to abraxalito Send a message via Yahoo to abraxalito Send a message via Skype™ to abraxalito
As you say you're a complete beginner, why not start off with MiniDSP? For someone with no knowledge/experience of embedded systems development, its a very steep hill to climb. You might look at AudioWeaver for the software, that could be helpful.
__________________
The heart ... first dictates the conclusion, then commands the head to provide the reasoning that will defend it. Anthony de Mello
  Reply With Quote
Old 1st July 2016, 07:53 AM   #5
JMF11 is offline JMF11  France
diyAudio Member
 
Join Date: Dec 2013
Hi,

I recognize that it is not the easiest path. And I discover that STM32 is not the easiest platform. However I must say that this platform draws my curiosity, and seems to provide many elements I was looking for to fit my (not so) specific needs: USB in (ideally Asynch) / DSP processing for crossover and EQ / several digital out for active multiamp system.

miniDSP is not so rich when you look for USB in and several digital outs (without using several products like USBstreamer). Their main products don't seem to support that, it is not open, and much more expensive.

BBB is an option, as it is the only other SBC with multiple output digital lines, but has limited CPU power and is more complex as of software set-up.

I have the feeling that simple STM32 program templates (2 ways, 3 ways) , to fill with your specific filtering in an easy way, would be very versatile and efficient, with a lot of potential for further improvement for development of testing tools.

Last it is an Hobby and an opportunity to learn about new things. This in fact brings me many years back with myself discovering computers and microprocessors like the 6502, Z80, 68000... So I mainly have to dig in old and forgotten knowledge and update all this.

This said, I would be happy to invest in something with real potential. If some "went there, found that..." shows that there are basic flaws that will reduce the performance, I would prefer spend my energy elsewhere (knowing the why).

I must say that I'm surprised not to see more projects using this product. Maybe it is that the main benefits are only when you look for a full digital chain, digital filtering and multi amplification which is not so common but seems to draw more and more interest.

JMF
  Reply With Quote
Old 1st July 2016, 10:27 AM   #6
diyAudio Member
 
Join Date: Nov 2006
Location: Adelaide, South Australia
Blog Entries: 39
Your idea is doable. But perhaps not super simple.

I implemented a two channel, two way, crossover in a pic32 device by:
- setting up a timer at an integer multiple of the system master clock, and also close to
- this drove read and write cycles on the ADC and DAC. These were inside an ISR, with the ISR being called on the timer hitting zero.
- getting the master clock and divisor at integer multiples is important to avoid odd phase jitter on the i2s signals
- this did fourth order XO, parametric a, time delay etc.
- All the DSP calls also occur inside the ISR, this
- ensures the DSP is all done inside the cycle
- makes you get the timing right! Too much code and it falls over!
- all user interface and housekeeping occurs outside the ISR so it is essentially run in whatever time is left over.

This works fine when driving both the ADC and DAC.

If you wanted to read in data from SPDIF, I reckon you would want to I
Plent some form of ASRC. I have not thought this through, I wonder if a simple linear ASRC would've good enough
- if you could use a counter (repurpose a timer on pic) to count clocks of the DPDIF frame after the DSP idea of frame timing, then you could do s pretty simple ASRC

There is an example and the C code somewhere in my blog. But for PIC...

Last edited by googlyone; 1st July 2016 at 10:29 AM.
  Reply With Quote
Old 1st July 2016, 12:16 PM   #7
JMF11 is offline JMF11  France
diyAudio Member
 
Join Date: Dec 2013
Thank you for your inputs googlyone,

This is encouraging. I will look at your blog posts.

JMF
  Reply With Quote
Old 2nd July 2016, 09:56 AM   #8
diyAudio Member
 
Join Date: Jun 2010
Considering the availability of proven XMOS hardware and community version developer tools, it might have intercepted the viability of pursuing any Cortex-M7 or generic micro based path.
  Reply With Quote
Old 2nd July 2016, 10:31 AM   #9
diyAudio Member
 
Join Date: Nov 2006
Location: Adelaide, South Australia
Blog Entries: 39
I kind of expect you are correct. The only reason I did a PIC32 version was as an intellectual exercise, and a challenge to myself to learn to code all the filters etc.

Generic micro's don't make great DSPs. In fact the PIC32 implementation only really worked when I made the compiler use the PIC32 DSP instructions.

That said, for the $5odd that a PIC32 costs, I think it is brilliant. As a challenge. (I guess I am showing my age - when I started electronics as a hobby there wasn't even a concept of "DSP" or "microcontroller")
  Reply With Quote
Old 2nd July 2016, 06:13 PM   #10
JMF11 is offline JMF11  France
diyAudio Member
 
Join Date: Dec 2013
Quote:
Originally Posted by mt490 View Post
Considering the availability of proven XMOS hardware and community version developer tools, it might have intercepted the viability of pursuing any Cortex-M7 or generic micro based path.
Hi,

This is exactly one one the reasons why I posted this question: is the candidate OK ? Aren't there much better candidates?

I know the miniDSP range. I have identified several XMOS USB to I2S boards, but with no means to configure them.

What would be the alternative XMOS platform with community tools?

Best regards,

JM
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ES9023 Low Jitter Clock davecandialex Digital Source 5 21st October 2015 09:29 PM
Low jitter LVCMOS oscillator audiomusica Parts 16 2nd June 2015 05:18 PM
Low Jitter Clock Kits amc184 Swap Meet 3 26th June 2014 07:53 PM
Low jitter oscillators various frequencies jean-paul Swap Meet 2 28th April 2012 08:41 AM
Low jitter crystal bocka Parts 2 24th July 2003 10:53 AM


New To Site? Need Help?

All times are GMT. The time now is 08:27 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Copyright 1999-2016 diyAudio

Content Relevant URLs by vBSEO 3.3.2
Wiki