This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to run CMSIS DSP on nRF52840?

Hi there,
I'd like to make some FIR or IIR filter on my nRF52840 DK. I guess I'm supposed to:

1) Provide .a file into SES project's tree (or as Additional Input File):


2) Provide .h file(s). I used to provide just "arm_math.h" for STM32 projects, but saw in „fpu fft” example that these are two folders provided:

../../../../../../components/toolchain/cmsis/dsp/Include

../../../../../../components/toolchain/cmsis/include

3) Set "ARM_MATH_CM4" preprocessor definition.

4) In main() file include one .h file:

#include "arm_const_structs.h"
But I used to include "arm_math.h" for STM32 projects.

5) In main() file 
- Make two float32_t buffers - input and output
- Make instance of filter - arm_fir_instance_f32
- Init the filter instance - arm_fir_init_f32()
- FIlter the signal - arm_fir_f32()

I use the filter that I know works in Matlab, but here it seems to give me strange values on output - for example, from samples of value about 400, it makes an output about 1.66e-38. It's pretty small value. Maybe I'm just supposed to multiply that small float value, but it's strange - my filter shouldn't attenuate - it rather amplifies the signal in a few first samples.

Simultaneously, these are SoftDevice and ADC that work. Maybe it's a problem with multiplexing enough amount of CPU cycles for CMSIS DSP. I don't know, I had no problems with it on STM32 that only processed the signal.

Related