常见问答
- M051 系列(95)
- M0518 系列(97)
- M0519 系列(43)
- M0564 系列(1)
- Mini51 系列(90)
- Nano100 / 102 系列(101)
- Nano103 Base 系列(10)
- Nano110 / 112 LCD 系列(100)
- Nano120 USB 系列(111)
- Nano130 USB+LCD 系列(110)
- NUC029 系列(94)
- NUC100 / 200 系列(102)
- NUC120 / 122 / 123 / 220 USB 系列(116)
- NUC121/125 系列(1)
- NUC126 USB 系列(2)
- NUC130 / 230 CAN 系列(103)
- NUC131/NUC1311 CAN 系列(98)
- NUC140 / 240 USB+CAN 系列(114)
- M451 Base 系列(118)
- M451M 系列(117)
- M452 USB 系列(130)
- M4521 USB 系列(1)
- M453 CAN 系列(128)
- M463 CAN FD/USB HS 系列(1)
- M467 Ethernet/Crypto 系列(1)
- M471 系列(1)
- M479 Motor Control Series(1)
- M481 Base 系列(4)
- M482 USB FS OTG 系列(4)
- M483 CAN 系列(4)
- M484 USB HS OTG 系列(4)
- M485 Crypto 系列(4)
- M487 Ethernet 系列(4)
- M4TK 触摸 IC 系列(25)
- NUC442 / 472 系列(130)
- NUC472 Series(1)
- NUC505 系列(138)
产品
功能
+
FAQ
How to use the DSP function in the NuMicro® M4 series for spectrum analysis? Issue Date:2017-02-02
- For detailed example samples, refer to the following link: http://www.nuvoton.com/hq/resource-download.jsp?tp_GUID=EC0120160922110158
- Enable the DSP function:
1. In Keil, select Target Options, switch to the C/C ++ window and then enter ARM_MATH_CM4 = 1 in the Define text field.
2. In the Library section, add arm_cortexM4lf_math.lib at \Library\CMSIS\Lib\ARM.
3. Include arm_math.h to the main function. After that, the DSP library can be called in the main function.
- First, the even-numbers in the data format to be calculated are real numbers and the odd-numbers are imaginary numbers, e.g. 1+0.5i, 2+4i, 3+2i=>testinput={1, 0.5, 2, 4, 3, 2}, FFTsize=3.
- Then, call the function arm_cfft_radix4_init_f32(&S, fftSize, ifftFlag, doBitReverse) to do the initial settings for Fast Fourier operation, including the number of operations, the need for fast Fourier or inverse fast Fourier transform.
- Call the function arm_cfft_radix4_f32(&S, testinput) for fast Fourier transform operations, and the results are stored in the array testinput, where the results are complex.
- Take the absolute value of the complex number to get the frequency intensity, and output the results to Output. Since the result is left-right symmetry, the amount of computation is fftSize/2, arm_cmplx_mag_f32(testinput, Output, fftSize/2).
- Get the frequency intensity as y-axis data, and then calculate the x-axis for each frequency mode as
The calculation results are shown as follows. The strongest frequency of the signal can be about 1 kHz.
Products: | Microcontrollers ,Arm Cortex-M4 MCUs ,M451 Base Series ,M451M Series ,M452 USB Series ,M453 CAN Series ,M4TK Touch Key Series ,NUC442/472 Series ,NUC505 Series |
---|---|
Applications: | |
Function: | Peripherals,ARM,DSP,FPU,Connectivity,I2C |