Cheap ARM MCUs for RBCD audio

Thanks for the offer Marcel, appreciated. I'm getting on quite well with Python at present, albeit slowly, so I'll take up your offer if I run into some insurmountable difficulty there. The Python approach offers tremendous flexibility and power but its a fairly steep learning curve for me as I've never used anything similar (like Matlab/Octave) in the past. Very rewarding though to try out stuff and get effectively instant results, that's the beauty of an interpreted language.
 
I just went to the site, it seems to be running fine. There is an option to down load the source code so think you could run it locally. Let me know if you need it.
I can't get to Tfilter designer any longer, it just presents a login page with no option to sign up.

But if you have it up and running in Python on don’t mind not have the GUI that is fine. I’ve done very light GUI tasks using Jupyter Widgets in notebooks https://ipywidgets.readthedocs.io/en/latest/ and full professional applications using TraitsUI https://docs.enthought.com/traitsui/
 
Last edited:
Having the 2XOS code working the next step up for me is higher OS rates. The SAA7220 4XOS chip does a single stage upsample from 44.1 to 176.4k but in general its understood that the lowest computational complexity arises from using multiple stages (i.e. for 4X, cascade two 2X sections). The NPC and Yamaha digital filter chips use multiple 2X stages to achieve 8X, e.g. YM3414 pdf. Running 4X and above necessitates either an MCLK signal on I2S or a PLL when using a serial input DAC to get a sufficiently high frequency BCK, or alternatively use a parallel input DAC - this one looks fairly good : HI5741

Malcolm Hawksford has a relevant paper covering the tradeoffs of #stages versus computational complexity in upsampling filters, attached. Seems he likes to use half-band filters for the savings in multiplies however I'm not a fan as they allow aliasing. They do have the interesting property that all the original samples are preserved so some audiophiles might consider them the nearest thing to 'bitperfect' filters.

Incidentally Tfilter designer seems to be running fine again for me, however I'm now fully converted to using JupyterLab for FIR filter design.
 

Attachments

  • J17OversamplingfilterdesignHawksford1990.pdf
    949.5 KB · Views: 36
This is the evaluation module I'm using https://www.aliexpress.com/item/1005004405232164.html. I don't recommend buying from Aliexpress because that $17 price is unbelievably high. Over on Taobao, it goes for just under $3.

At last, Ali has an HC32F460 evaluation module going for a reasonable price : https://www.aliexpress.com/item/1005003651371848.html. If you need 250MHz, the STM32H503 is also quite affordable : https://www.aliexpress.com/item/1005006858700513.html
 
Since this thread is about cheap, it would be doing it an injustice not to mention the cheapest ARM Cortex M-series MCU known to mankind on it, the PY32F002A (which is actually a disguised PY32F030). The lowest price-break for this chip on LCSC is just under $0.08 for the TSSOP20 package. I've highlighted this chip on my blog and attached a few technical docs there.

On reading some of the blurb it struck me the English sounded a bit too 'native' for a Chinese company and seems much of the PY32F030 DS and reference manual is a direct copy from the STM32G030 which I featured in post#1, over four years ago now. In that time the price of the STM32G030 has indeed dropped as I'd hoped it would, now the Taobao small quantity price looks to be around 1 - 1.5RMB ($0.14 - $0.20) for the TSSOP20. I've not actually ordered any yet so can't confirm if those prices correspond to reality but I'll update when I do make a purchase. This price range is 2-3X what the PY32F002 is going for on Taobao, however it does offer some additional value for its higher price.

First its a 64MHz max clock, vs 48MHZ for the PY. Overclockability is likely fairly straightforward as it has a flexible PLL generating the CPU clock, however the PY only has a fixed 2X PLL. Meaning that you'll need to add a faster external oscillator or perhaps XTAL to run it over spec. I've seen a mention of someone achieving 96MHz for it. The external osc though rather nullifies the PY's excellent power economy which does look better than the STM though both are comfortably under 100uA/MHz. The STM's low-speed economy is mighty impressive - the 1MHz current is a whisker under 100uA showing that the dynamic draw still dominates over the leakage even when run at a snail's pace. PY doesn't specify the current at much lower clock rates than the max.

STM's RAM is twice the PY's (8k vs 4k) and the Flash interface looks to be twice as wide, coming with a small cache. Its ADC runs more than twice as fast as PY's and comes with a hardware averager to make oversampling less demanding on the CPU. The I2S option for one of STM's SPI channels rounds out the list of significant advantages. Overall I feel the STM is worth its price premium for the extra facilities it offers. Both are insanely great value.