Häufig gestellte Fragen
- M051-Base-Serie(95)
- M0518-Serie(97)
- M0519-Serie(43)
- M0564-Serie(1)
- Mini51-Base-Serie(90)
- Nano100/102-Base-Serie(101)
- Nano103-Base-Serie(10)
- Nano110/112-LCD-Serie(100)
- Nano120-USB-Serie(111)
- Nano130-Advanced-Serie(110)
- NUC029-Serie(94)
- NUC100/200-Advanced-Serie(102)
- NUC120/122/123/220-USB-Serie(116)
- NUC121/125-Serie(1)
- NUC126-USB-Serie(2)
- NUC130/230-CAN-Serie(103)
- NUC131-NUC1311-CAN-Serie(98)
- NUC140/240-Konnektivität-Serie(114)
Produkte
Applikationen
Funktion
+
Häufig gestellte Fragen
How to use the DSP function in the NuMicro® M4 series for spectrum analysis? Datum: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.

| Produkte: | Mikrocontroller ,Arm Cortex-M4-MCUs ,M451-Base-Serie ,M451M-Serie ,M452-USB-Serie ,M453-CAN-Serie ,M4TK-Touch-Key-Serie ,NUC442/472-Serie ,NUC505-Serie |
|---|---|
| Applikationen: | |
| Funktion: | Peripherals,ARM,DSP,FPU,Connectivity,I2C |