2009-06-23 05:53 AM
FFT_4096
2011-05-17 04:13 AM
hi
I am working on STM32f103xxx series and really need FFT_4096 point with FIR or IIR with windowing(hanning , hamming , ...) on my project , i work with ride7 compiler , and my project have been held because of this code. can anyone help me ?2011-05-17 04:13 AM
Sorry, I don’t have code for you. But I do have questions that you have not answered in your post.
Can you use 32-bit floating point? Emulated FP was fast enough for my DTMF decode. (I used IAR tools.) What speed do you need? Careful scaling of integer values is more work (my guess WAY more work) but may be needed if you have serious timing constraints. At 8 bytes (real, imag) * 4096 = 32K RAM. Do you have enough RAM? Writing an FFT in C from info gleaned from the web should not be a problem. Use sin() functions to generate test data.2011-05-17 04:13 AM
I've posted FFT code including complex 4096 points FFT year ago - see
''hand optimized FFT/IFFT for Cortex-M3 attached'' from March 29 2008. However, 4096 points is pushing 16 bit integer arithmetics to its limits due to required dynamic range. Ivan2011-05-17 04:13 AM
about RAM , yes , i have enough RAM to do this, i use stm32f103vet6 .
it has 64k RAM. about 4098 point hand optimized code that have been sent, i have tested it, but it doesn't seem work properly , i use ride 7 for compile it but during compiling i faced with several errors ! i try to compile it with IAR , but i cant do it(i'm not so familiar with IAR) , but i prefer to do it in ride , can you help me about this ? thanks a lot2011-05-17 04:13 AM
Posted FFT routine was tested with Rowley Crossworks.
It is using gcc, so ride7 should compile it as it is. Which kind of errors was it generating? Ivan2011-05-17 04:13 AM
Quote:
i have tested it, but it doesn't seem work properly
How can you have ''tested'' it if you can't even compile it?! :-?Quote:
during compiling i faced with several errors ... can you help me about this ?
How do you expect anyone to be able to help unless you say specifically what errors you actually got??! :-?2011-05-17 04:13 AM
2011-05-17 04:13 AM
The reason for most (if not all) these errors is that C preprocessor is not active. These are the main consequences:
// marked comments are not removed #define ignored -> symbolic register names not replaced Try to enable C preprocessor for assembler files. I do not know how to do it in Ride 7. It is working in Rowley Crossworks by default. I've meanwhile switched to KEIL MDK toolset, but I haven't converted FFT routine yet. When I'll do it I post KEIL version. If you want to use it without C preprocessor you have to perform preprocessor functionality in text editor: - delete all comments - replace #define definitions (e.g. replace all x0r by R4) - delete one of code optional sections (line 276-284, LATENCY2 conditional compile) Ivan2011-05-17 04:13 AM
If GCC is being invoked to assemble the file then the preprocessor will be applied by default, but if GAS (GNU assembler) is being invoked instead then the preprocessor won't be applied. I haven't used any of the IDEs being discussed here, but if they're generating makefiles then maybe changing AS to be the same as whatever CC is would help.
Otherwise, you can get GCC to preprocess for you, as opposed to manually performing the substitutions in an editor. It can be done like this: gcc file.s -E -o file2.s It should work in any version of gcc targeting any platform, since it's just running the preprocessor.