Sign in

username:

password:



Not a member?

Search c55x



Search tips

Subscribe to c55x



c55x by Keywords

AIC23 | C5509 | CCS | CSL | EMIF | EVM | GEL | GPIO | HPI | Interfacing | JTAG | McBSP | OMAP | Omap15 | OMAP59 | RTDX | SDRAM | TMS320VC5509 | USB | XDS5

Ads

Discussion Groups

Discussion Groups | TMS320C55x | Re: Standard lib functions like fscanf not working

Technical discussions about the TI C55x DSPs (including the c5501, c5502, c5503, c5507, c5509, c5510 and OMAP5910).

  

Post a new Thread

Standard lib functions like fscanf not working - namana maji - Dec 28 23:34:00 2005



Hi,
I am working on a C55x project. In the application I need to read the input file name and output file name from a text file. I have used standard functions like fopen,fscanf,fprintf in this application. I have included the correct rts library to the project. But these standard functions dont seem to work properly. (i.e.the values that are read by fscanf is not right.) Can anybody suggest how I could solve this problem?
Thanks
Namana





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

Re: Standard lib functions like fscanf not working - Jeff Brower - Dec 30 14:03:00 2005

Namana-

> I am working on a C55x project. In the application I need to read the
> input file name and output file name from a text file. I have used
> standard functions like fopen,fscanf,fprintf in this application. I have
> included the correct rts library to the project. But these standard
> functions dont seem to work properly. (i.e.the values that are read by
> fscanf is not right.) Can anybody suggest how I could solve this
> problem?

I assume that you are using 2 things:

-CCS software

-either DSK 5510 board, or you have JTAG emulator
hooked up to non-DSK board

These are required for DSP C code file I/O functions to operate.

-Jeff




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

Re: Standard lib functions like fscanf not working - namana maji - Jan 2 0:39:00 2006

Hi Jeff,
I am using C55x rev 3 simulator on CCS.I have included rts55x.lib for the large memory model in my project. I have tried increasing the stack & heap size as suggested by Mike, but that too has not solved the problem.
Thanks
Namana.

Jeff Brower <jbrower@jbro...> wrote:
Namana-

> I am working on a C55x project. In the application I need to read the
> input file name and output file name from a text file. I have used
> standard functions like fopen,fscanf,fprintf in this application. I have
> included the correct rts library to the project. But these standard
> functions dont seem to work properly. (i.e.the values that are read by
> fscanf is not right.) Can anybody suggest how I could solve this
> problem?

I assume that you are using 2 things:

-CCS software

-either DSK 5510 board, or you have JTAG emulator
hooked up to non-DSK board

These are required for DSP C code file I/O functions to operate.

-Jeff




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

Re: Standard lib functions like fscanf not working - Jeff Brower - Jan 2 17:24:00 2006

Namana-

> I am using C55x rev 3 simulator on CCS.I have included rts55x.lib for
> the large memory model in my project. I have tried increasing the stack
> & heap size as suggested by Mike, but that too has not solved the problem.

Starting with a simple fopen() call, what happens? What makes you say the function
"does not seem to work properly"? Does the function not return? Or it returns but
no filename is created?

-Jeff > Jeff Brower <jbrower@jbro...> wrote:
> Namana-
>
> > I am working on a C55x project. In the application I need to read the
> > input file name and output file name from a text file. I have used
> > standard functions like fopen,fscanf,fprintf in this application. I have
> > included the correct rts library to the project. But these standard
> > functions dont seem to work properly. (i.e.the values that are read by
> > fscanf is not right.) Can anybody suggest how I could solve this
> > problem?
>
> I assume that you are using 2 things:
>
> -CCS software
>
> -either DSK 5510 board, or you have JTAG emulator
> hooked up to non-DSK board
>
> These are required for DSP C code file I/O functions to operate.
>
> -Jeff





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

odd number of samples to cifft32. - Tayyar Guzel - Jan 4 5:45:00 2006

Hi guys,

recently, I have come accross with an interesting problem using the DSPlib functions of c55x. I use the inverse FFT function (cifft32) in my signal processing scheme. well, everything was fine until I decided to change my FFT size to an odd number like 96, 288 or anything that is not a power of two. Then, the FFT results came out incorrectly.

I always thought it was possible to chose any size to my FFT as we do in Matlab. but, obviously it was not. Now, I am guessing the algorithm used by TI in DSPlib is the decimation-in-time in-place FFT. Could this be the reason why I can't select an odd number as my FFT size? If it is so, is there any way I can use the DSPlib functions to calculate the FFT of a chunk of signal that has an odd number of samples like 96, 288, 41000 and so on?

