Академический Документы
Профессиональный Документы
Культура Документы
Volume 1, Issue 2
In this Issue:
ggBringing 32-bit Performance to 8- and 16-bit Applications
ggDeveloping High-Quality Audio for Consumer Electronics Applications
ggBringing Floating-Point Performance and Precision to Embedded Applications
gg
gg
!
"
#
$
%
ggIntroducing a Graphical User Interface to Your Embedded Application
STM32 Journal
&
$
!
'
Peak limiting:
)&!
%
"
&!'
enhancement is required is &!
'
&
)
(
implement enhanced algorithms, to compensate for the close louder with a minimum amount
Achieving high-quality sound convert between multiple &%
&!(
(
output, however, is non- !
'
Multi-channel audio: For Boost: When listening to music
(
)"
+"
&
speed communications without
systems supporting more than at low volume levels, much
greatly upon the final system impacting audio quality, optimize
&!'
&"
detail, and therefore depth, can
"
'
!
"
designs to balance quality and
signal requires processing to
(
*
"
+"
(
&
"
$ Traditionally, introducing audio in use change, the equalization
(
"
to an embedded application
J"
(
Level matching: Level matching
implementing advanced filters requires digital signal-processing Developers can employ a eliminates the need for users to
and processing algorithms, capabilities beyond the capabilities variety of equalization methods, J"
"
11
STM32 Journal
"M
"
"( ART Accelerator™ Up to 1-Mbyte Flash memory
Digital audio has commonly System Up to 192-Kbyte SRAM
Power supply
been implemented in consumer 1.2 V regulator STM32 F4 FSMC/SRAM/NOR/NAND/CF/LCD
POR/PDR/PVD parallel interface
electronics and embedded Xtal oscillators
applications using a second 32 kHz + 4 ~26 MHz ARM Cortex-M4 80-byte + 4-Kbyte backup SRAM
Internal RC oscillators 168 MHz
&
!(
32 kHz + 16 MHz 512 OTP bytes
PLL
!
&"'
Connectivity
Clock control
however, manufacturers need to RTC/AWU
Floating-point unit (FPU) Camera interface
Nested vector 3x SPI, 2x I2S, 3x I2C
be able to process audio on the SysTick timer interrupt Ethernet MAC 10/100
$( 2x watchdogs controller (NVIC) with IEEE 1588
(independent and window) MPU 2x CAN 2.0B
51/82/114/140 I/Os
In general, it is easier to Cyclic redundancy
JTAG/SW debug/ETM 1x USB 2.0 OTG FS/HS
1x USB 2.0 OTG FS
&
"
$
check (CRC)
SDIO
than it is to implement real-time Multi-AHB bus matrix
6x USART
responsiveness and connectivity 16-channel DMA LIN, smartcard, lrDA,
modem control
)(
)'
%
Control
Crypto/hash processor
at processing audio, don’t have 2x 16-bit motor control Analog
PWM 3DES, AES 256
Synchronized AC timer 2-channel 2x 12-bit DAC
the peripherals or interrupt SHA-1, MD5, HMAC
10x 16-bit timers 3x 12-bit ADC
responsiveness required for real- 2x 32-bit timers 24 channels / 2.4 MSPS
True random number generator (RNG) Temperature sensor
(
)
"
)
%&
)R?
$
$
%
"
&&
$
&
/
&'
'
&&
(
%
+"
&
"
&&
(
.
to support communication
but the advanced algorithms well as ultra low-power operation )R?
KZ'
#
!
)*'
)
'
NK'
)
!
(
.
'
"&
>[@
\/'
)
'
$
O
)R?
"
unit to allow manufacturers
With the introduction of DSP ease-of-use and faster time-to- ST has been designed to to produce consumer audio
&
$
"
!
"
$
&
R?
$
&
&&
O
+"
'
$
&&
(
to a wide range of consumer &!
12
STM32 Journal
Max
General Purpose MCUs Min
Discrete DSPs
Cortex-M4
0 5 10 15 20 25 30
Figure 2
N
$
%Z
'
)R?
KZ
O
%
"
&
&
%
&
&"&
$
)(
)R?
KZ
O
%
Digital Signal Processing
audio processing capabilities Instructions:
N
)R?
0
K "
?4(
N
KZ'
&
)R?
KZ
&
"
(
"
O
'
&
"
include single-cycle multiply-
implementing embedded audio ""
0$4'
+"
"
&!(
`
designed to enable high-quality
&
)R?
KZ
audio in consumer electronics
for accelerating audio design, and embedded applications in a
enhancing performance, and
O
13
STM32 Journal
Floating-Point Unit:
)R?
DMA_MEM1
DMA_P1
DMA_MEM2
DMA_P2
algorithms can be implemented 100 Mbit/s 480 Mbit/s
System
Instructions
Data
12.5 MByte/s 60 MByte/s
"
=%&
'
&&
&%
64 Kbytes SRAM
FSMC
'
=%&
&
O
AHB2 peripheral
5
&
'
&
AHB1/APB1
AHB1 peripheral
"
"
(
N
AHB1/APB2
the integrated FPU, there is no SRAM 16 Kbytes
&
&(
Accelerator
672 MByte/s D D
also be substantially faster and
ART
Flash
+"
=% 672 MByte/s I I 1 Mbyte
&
(
The bus Figure 3
"
%
)R?
$
&&
"
"
"
&
"
+"
$(
&
)R?
$
"
(
"
!
"
&!
&
3 shows the high level of
samples are streaming at 16
processing is maintaining
(
parallelism that can be achieved
bits, the system still needs
5(
.
through simultaneous transfers
32-bits to store intermediate
)R?
"
)'
%&'
+"
problem so that developers gg
%"
&
0Z
"
&
move not only signal data but
do not need to spend time from Flash with data stored in
R
4
J"
&
manage program memory,
&
5
(
)#
04
R?
%
R?
"
&
(
communication ports, and other
This is achieved through the low
!(
&%
gg The compressed audio stream
)R?
KZ
%"
interrupt service overhead of
and real-time nature of audio is received over USB and
R?
$
0"
&
)R?
decompression and signal limitation, developers can utilize Complete audio system
processing (green) &
0)#$4(
STM32 F2 STM32 F4 Flash RAM
)#$
""
gg
&
R
CPU load CPU load footprint footprint
"
&
0(('
!
$
)#
MP3 decoder 17% 6% 23k 12344
domains) while maintaining audio
(yellow)
=
'
&
MP3 encoder 22.5% 9% 25k 16060
gg Audio data is output to I2S
!
&'
"
0 4
%
"
O
WMA decoder 17.5% 6% 45k 36076
gg Graphical icons are transferred "(
K
&&
)#$'
)R?
KZ
AAC+ v2 decoder 25% 11% 54k 87000
from Flash to the display
"
0"4 requires only 10% utilization,
Channel mixer 2.5% 2% 0.6k 16
leaving plenty of headroom for
Communications Interfaces:
&
!( Parametric Equalizer 16% 12% 2k 300
Users want to be able to access
"
O
"
Multiple Clock Sources:
Loudness Control 4.5% 3.5% 3.25k 632
O
(
Consumer audio systems require
N
%
"
O
!
SRC 22.5% 10% 17.5k 1880
including USB (host and device), "
$'
.
#'
)*'
.?)
=%
Figure 4
N
&"
>[
R?
)
"
'
)R?
KZ
O
?kj
).'
%
frequencies and need to be &
(
"
'
&
&
&
5%
"
J
(
&
"
"
&
"
+"
(
"
( for each of these can impact
&(
K
%&'
In addition to being able to receive data
In addition to being able to straightforward to achieve a clean
receive data without loading !
>[@
\/
$'
without loading the CPU, developers need
the CPU, developers need to ZZ(>
`\/
.?)
!
&!
!
!
(
%&'
)*
!
5%
(
"
&
"
5
!
K
%&'
)*
!
"
"O
"
&
(
and the second PLL is available &
"
5
"
&!
&
"
+"
"(
"
&
(
15
STM32 Journal
$).)
)
&
(
$).)
"&&
#
"
!
!
"&
&
'
"
N(
"
N
)
$&
O
.
&
&
5
&&
&
Audio Weaver enables
!
"
&
( &
+"!
!
the I2S interfaces reduces %&'
!
R
(
N
that goes on between receiving
)R?
"
component count, board size,
)R?
KZ'
&
an audio signal and outputting
to maintain a permanent USB
(
&
(
(
"
N
O
connection and avoid audio When computing 16- and 32- GUI-based development
MCU Peripherals:
)R?
/
"(
)
"
'
)R?
environment that enables
architecture includes all of the
KZ
O
?kj
0
K "
developers to design the signal
Integrated Audio Interfaces: real-time peripherals required for
Z4
&
(
"
'
5
&&
)R?
KZ
"
$
systems can drop into sleep
&
!
"&%
.?)
&&
(
)R?
or run more algorithms to further a drag-and-drop editor (see
j(k
&
+"
(
KZ
&
&
"
+"
(
%
!
K "
k4(
!
level of performance to audio
input to the I2S peripheral if In addition to the integrated DSP optimized code behind it, and
&&
(
%
+"
"
&
)R?
KZ'
the tool automatically creates
a long 32-bit multiply or
&(
.
developers have access to the
+"
"
"(
16
STM32 Journal
*"
&%
"
complete reference designs are value-add of Audio Weaver is .)
+"
built from base audio functions, available, with assistance from
!
(
"
&
(
=
%"
DSP Concepts to tune them This enables engineers to
&
=
&"
(
Accelerating Optimization measure how much a particular
losses compared to hand- Companies that are comfortable To speed design, Audio Weaver improvement in sound quality will
( with audio processing can supports cross-platform cost in terms of CPU utilization
!
"
"
&
(
"
the design cycle is much faster, iteration requires substantial time investment since the
giving developers the ability to
%&
= "
code must be optimized and tuned to see what its actual
O
"
(
$
&
/
.)
" '
Weaver, the design cycle is much faster, giving developers
"&&
5
&
&
"
)R?
%&
= "
O
KZ'
O
5%
&
"
+"
"
(
modules, and does not require
#)
&
(
"
>kj
O
(
&
which to design and tune the
"
!'
"
$
"
O
&
.(
design using Audio Weaver as &
(
&!(
=
'
N
!
"
N'
&
!
hardware is available, the code
%&'
&
has become possible to create core components that not only
)R?
frequency response that is 3 dB
highly tuned audio applications J"&
KZ
=
&
/
'
O
&
&
!
development environment that !
( >
*(
O
"
& (
K
facilitates fast prototyping and
"
=
&
/
'
in CPU utilization between
companies new to audio,
" (
K
&
&
&=
=
"
17
STM32 Journal
#
"
"
&&(
N
& (
&&
(
J"
'
&'
software functionality beyond its gg
"
%
and download code before they %
"
"
'
K
&&
0K.4
= "
(
including: '
)
O
&&
gg Flash card reader capabilities,
However, to assess the impact of iAP application, a complete such as using an SD card or
gg
#
! $'
"
=
+"
'
"
)R?
K?
%&'
&
gg
"
.
)R?
KZ
=
(
&
/
= "
gg
$
+"
"
%&(
decoders are provided for this
(
The Apple iAP application purpose free of charge
gg Boot loader support both simple accessory
Audio Weaver solves this Today’s consumer audio devices
problem by supporting a gg Update manager and audio streaming accessory
&%
K
=
(
$&
"
=
"&&
+"
&!
(
N
System-level Design gg
)R??%
5%
&
= "
)R?Z%
!
%&
(
$
&
&!
Coprocessor (ACP) circuit fabric enabling simultaneous
"
"
O
& (
not one of the applications
<
04
=
'
)R?
KZ
$( creating digital audio resources USB Host HID class for control
O
for its customers in order to and information data synchronized digital audio
"
+"!
O
&
"
&!
+"