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

CMSIS: DSP Lib - Frequency Bin Example (strange behavior)

Estimated colleagues,

following I explain the strange behavior:

  • I am working the STM32F407 ARM processor,
  • compiling with the GNU Tools ARM (4_9-2014q4) ,
  • use the HAL provided by STM32CubeF4 v1.5.0,
  • using the DSPLib provided CMSIS Version 1.4.4 2014/07/31 ,
  • UPDATE 2015-05-22:
    • I also tried this with the last MDK-ARM version (uVIsion V5.14.0.0) and ITS CMSIS / DSP_Lib examples and found the same effect!!

During testing my board with the "Frequency Bin Example" provided with the DSP Lib I found following effects:

A) The example test program provided by CMSIS works fine. That is testIndex equals to refIndex (which is 213) and goes to infinite loop.

B) But when I modify the program e.g. with a while() in order to execute cyclically like this

...global and extern variables...

void main(void)

{

  arm_status status;

  float32_t maxValue;

     while(1)

   {

       status = ARM_MATH_SUCCESS;

       /* Process the data through the CFFT/CIFFT module */

       arm_cfft_f32(&arm_cfft_sR_f32_len1024, testInput_f32_10khz, ifftFlag, doBitReverse);

       /* Process the data through the Complex Magnitude Module for

       calculating the magnitude at each bin */

       arm_cmplx_mag_f32(testInput_f32_10khz, testOutput, fftSize);

       /* Calculates maxValue and returns corresponding BIN value */

       arm_max_f32(testOutput, fftSize, &maxValue, &testIndex);

        if(testIndex !=  refIndex)

      {

         status = ARM_MATH_TEST_FAILURE;

       }

     }

}

the program throws ARM_MATH_TEST_FAILURE the second time.

C) If I define testInput_f32_10khz[] as a constant array on the flash then the program throws ARM_MATH_TEST_FAILURE always.

  • The problem does not have to do with the bit reversal problem of old versions (so much as I could see from other discussions).
  • I am using the sources not the library (because only the ARM library is provided with STMCube.

Hopefully someone can help me or give me some tip.

Thank you in advance!.

Parents Reply Children
No data