[sdiy] Freescale Kinetis K2 Arm Cortex M4: 120MHz, FPU & I2S DAC/ADC interface
Robin Whittle
rw at firstpr.com.au
Wed Sep 10 13:59:27 CEST 2014
(Perhaps this has been discussed recently - I haven't had time to catch
up on my mailing list messages, but I will eventually.)
Mouser have a new series of 32 bit ARM microcontrollers of potential
interest for music DSP work, as listed in the "New! 2nd Gen" tab of:
http://au.mouser.com/new/Freescale-Semiconductor/freescale-kinetis-k/
Some are in BGA packages, but many are in 0.5mm pitch quad flat packs
with 48, 64, 80, 100 and 144 pins. I guess these are OK for prototyping
DIY PCBs and for getting mounted by non-exotic surface mount production
houses.
These chips have a combination of characteristics which is probably not
unique, but which I had not seen before:
32 bit ARM Cortex M4 CPU to 120MHz.
I2S interface for audio ADCs and DACs.
DSP unit to pipeline 32 bit integer operations.
Floating Point Unit, for 32 bit FP.
Potentially large amounts of RAM and FLASH program memory:
256kB RAM and 1MB program memory.
USB.
Internal voltage regulator and I guess low enough power consumption
to not need a heatsink.
I think this means there is enough RAM for reverb, and that reverb
algorithms could be done with floating point.
I think the firmware could be programmed largely or entirely in C and/or
C++. I have no experience programming for ARM CPUs, but they supply an
SDK, which I guess uses the GNU C/C++ compiler and GDB debugger.
The chips with 256kB RAM are LQFP-100 or LQFP-144 devices. These have
up to 1MB of program memory.
The smallest package for 128kB RAM is LQFP-64, with up to 512kB of
program memory.
The largest RAM size for LQFP-48 is 32kB, with 256kB of program memory.
However, the fastest of these is 50MHz:
http://au.mouser.com/search/refine.aspx?Ntk=P_MarCom&Ntt=181213179
For instance, a 256kB /1MB device in LQFP-100 is the MK64FN1M0VLQ12:
http://au.mouser.com/ProductDetail/Freescale-Semiconductor/MK24FN1M0VLL12/?qs=sGAEpiMZZMuoKKEcg8mMKMOu4CcPp2Z9bScjzEUHzIE%3d
which is USD$10.86 Q1 and USD$6.65 Q100. The data sheet and full manual
are:
http://cache.freescale.com/files/microcontrollers/doc/data_sheet/K24P144M120SF5.pdf
http://cache.freescale.com/files/microcontrollers/doc/ref_manual/K24P144M120SF5RM.pdf
If RAM and pin needs are more modest, then this 128kB RAM / 1MB LQFP-64
pin device MK22FN1M0VLH12:
http://au.mouser.com/ProductDetail/Freescale-Semiconductor/MK22FN1M0VLH12/?qs=eMDcO4m6hIE20sqK%2fEyw5Q%3d%3d
is marginally less expensive.
There doesn't seem to be much happening on the dsPIC front in recent
years. These are good devices with 16 bit stereo DACs on-chip,
including in 28 pin DIP. However, I think they need to be programmed in
assembler - at least for the audio parts. There's there's not enough
RAM for reverb and with 16 bit integer, the code needs to be carefully
written. I think it would be tricky to do good reverb with these even
if there was plenty of RAM. They run to 40MIPs.
I don't know what the typical instruction cycle time of the Cortex M4
is, but if the MIPS and FLOPS is anything like the 120MHz clock
frequency, they would be able to do a great deal of work per audio
sample cycle.
- Robin
More information about the Synth-diy
mailing list