Hi Guys,
I have 6713 DSK attached with ADC which is sampling signal with maximum
frequency 150 kHz then computing FFT. I burn all the codes to boot from Flash
and it is working quite fine. After FFT I am writing FFT values to Flash memory.
For some reason, I am not getting the correct FFT peak from the values saved in
Flash. I am sampling 10 kHz signal and the peak shows as it was 50 kHz signal.
When I run the same code with CCS, it shows the peak at right sample i.e., 10
kHz.
I am wondering what is causing the change of sampling frequency while booting up
from Flash ?
I will appreciate if some one comment on this issue.
Regards,
BAS
Code not wroking while booting up from Flash- 6713 DSK
Started by ●March 1, 2012
Reply by ●March 1, 20122012-03-01
B.S.,
Without examining the code, I can only make educated guesses and recommendations.
My guess:
When running from FLASH, a lot of data is being missed.
Most likely because FLASH is many times slower than RAM, so the program falls
behind the data.
My recommendations:
1) at boot, copy the code to ram and perform the data capture from code running
in RAM.
2) use the DMA/EDMA facilities and double buffering.
3) only save the results of the FFT to FLASH rather than every datum, as writing
to FLASH is S...L...O...W.
4) use interrupts for data collection and use a software interrupt to perform
the FFT.
R. Williams
---------- Original Message -----------
From: B S
To: "c..."
Sent: Thu, 1 Mar 2012 06:16:49 -0800 (PST)
Subject: [c6x] Code not wroking while booting up from Flash- 6713 DSK
> Hi Guys,
>
> I have 6713 DSK attached with ADC which is sampling signal with
> maximum frequency 150 kHz then computing FFT. I burn all the codes to
> boot from Flash and it is working quite fine. After FFT I am writing
> FFT values to Flash memory.
>
> For some reason, I am not getting the correct FFT peak from the values
> saved in Flash. I am sampling 10 kHz signal and the peak shows as it
> was 50 kHz signal. When I run the same code with CCS, it shows the
> peak at right sample i.e., 10 kHz.
>
> I am wondering what is causing the change of sampling frequency while
> booting up from Flash ?
>
> I will appreciate if some one comment on this issue.
>
> Regards,
> BAS
------- End of Original Message -------
_____________________________________
Without examining the code, I can only make educated guesses and recommendations.
My guess:
When running from FLASH, a lot of data is being missed.
Most likely because FLASH is many times slower than RAM, so the program falls
behind the data.
My recommendations:
1) at boot, copy the code to ram and perform the data capture from code running
in RAM.
2) use the DMA/EDMA facilities and double buffering.
3) only save the results of the FFT to FLASH rather than every datum, as writing
to FLASH is S...L...O...W.
4) use interrupts for data collection and use a software interrupt to perform
the FFT.
R. Williams
---------- Original Message -----------
From: B S
To: "c..."
Sent: Thu, 1 Mar 2012 06:16:49 -0800 (PST)
Subject: [c6x] Code not wroking while booting up from Flash- 6713 DSK
> Hi Guys,
>
> I have 6713 DSK attached with ADC which is sampling signal with
> maximum frequency 150 kHz then computing FFT. I burn all the codes to
> boot from Flash and it is working quite fine. After FFT I am writing
> FFT values to Flash memory.
>
> For some reason, I am not getting the correct FFT peak from the values
> saved in Flash. I am sampling 10 kHz signal and the peak shows as it
> was 50 kHz signal. When I run the same code with CCS, it shows the
> peak at right sample i.e., 10 kHz.
>
> I am wondering what is causing the change of sampling frequency while
> booting up from Flash ?
>
> I will appreciate if some one comment on this issue.
>
> Regards,
> BAS
------- End of Original Message -------
_____________________________________
Reply by ●March 4, 20122012-03-04
R. Williams,
Thanks for your help.
I am using boot loader to copy the code to RAM. Writing to Flash part is also working fine, I checked with different examples.
I don't know why it is showing peak for 50 kHz signal. Is there any way
to see if DSP OR ADC clock is not running with the rate as they should
be ?
Regards,
BAS
________________________________
From: Richard Williams
To: B S ; "c..."
Sent: Thursday, March 1, 2012 9:59 PM
Subject: Re: [c6x] Code not wroking while booting up from Flash- 6713 DSK
B.S.,
Without examining the code, I can only make educated guesses and recommendations.
My guess:
When running from FLASH, a lot of data is being missed.
Most likely because FLASH is many times slower than RAM, so the program falls
behind the data.
My recommendations:
1) at boot, copy the code to ram and perform the data capture from code running
in RAM.
2) use the DMA/EDMA facilities and double buffering.
3) only save the results of the FFT to FLASH rather than every datum, as writing
to FLASH is S...L...O...W.
4) use interrupts for data collection and use a software interrupt to perform
the FFT.
R. Williams
---------- Original Message -----------
From: B S
To: "c..."
Sent: Thu, 1 Mar 2012 06:16:49 -0800 (PST)
Subject: [c6x] Code not wroking while booting up from Flash- 6713 DSK
> Hi Guys,
>
> I have 6713 DSK attached with ADC which is sampling signal with
> maximum frequency 150 kHz then computing FFT. I burn all the codes to
> boot from Flash and it is working quite fine. After FFT I am writing
> FFT values to Flash memory.
>
> For some reason, I am not getting the correct FFT peak from the values
> saved in Flash. I am sampling 10 kHz signal and the peak shows as it
> was 50 kHz signal. When I run the same code with CCS, it shows the
> peak at right sample i.e., 10 kHz.
>
> I am wondering what is causing the change of sampling frequency while
> booting up from Flash ?
>
> I will appreciate if some one comment on this issue.
>
> Regards,
> BAS
------- End of Original Message -------
Thanks for your help.
I am using boot loader to copy the code to RAM. Writing to Flash part is also working fine, I checked with different examples.
I don't know why it is showing peak for 50 kHz signal. Is there any way
to see if DSP OR ADC clock is not running with the rate as they should
be ?
Regards,
BAS
________________________________
From: Richard Williams
To: B S ; "c..."
Sent: Thursday, March 1, 2012 9:59 PM
Subject: Re: [c6x] Code not wroking while booting up from Flash- 6713 DSK
B.S.,
Without examining the code, I can only make educated guesses and recommendations.
My guess:
When running from FLASH, a lot of data is being missed.
Most likely because FLASH is many times slower than RAM, so the program falls
behind the data.
My recommendations:
1) at boot, copy the code to ram and perform the data capture from code running
in RAM.
2) use the DMA/EDMA facilities and double buffering.
3) only save the results of the FFT to FLASH rather than every datum, as writing
to FLASH is S...L...O...W.
4) use interrupts for data collection and use a software interrupt to perform
the FFT.
R. Williams
---------- Original Message -----------
From: B S
To: "c..."
Sent: Thu, 1 Mar 2012 06:16:49 -0800 (PST)
Subject: [c6x] Code not wroking while booting up from Flash- 6713 DSK
> Hi Guys,
>
> I have 6713 DSK attached with ADC which is sampling signal with
> maximum frequency 150 kHz then computing FFT. I burn all the codes to
> boot from Flash and it is working quite fine. After FFT I am writing
> FFT values to Flash memory.
>
> For some reason, I am not getting the correct FFT peak from the values
> saved in Flash. I am sampling 10 kHz signal and the peak shows as it
> was 50 kHz signal. When I run the same code with CCS, it shows the
> peak at right sample i.e., 10 kHz.
>
> I am wondering what is causing the change of sampling frequency while
> booting up from Flash ?
>
> I will appreciate if some one comment on this issue.
>
> Regards,
> BAS
------- End of Original Message -------
Reply by ●March 4, 20122012-03-04
BAS,
On 3/3/2012 5:44 PM, B S wrote:
>
> R. Williams,
>
> Thanks for your help.
>
> I am using boot loader to copy the code to RAM. Writing to Flash part
> is also working fine, I checked with different examples.
>
> I don't know why it is showing peak for 50 kHz signal. Is there any
> way to see if DSP OR ADC clock is not running with the rate as they
> should be ?
1. Try running your 'CCS test' without a GEL file. I suspect that the
initialization provided by the GEL file is not being performed in your
program. If it runs ok [10 khz], goto step 2.
2. The code that is copied into RAM from Flash is different than the
code that is loaded into RAM from CCS.
mikedunn
>
> Regards,
> BAS
>
>
> *From:* Richard Williams
> *To:* B S ; "c..."
>
> *Sent:* Thursday, March 1, 2012 9:59 PM
> *Subject:* Re: [c6x] Code not wroking while booting up from Flash-
> 6713 DSK
>
>
> B.S.,
>
> Without examining the code, I can only make educated guesses and
> recommendations.
>
> My guess:
> When running from FLASH, a lot of data is being missed.
> Most likely because FLASH is many times slower than RAM, so the
> program falls
> behind the data.
>
> My recommendations:
> 1) at boot, copy the code to ram and perform the data capture from
> code running
> in RAM.
> 2) use the DMA/EDMA facilities and double buffering.
> 3) only save the results of the FFT to FLASH rather than every datum,
> as writing
> to FLASH is S...L...O...W.
> 4) use interrupts for data collection and use a software interrupt to
> perform
> the FFT.
>
> R. Williams
>
> ---------- Original Message -----------
> From: B S >
> To: "c... "
> >
> Sent: Thu, 1 Mar 2012 06:16:49 -0800 (PST)
> Subject: [c6x] Code not wroking while booting up from Flash- 6713 DSK
>
> > Hi Guys,
> >
> > I have 6713 DSK attached with ADC which is sampling signal with
> > maximum frequency 150 kHz then computing FFT. I burn all the codes to
> > boot from Flash and it is working quite fine. After FFT I am writing
> > FFT values to Flash memory.
> >
> > For some reason, I am not getting the correct FFT peak from the values
> > saved in Flash. I am sampling 10 kHz signal and the peak shows as it
> > was 50 kHz signal. When I run the same code with CCS, it shows the
> > peak at right sample i.e., 10 kHz.
> >
> > I am wondering what is causing the change of sampling frequency while
> > booting up from Flash ?
> >
> > I will appreciate if some one comment on this issue.
> >
> > Regards,
> > BAS
> ------- End of Original Message -------
On 3/3/2012 5:44 PM, B S wrote:
>
> R. Williams,
>
> Thanks for your help.
>
> I am using boot loader to copy the code to RAM. Writing to Flash part
> is also working fine, I checked with different examples.
>
> I don't know why it is showing peak for 50 kHz signal. Is there any
> way to see if DSP OR ADC clock is not running with the rate as they
> should be ?
1. Try running your 'CCS test' without a GEL file. I suspect that the
initialization provided by the GEL file is not being performed in your
program. If it runs ok [10 khz], goto step 2.
2. The code that is copied into RAM from Flash is different than the
code that is loaded into RAM from CCS.
mikedunn
>
> Regards,
> BAS
>
>
> *From:* Richard Williams
> *To:* B S ; "c..."
>
> *Sent:* Thursday, March 1, 2012 9:59 PM
> *Subject:* Re: [c6x] Code not wroking while booting up from Flash-
> 6713 DSK
>
>
> B.S.,
>
> Without examining the code, I can only make educated guesses and
> recommendations.
>
> My guess:
> When running from FLASH, a lot of data is being missed.
> Most likely because FLASH is many times slower than RAM, so the
> program falls
> behind the data.
>
> My recommendations:
> 1) at boot, copy the code to ram and perform the data capture from
> code running
> in RAM.
> 2) use the DMA/EDMA facilities and double buffering.
> 3) only save the results of the FFT to FLASH rather than every datum,
> as writing
> to FLASH is S...L...O...W.
> 4) use interrupts for data collection and use a software interrupt to
> perform
> the FFT.
>
> R. Williams
>
> ---------- Original Message -----------
> From: B S >
> To: "c... "
> >
> Sent: Thu, 1 Mar 2012 06:16:49 -0800 (PST)
> Subject: [c6x] Code not wroking while booting up from Flash- 6713 DSK
>
> > Hi Guys,
> >
> > I have 6713 DSK attached with ADC which is sampling signal with
> > maximum frequency 150 kHz then computing FFT. I burn all the codes to
> > boot from Flash and it is working quite fine. After FFT I am writing
> > FFT values to Flash memory.
> >
> > For some reason, I am not getting the correct FFT peak from the values
> > saved in Flash. I am sampling 10 kHz signal and the peak shows as it
> > was 50 kHz signal. When I run the same code with CCS, it shows the
> > peak at right sample i.e., 10 kHz.
> >
> > I am wondering what is causing the change of sampling frequency while
> > booting up from Flash ?
> >
> > I will appreciate if some one comment on this issue.
> >
> > Regards,
> > BAS
> ------- End of Original Message -------
Reply by ●March 6, 20122012-03-06
R.Williams,
I am using timer with ADC to sample signals which is being set using DSPBIOS. I was changing Period Register of Timer to change the sampling frequency of ADC.
Regards,
BAS
________________________________
From: Richard Williams
To: B S
Cc: "m...@gmail.com"
Sent: Monday, March 5, 2012 11:40 PM
Subject: Re: [c6x] Code not wroking while booting up from Flash- 6713 DSK
B.S.
Did you leave out the line in your code to set the sampling rate?
R. Williams
---------- Original Message -----------
From: B S
To: Richard Williams
Cc: "m...@gmail.com"
Sent: Mon, 5 Mar 2012 09:27:55 -0800 (PST)
Subject: Re: [c6x] Code not wroking while booting up from Flash- 6713 DSK
> R. Williams, Mike,
>
> I checked with oscilloscope and it has the same clock signals running
> with Flash and CCS.
>
> I figured out that ADC's sampling frequency is changing when booting
> from Flash. For example, I set the sampling frequency to 351 kHz but
> when measured the ADC's clock while booting from Flash, it was showing
> 77 kHz. Just to make sure that it is running the same code, I checked
> with different sampling frequencies and realized that every time it
> is dividing the sampling frequency with 4 then showing the peak
> according to the this 'new' sampling frequency.
>
> Looking forward for your suggestions.
>
> BAS
>
> ________________________________
> From: Richard Williams
> To: B S
> Sent: Sunday, March 4, 2012 3:12 AM
> Subject: Re: [c6x] Code not wroking while booting up from Flash- 6713 DSK
>
> B.S.
>
> If I understand you correctly,
> The code is already running in RAM.
>
> An oscilloscope connected to the various clock signals will tell you
> if the clock frequencies are correct.
>
> have you checked the startup scripts/macros that are enabled in the
> CCS to assure your code is performing the very same operations?
>
> R. Williams
>
> ---------- Original Message -----------
> From: B S
> To: Richard Williams
> Sent: Sat, 3 Mar 2012 15:44:09 -0800 (PST)
> Subject: Re: [c6x] Code not wroking while booting up from Flash- 6713 DSK
>
> > R. Williams,
> >
> > Thanks for your help.
> >
> > I am using boot loader to copy the code to RAM. Writing to Flash part
> > is
> also working fine, I checked with different examples.
> >
> > I don't know why it is showing peak for 50 kHz signal. Is there any
> > way to see if DSP OR ADC clock is not running with the rate as they
> > should be ?
> >
> > Regards,
> >
> > BAS
> >
> > ________________________________
> > From: Richard Williams
> > To: B S ; "c..."
> > Sent: Thursday, March 1, 2012 9:59 PM Subject:
> > Re: [c6x] Code not wroking while booting up from Flash- 6713 DSK
> >
> >
>
> > B.S.,
> >
> > Without examining the code, I can only make educated guesses and
recommendations.
> >
> > My guess:
> > When running from FLASH, a lot of data is being missed.
> > Most likely because FLASH is many times slower than RAM, so the
> > program falls behind the data.
> >
> > My recommendations:
> > 1) at boot, copy the code to ram and perform the data capture from
> > code running in RAM. 2) use the DMA/EDMA facilities and double buffering.
> > 3) only save the results of the FFT to FLASH rather than every datum,
> > as writing to FLASH is S...L...O...W. 4) use interrupts for data
> > collection and use a software interrupt to perform the FFT.
> >
> > R. Williams
> >
> > ---------- Original Message -----------
> > From: B S
> >
> To: "c..."
> > Sent: Thu, 1 Mar 2012 06:16:49 -0800 (PST)
> > Subject: [c6x] Code not wroking while booting up from Flash- 6713 DSK
> >
> > > Hi Guys,
> > >
> > > I have 6713 DSK attached with ADC which is sampling signal with
> > > maximum frequency 150 kHz then computing FFT. I burn all the codes to
> > > boot from Flash and it is working quite fine. After FFT I am writing
> > > FFT values to Flash memory.
> > >
> > > For some reason, I am not getting the correct FFT peak from the values
> > > saved in Flash. I am sampling 10 kHz signal and the peak shows as it
> > > was 50 kHz signal. When I run the same code with CCS, it shows the
> > > peak at right sample
> i.e., 10 kHz.
> > >
> > > I am wondering what is causing the change of sampling frequency while
> > > booting up from Flash ?
> > >
> > > I will appreciate if some one comment on this issue.
> > >
> > > Regards,
> > > BAS
> > ------- End of Original Message -------
> >
> >
> ------- End of Original Message -------
------- End of Original Message -------
I am using timer with ADC to sample signals which is being set using DSPBIOS. I was changing Period Register of Timer to change the sampling frequency of ADC.
Regards,
BAS
________________________________
From: Richard Williams
To: B S
Cc: "m...@gmail.com"
Sent: Monday, March 5, 2012 11:40 PM
Subject: Re: [c6x] Code not wroking while booting up from Flash- 6713 DSK
B.S.
Did you leave out the line in your code to set the sampling rate?
R. Williams
---------- Original Message -----------
From: B S
To: Richard Williams
Cc: "m...@gmail.com"
Sent: Mon, 5 Mar 2012 09:27:55 -0800 (PST)
Subject: Re: [c6x] Code not wroking while booting up from Flash- 6713 DSK
> R. Williams, Mike,
>
> I checked with oscilloscope and it has the same clock signals running
> with Flash and CCS.
>
> I figured out that ADC's sampling frequency is changing when booting
> from Flash. For example, I set the sampling frequency to 351 kHz but
> when measured the ADC's clock while booting from Flash, it was showing
> 77 kHz. Just to make sure that it is running the same code, I checked
> with different sampling frequencies and realized that every time it
> is dividing the sampling frequency with 4 then showing the peak
> according to the this 'new' sampling frequency.
>
> Looking forward for your suggestions.
>
> BAS
>
> ________________________________
> From: Richard Williams
> To: B S
> Sent: Sunday, March 4, 2012 3:12 AM
> Subject: Re: [c6x] Code not wroking while booting up from Flash- 6713 DSK
>
> B.S.
>
> If I understand you correctly,
> The code is already running in RAM.
>
> An oscilloscope connected to the various clock signals will tell you
> if the clock frequencies are correct.
>
> have you checked the startup scripts/macros that are enabled in the
> CCS to assure your code is performing the very same operations?
>
> R. Williams
>
> ---------- Original Message -----------
> From: B S
> To: Richard Williams
> Sent: Sat, 3 Mar 2012 15:44:09 -0800 (PST)
> Subject: Re: [c6x] Code not wroking while booting up from Flash- 6713 DSK
>
> > R. Williams,
> >
> > Thanks for your help.
> >
> > I am using boot loader to copy the code to RAM. Writing to Flash part
> > is
> also working fine, I checked with different examples.
> >
> > I don't know why it is showing peak for 50 kHz signal. Is there any
> > way to see if DSP OR ADC clock is not running with the rate as they
> > should be ?
> >
> > Regards,
> >
> > BAS
> >
> > ________________________________
> > From: Richard Williams
> > To: B S ; "c..."
> > Sent: Thursday, March 1, 2012 9:59 PM Subject:
> > Re: [c6x] Code not wroking while booting up from Flash- 6713 DSK
> >
> >
>
> > B.S.,
> >
> > Without examining the code, I can only make educated guesses and
recommendations.
> >
> > My guess:
> > When running from FLASH, a lot of data is being missed.
> > Most likely because FLASH is many times slower than RAM, so the
> > program falls behind the data.
> >
> > My recommendations:
> > 1) at boot, copy the code to ram and perform the data capture from
> > code running in RAM. 2) use the DMA/EDMA facilities and double buffering.
> > 3) only save the results of the FFT to FLASH rather than every datum,
> > as writing to FLASH is S...L...O...W. 4) use interrupts for data
> > collection and use a software interrupt to perform the FFT.
> >
> > R. Williams
> >
> > ---------- Original Message -----------
> > From: B S
> >
> To: "c..."
> > Sent: Thu, 1 Mar 2012 06:16:49 -0800 (PST)
> > Subject: [c6x] Code not wroking while booting up from Flash- 6713 DSK
> >
> > > Hi Guys,
> > >
> > > I have 6713 DSK attached with ADC which is sampling signal with
> > > maximum frequency 150 kHz then computing FFT. I burn all the codes to
> > > boot from Flash and it is working quite fine. After FFT I am writing
> > > FFT values to Flash memory.
> > >
> > > For some reason, I am not getting the correct FFT peak from the values
> > > saved in Flash. I am sampling 10 kHz signal and the peak shows as it
> > > was 50 kHz signal. When I run the same code with CCS, it shows the
> > > peak at right sample
> i.e., 10 kHz.
> > >
> > > I am wondering what is causing the change of sampling frequency while
> > > booting up from Flash ?
> > >
> > > I will appreciate if some one comment on this issue.
> > >
> > > Regards,
> > > BAS
> > ------- End of Original Message -------
> >
> >
> ------- End of Original Message -------
------- End of Original Message -------