STM32 Real-Time FIR Filter Implementation (CMSIS DSP) - Phil's Lab #141

preview_player
Показать описание

[SUPPORT]

[GIT]

[SOCIAL]

[LINKS]

[TIMESTAMPS]
00:00 Introduction
01:44 Previous Videos

02:33 PCBWay

03:06 Required CMSIS Files
04:24 Adding CMSIS Libraries
06:00 CMSIS FIR Documentation

09:13 Software Implementation
16:17 Filter Design
21:41 Real-Time Test

25:23 Outro
Рекомендации по теме
Комментарии
Автор

Thanks for sharing. You're a great teacher, better than some of my EE professors lol!

bubbasplants
Автор

Audio stuff using the CMSIS Library! I think I am in love!! I use NXP M7 microcontrollers, and all this stuff is still directly useful! Great content.

isaacclark
Автор

Thank you Phil, That's great Topic and Video!

kiprof
Автор

Although the QA403 is a wonderful device, it would be handy to let people know that most measurements can be done with just a decent audio interface for around $70-150

Great video btw 👍🏻

p_mouse
Автор

Hey Phil! I absolutely love your videos and are absolute game changers! Thank you so much for uploading these videos!

P.S. it would be amazing to see a PCB design walkthrough for the infiniFX board!

dazai
Автор

Very interesting video! Thank you for uploading these videos, it means alot!

sumedhburbure
Автор

damn nice. was looking for this stuff last week. 👍
thank you for these amazing tutorials.

samj
Автор

loved all your videos series for Engineers like us, who was not taught the real beauty of DSP and MCU and their integration in real life

love fro India sir

Bestcuriosity_
Автор

Battery powered sensor board would be also interesting 🙂

perceptron
Автор

Hey so what's the deal with using 32-bit floats as your kernel type, specifying some 20 digits for each element, when only 10-12 digits of precision is realistic with this datatype at this magnitude? Looking at 13:50 here, Your very first coefficient for example, is diverging after the 12th digit, meaning the entire least-significant half of your coefficient is not at all being represented in the hardware. At such a long kernel length, won't this essentially result in a different filter than what was called for by your literal const declaration?

meatballofall
Автор

Hi phil..
I am trying to design a filter that could filter out the decaying DC offsets. What would be mu best choice?
Can u also suggest some must have tools for filter design?
I’m a beginer so any information is useful information

akhilzachariahmathew
Автор

Have you tried any of the STM32G4 processors with the FMAC?

krisd
Автор

Hey, great content as always! I wondered if you've looked into the STM32 FMAC hardware? Wouldn't be a nice hardware-agnostic demo like this, but maybe it would be interesting to compare the pure firmware FIR approach to hardware? I've seen it on the peripheral list but never used it myself. Not sure what the limitations might be. Thanks!

Dcl
Автор

Very nice video Phil!
With your current infinity development platform, how many effects do you think you can chain with current hardware?
Like equalizer > distortion > delay > reverb or some pipeline that'll mimick a pedalboard ? Or would you have many identical devices with different firmware instead?

I have no idea how powerful those MCU are for those applications.

bebenlebricolo
Автор

Why you need to reverso order the taps since they are symmetric?

zerg
Автор

Does the use of block functionality degrade the latency?

tariqsingh
Автор

hey sir, i have a request for you . Can you make a video on how to create a custom pcb for stm32wl family and use its lora function in the pcb?

vedantjadhav
Автор

Wanna try... But I don't have such audio devices to see frequency response.. Will try nano vna on low fr.

dotnetforever
Автор

Huge Fan! Would it be possible to create a USB interface for guitar with in-built DSP filters using an STM32?

thetechegg
Автор

*Summary*

*What it's about:* This video demonstrates how to implement a Finite Impulse Response (FIR) filter on an STM32 microcontroller using the CMSIS DSP library for real-time audio processing.

*Key Points:*

* *0:00** FIR Filter Advantages:* FIR filters offer precise frequency response control, are stable, and can create complex filter shapes.
* *3:06** CMSIS DSP Library:* This ARM library provides optimized DSP functions for Cortex microcontrollers, including FIR filtering, offering significant speed improvements over custom code.
* *3:06** Implementation Steps:*
1. *3:06** Download CMSIS files:* Get `arm_math.h` header and the appropriate pre-compiled library (`arm_cortexM7lf_math.lib` for single-precision floating point on STM32H7).
2. *4:24** Add libraries to project:* Include the header file and link the library in your IDE (STM32CubeIDE in this case).
3. *6:00** Understand CMSIS FIR functions:*
* `arm_fir_init_F32()`: Initializes the FIR filter structure. Requires reversed coefficient order and a working buffer.
* `arm_fir_f32()`: Performs the actual filtering on a block of input samples.
4. *9:13** Write your code:*
* Define kernel length, block size, and structures for the FIR instance, buffers, and kernel.
* Write functions to initialize the filter (including kernel reversal), process audio blocks, and convert between integer and floating-point formats.
5. *16:17** Design the filter:* Use tools like T-Filter to design your desired frequency response and generate filter coefficients.
* *21:41** Real-time testing:* The video demonstrates the implemented filter working on a custom STM32H7 board, achieving results very close to the designed filter response.

*Tools Used:*

* STM32CubeIDE
* CMSIS DSP Library (version 4)
* T-Filter online filter design tool
* Quant Asylum QA403 audio analyzer
* Segger J-Link debugger

*Tips:*

* Remember to reverse the filter coefficient order before passing it to the initialization function.
* Consider memory constraints and processing power when choosing your filter length.
* Non-idealities in the system can affect real-world filter performance.



i used gemini 1.5 pro to summarize the transcript

wolpumba