Estimated colleagues,
following I explain the strange behavior:
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.
Hopefully someone can help me or give me some tip.
Thank you in advance!.
arm_cfft_f32 is an in-place function, so it is modifying the input data. This is why you cannot run it on the same input array more than once.