Skip to main content
JoBackMonkey
Associate II
January 17, 2022
Solved

How to include DSP Filtering Functions?

  • January 17, 2022
  • 4 replies
  • 2359 views

In the last month, I did an example of FFT using the CMSIS DSP library. Now, I am trying to design a simple "matched filter".

 

In my code I am using "arm_fir_init_f32" and "arm_fir_f32". While debugging, on the line of "arm_fir_f32", I am getting "HardFault_Handler(void)".

 

According to the "Debug" panel, the file for "arm_fir_f32.c" can not be found. And the file path which is being shown on the screen is wrong (there is no file path like that on my PC), where is this file path coming from?

 

Any advice to solve the problem?

 

0693W00000JMI46QAH.png

This topic has been closed for replies.
Best answer by JoBackMonkey

Thanks for your advice. You're right, I just typed the wrong variable into the function. I corrected it, it worked!

4 replies

TDK
January 17, 2022

The source for these is not available.

> Any advice to solve the problem?

The issue is likely an invalid pointer in the structure you're passing to the function or similar memory mismanagement issue.

"If you feel a post has answered your question, please click ""Accept as Solution""."
JoBackMonkey
JoBackMonkeyAuthorBest answer
Associate II
January 19, 2022

Thanks for your advice. You're right, I just typed the wrong variable into the function. I corrected it, it worked!

thundertronics.com
Visitor II
January 18, 2022

You must find math library and header files for your MCU and configure "Paths and Symbols" in project properties. Check this article: Using STM32 CMSIS DSP library in STM32CubeIDE

For example, on H7 MCU:

0693W00000JMJSiQAP.png0693W00000JMJSnQAP.png0693W00000JMJSsQAP.png0693W00000JMJSjQAP.pngI copied library files to separate directory from Cube firmware package (remember to keep it up to date with firmware libraries):

0693W00000JMJSxQAP.png 

arm_fir_init_f32 is inside "xxxx_math.a" library:

0693W00000JMJTlQAP.png

JoBackMonkey
Associate II
January 19, 2022

Thanks for the advice. I have done the first steps already, however, the last part of your explanation is so valuable. Helpful!