Reply by Richard Williams February 25, 20072007-02-25
Joshy J,

First, in the function main(), in the file uart.c
(of which there must only be one instance of function main() anywhere in the
project)
Your calling main() again, at the end of the main() function
That makes it a recursive call, which is a VERY BAD IDEA

Much better to make a 'for' or 'while' loop in main() that encloses all
the desired code that you want to perform more than once

There is a lot of trash code in main() that should be removed.

*I* would also be looking at all those 'static' variables in main() to
determine if they really need to be static within the function main() or if
they would be better defined as file level 'static' functions.

Just as a tip...
comment the code and format it so it is very readable.

There are way way too many really poor variable names, with no documentation,
with the bitreverse.c file being a prime example.

incidently,
the linker command file cmdfile.txt is not correctly setup
amongst many other things, the .const section should be in the program area,
not the data area.
I also did not see a definition of memory page 0 and memory page 1.
(program area, data area)

This is ok for a first try.

I would suggest moving the main() function to its' own file as a good place to
start.

R. Williams
---------- Original Message -----------
From: "joshy jose"
To: c...
Sent: Fri, 23 Feb 2007 23:43:49 +0530
Subject: [c6x] strange problems when working with code composer studio and
c6713 dsk

> i was working with a spectrumanalizer project using c6713 dsk,
> in which i take input samples of signal using audio codec and fft is
> performed on it and the result send to computer using UART transmission
>
> i am faced with two problems and i dont have any idea to proceed
> with that let me explain the program flow
>
> 1)configure CPLD to configure the mcbsp to use with codec
> 2) open and configure the audio codec
> 3) read data from the line input
> 4) close codec
> 5) process data
> 6) configure CPLD to use the McBSP for UART transmission
> 7) configure mcbsp and edma and transmitt data
> 8) close the mcbsp and edma
> 9) go to step 1
>
> but i am faced with two problem
> a) when i include the code for processing of data ,it is not working
> properly, mcbsp configuration is not set properly
> and if i remove the particular processing it do not show that
> problem in line configMcbsp()
>
> b) when i continuously execuit the above program flow , it works
> for first time and for second looping it is not working, i felt that
> some delay must be put in between but i dont understand where?
>
> i am attachin the whole project with this mail
>
> --
> regards,
> Joshy m. Jose
> kerala , India
> 91-9447976001
------- End of Original Message -------
Reply by joshy jose February 23, 20072007-02-23
i was working with a spectrumanalizer project using c6713 dsk,
in which i take input samples of signal using audio codec and fft is
performed on it and the result send to computer using UART transmission

i am faced with two problems and i dont have any idea to proceed with that
let me explain the program flow

1)configure CPLD to configure the mcbsp to use with codec
2) open and configure the audio codec
3) read data from the line input
4) close codec
5) process data
6) configure CPLD to use the McBSP for UART transmission
7) configure mcbsp and edma and transmitt data
8) close the mcbsp and edma
9) go to step 1
but i am faced with two problem
a) when i include the code for processing of data ,it is not working
properly, mcbsp configuration is not set properly
and if i remove the particular processing it do not show that problem
in line configMcbsp()

b) when i continuously execuit the above program flow , it works for first
time and for second looping it is not working, i felt that some delay must
be put in between but i dont understand where?

i am attachin the whole project with this mail

--
regards,
Joshy m. Jose
kerala , India
91-9447976001