Sign in

username:

password:



Not a member?

Search c54x



Search tips

Subscribe to c54x



c54x by Keywords

5409 | 5416 | AD5 | ADC | BIOS | Boot | Booting | Bootloader | C540 | C5402 | C5409 | C5416 | CCS | Codec | DMA | Dmad | DSK | DSKPlus | Dsplib | EVM | FFT | FIR | Flash | GPIO | HPI | Initialization | Interrupt | JTAG | LOG_printf | MCBSP | RFFT | RTDX | Sampling | STLM | UART | VC540

Ads

Discussion Groups

Discussion Groups | TMS320C54x | rfft problem

Technical discussions about the TI C54x DSPs (including the c5401, c5402, c5402a, c5404, c5407, c5409, c5409a, c5410, c5410a, c5416, c5420, c5421, c5441, c549, c5470 and c5471).

  

Post a new Thread

rfft problem - Sazali Senawi - Oct 23 7:26:00 2002



Hi all;
Im still stuck when using the rfft function eventhough
Ive followed every advice ive found in the mailing
list archive concerning the rfft. Ive compared the
result with Matlab and i still find that the result
of rfft is wrong. I really need it to work in order to
continue my work. I extremely need yr help .
below are the steps Ive taken:

1) ive included dsplib.h and Tms320.h
2) ive included 54xdsp.lib
3) ive set my input data in the cmd file as follows

.fftdata: {} > IDATA PAGE 1,align(32)

4) could anybody please tell me what i did wrong. my
code is as follows:

#include <std.h>
#include <stdio.h>
#include <math.h>
#include "dsplib.h"
#include <tms320.h>

#pragma DATA_SECTION(AA,".fftdata");
short AA[16]={0};
float A[16]={1.0000, 0.7071, 0.0000, -0.7071,
-1.0000,-0.7071, 0.0000, 0.7071,
1.0000, 0.7071, 0.0000, -0.7071,
-1.0000,-0.7071, 0.0000 , 0.7071};
main()
{
int i=0;
fltoq15(A,AA,16);
unpacki_16(AA);
cbrev(AA,AA,(ushort)16/2);
rfft(AA,16,1);
q15tofl(AA,A,16);

for(i=0;i<16;i++){
printf(" %f\n",A[i]);
}
return 0;
}

I thank you in advance for yr cooperation.

Sazali





(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )

Re: AW: 'C' compatibility with CCS v2.0 - Brian C. Lane - Oct 24 16:15:00 2002

On Wed, 23 Oct 2002 08:31:34 +0200, you wrote:

>Hi Brian,
>
>this is not an exactly answer to your question but it may help you.
>Take a look at TI' Application Report spra366 - "Generating Efficient Code
>with TMS320". There you'll find some c-coding guidelines.
>Organizing your code in a propper way let the compiler produce efficient
>code.

Thanks for the pointer, I've read that before but its been awhile.
What I'm really trying to find out is how much success (or trouble)
people have had in taking a 'standard' piece of 'C' code and dropping
it into their CCS project. I've had a variable amount of success, some
of the problems being mine and others being things that I think the
CCS compiler should at least warn about.

Thanks,

Brian

-----------------------------------------------------
Brian C. Lane (W7BCL) Programmer
www.shinemicro.com RF, DSP & Microcontroller Design





(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )