Audio algorithm rapid testing experimental platform based on STM32

Share the good stuff you accidentally discovered with those in need.

Suitable for researchers who need to use DSP for real-time processing. Opportunistic people like me who are engaged in active noise reduction algorithms and are unwilling to spend too much energy on the host computer should not follow suit. This method is very feasible at present. You can develop the Matlab algorithm yourself without writing a USB and CODEC drivers, there are also a large number of mature toolboxes available, the source code is very complete with comments, and each function also has C language and Matlab instructions, which is very friendly to people developing actual products.

The introduction said that Porsche also uses it, so rounding up, I also own a Porsche. Official website link
DSP Concept

This method requires a heavy investment of 50 RMB to purchase a development board. I bought it from Xianyu. Experts can draw one by themselves. I save time and use Xianyu. Friends who don’t have a board can rest. The model is MB997B, which is the official development board of the STM32-F407 Discovery series. It has a digital microphone and a CODEC on the board, which is very convenient. To confirm that it is this VGT6, changing the board is not fast.

Insert image description here
Although supporting so many chips, my goal is to pursue the fastest, most labor-saving, and cheapest way.
Insert image description here

Download software


In addition, you need to register an account for DSP_Concept software. This software is fully connected to the Internet and should not be cracked. But don’t worry, the algorithm can be programmed into Flash and can be used offline. I have seen the ST free version and its functions are OK. In fact, I Just write the algorithm. The main thing I value is that the underlying driver is very convenient.
Insert image description here

Burn the underlying driver

Download the M4 version.
Both the above software and the following software need to be installed. After installation,
Insert image description here
use KEIL5 to burn using the same path as mine. The official method is to use ST-LINK to burn the written BIN file. I want to modify it here later, so I directly burn the source code for testing. I use J-LINK SW mode for burning. Pay attention! The SWD port on this board is not used to program the main control chip below. To use SW programming, you need to use the PA13 and PA14 pins.
Insert image description here
After the burning is successful, the board will be considered a sound card. This is great. I've seen it has a 32-bit, 48KHZ sampling rate. It's good for listening to music alone. If you round it up, you have a USB sound card with good performance, and you can even adjust the effects. But currently, there is no sound when plugging in the headphones. The device has three inputs and two outputs, the first two inputs are the left and right channels, and the third input is a digital microphone.
Insert image description here

Top-level software programming

Insert image description here
Open this software,
select Change Connection,
Insert image description here
Insert image description here
select USB, and you should be able to read the device information.

Open the Demo file
Insert image description here
and click Run to hear the sound. Among them, there are basic algorithms. If you don’t know Matlab, just try Lianliankan. It has basic and easy-to-use algorithms. The performance of this 407 is quite good, and the occupancy rate is less than 20%.
Insert image description here

About algorithm development in Matlab

First of all, it can be used as a USB sound card, and you can run algorithms even without using its library. However, it provides a special library that can be used to use built-in algorithms, so this tool is very good, it is quick to build, and it is also quick to get started. The instructions in every place are very clear, and the source code and comments are very complete. It is worth studying carefully.
Insert image description here
Insert image description here
Copyright © 2021 by RichardYang. All rights reserved.
For reference only, reprinting is strictly prohibited, thank you.

Guess you like

Origin blog.csdn.net/u011442170/article/details/112188614