![]() |
MKM34Z256VLx7 Bare Metal Software Drivers
R4.1.6
Reference Manual
|
This example demonstrates typical use of the Memory Mapped Arithmetic Unit (MMAU) for 4th order low-pass filter computing [1]. The operation of 4th order low-pass filter function is given by the following equation:
y(n)=b0*x(n)+b1*x(n-1)+b2*x(n-2)+b3*x(n-3)+b4*x(n-4)+a1*y(n-1)+a2*y(n-2)+a3*y(n-3)+a4*y(n-4)
The precision of the d_iir_4ord matlab script has been compared with standard filter(b,a,x) matlab function. The precision of approximated d_iir_4ord(b,a,in,out) function is in range +/-1.2e-13 as shown in the following figure.
The matlab script has been rewritten using 32-bit mul_ll, mac_ll and l_mac_ll operations supported by the MMAU module..
The MMAU module can provide a several-fold increase of computation performance for high-dynamic range calculations versus the most common microcontroller cores, for example ARM Cortex®-M0+.
IAR EWARM 7.40.7 | KEIL uVision 5.15 | CrossWorks 3.6 | ATOLLIC TrueStudio 5.3.0 | Kinetis Design Studio 3.0.0 |
---|---|---|---|---|
♦ | ♦ | ♦ | ♦ | ♦ |
[1]: Oppenheim, A. V. and R.W. Schafer. Discrete-Time Signal Processing, Englewood Cliffs, NJ: Prentice-Hall, 1989, pp. 311-312. "Digital Filter"