any comment is appreciated and thanx in advance,

TayyaR.




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

Re: odd number of samples to cifft32. - Tayyar Guzel - Jan 4 13:59:00 2006

Thanks for the suggestion Mike..

Zero padding the data would yield a decrease in the sample spacing in my iFFT output.. Although I understand that it would not definitely correspond to an increase in frequency resolution, it will change the indexing of the frequencies, which makes handling the output more tricky and easy to misinterpret.

Modern FFT algorithms do not require a power-of-two length data set at the cost of less efficieny, which then is not a big matter for current DSPs.

I was wondering if TI had any plans to implement these modern algorithms for such common functions like FFT, put them in the DSPlib and take the burden from our back:)

TayyaR. Michael Clark <clarkm2.rpi@clar...> wrote: Try zero padding the data. For example if you have 100 samples zero padd to 128 and perform a 128 point FFT. TI's FFT routine is optimized for powers of two ONLY.

Mike
On 1/4/06, Tayyar Guzel <tayyar_guzel@tayy...> wrote: Hi guys,

recently, I have come accross with an interesting problem using the DSPlib functions of c55x. I use the inverse FFT function (cifft32) in my signal processing scheme. well, everything was fine until I decided to change my FFT size to an odd number like 96, 288 or anything that is not a power of two. Then, the FFT results came out incorrectly.

I always thought it was possible to chose any size to my FFT as we do in Matlab. but, obviously it was not. Now, I am guessing the algorithm used by TI in DSPlib is the decimation-in-time in-place FFT. Could this be the reason why I can't select an odd number as my FFT size? If it is so, is there any way I can use the DSPlib functions to calculate the FFT of a chunk of signal that has an odd number of samples like 96, 288, 41000 and so on?

any comment is appreciated and thanx in advance,

TayyaR.




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

Re: odd number of samples to cifft32. - Jeff Brower - Jan 5 0:08:00 2006

Tayyar-

> Thanks for the suggestion Mike..
>
> Zero padding the data would yield a decrease in the sample spacing
> in my iFFT output.. Although I understand that it would not definitely
> correspond to an increase in frequency resolution, it will change the
> indexing of the frequencies, which makes handling the output more tricky
> and easy to misinterpret.
>
> Modern FFT algorithms do not require a power-of-two length data set
> at the cost of less efficieny, which then is not a big matter for
> current DSPs.
>
> I was wondering if TI had any plans to implement these modern
> algorithms for such common functions like FFT, put them in the DSPlib
> and take the burden from our back:)

There's nothing modern about FFTs, so you can give up that argument if you're trying
to get TI to do some work for you. It's all been done by late 70s.

What I'm really saying is "there is a reason". What you appear to be asking for are
DSP versions of arbitrary factor FFT algorithms and possibly prime-factor algorithms
like Winograd. These algorithms use a lot of additions, which is not going to be an
advantage on a DSP which does multiplies as fast as additions. You would be better
off with power-of-2 algorithms and zero-padding. I.e. if they were valuable for
DSPs, TI -- and other third-parties -- would have offered them as products in the
last 25 years.

-Jeff

> TayyaR.
>
> Michael Clark <clarkm2.rpi@clar...> wrote: Try zero padding the data. For example if you have 100 samples zero padd to 128 and perform a 128 point FFT. TI's FFT routine is optimized for powers of two ONLY.
>
> Mike >
> On 1/4/06, Tayyar Guzel <tayyar_guzel@tayy...> wrote: Hi guys,
>
> recently, I have come accross with an interesting problem using the DSPlib functions of c55x. I use the inverse FFT function (cifft32) in my signal processing scheme. well, everything was fine until I decided to change my FFT size to an odd number like 96, 288 or anything that is not a power of two. Then, the FFT results came out incorrectly.
>
> I always thought it was possible to chose any size to my FFT as we do in Matlab. but, obviously it was not. Now, I am guessing the algorithm used by TI in DSPlib is the decimation-in-time in-place FFT. Could this be the reason why I can't select an odd number as my FFT size? If it is so, is there any way I can use the DSPlib functions to calculate the FFT of a chunk of signal that has an odd number of samples like 96, 288, 41000 and so on?
>
> any comment is appreciated and thanx in advance,
>
> TayyaR.





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