Sign in

username:

password:



Not a member?

Search adsp



Search tips

Subscribe to adsp



adsp by Keywords

AD1819 | AD7332 | ADSP-2106 | ADSP-21060 | ADSP-21065L | ADSP-2116 | ADSP-21160M | ADSP-2181 | ADSP-218x | ADSP-219 | ADSP-2199 | ADSP219 | BF531 | BF532 | BF533 | BF535 | Blackfin | FFT | JTAG | LDF | SDRAM | SHARC | SPORT | UART | VDSP++ | VisualDSP

Discussion Groups

Discussion Groups | Analog Devices DSPs | Doubt - Blackfin Serial Port

Technical discussions related to Analog Devices DSPs (including Blackfin, TigerSHARC, SHARC and ADSP-21xx DSPs).

  

Post a new Thread

Doubt - Blackfin Serial Port - Vikas Chandra Rao - May 11 8:48:00 2004



Dear Sir/Madam, 
 
We are using BF531 DSP for our application. We want to use serial port(SPORT1) as a counter. So, we have given an external clock for TSCLK1 pin. We want to divide it by 8 and give the output to TFS1 pin. We have made the register settings as follows. Still we are not able to get any output from TFS1 pin. Can you please let me know how exactly should we do it? Should we pass any data to the data register(SPORT1_TX) also? Will any interrupt be caused by SPORT1 for this operation.
 
SPORT1_TFSDIV = 7;
SPORT1_RCR1 = 0x0200;
SPORT1_RCR2 = 0x000F;
SPORT1_TCR2 = 0x0003;
SPORT1_TCR1 = 0x0201; 
 
Thanks & Regards, 
Vikas.
 






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

memory corruption - Liyju Janardhan - May 19 5:23:00 2004

Hi,

I am working on adsp-20160 processor, vdsp++ 3.0.

In my application I am calling an assembly
routine from C program.
The assmebly function which I am calling is not an
leaf function. There a call for another assmebly
function from that function.
For example I am using this statement: call fir(db);
in the assembly routine.

When I comment this statement everything is work fine.
But when I uncomment it, some of the data array is
getting corrupted.

I am using some of call-preserved registers, but
before
using I am saving it and restore it back before
returing.

There are few interrupt which is acting during the
execution of the function. Here I am using interrupt()
function which save all scratch register and loop
stack.

My question is, (1)When I am saving and restoring I0
register do I need to do the same with the
corresponding B0 and L0 registers.

(2)What care should be taken with the registers when
using interrupts?

Please help

Regards

Liyju

__________________________________





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

Re: memory corruption - Mike Rosing - May 19 16:46:00 2004

On Tue, 18 May 2004, Liyju Janardhan wrote:

> My question is, (1)When I am saving and restoring I0
> register do I need to do the same with the
> corresponding B0 and L0 registers.

Yes.

> (2)What care should be taken with the registers when
> using interrupts?

The simplest thing to do is to use the alternate register set
in interrupts. So you set one or 2 bits in MODE1 when
entering, clear them when leaving and your main program can
use the primary registers with out interference. It's a
very fast way to do context changes and you don't have to
worry about how long it takes - it's just 2 cycles of overhead
no matter how many registers you use.

Patience, persistence, truth,
Dr. mike





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

Re: memory corruption - Liyju Janardhan - May 21 13:04:00 2004



My main program is C language, aslo all my
isr is also written in C.
C runtime model does not use alternate registers.

As I have written a function in assembly which
I am calling from my C program.
And this assembly function is calling another
assembly routine which is causing the problem
of memory corruption.

I have solved the problem by using a leaf fuction.

I guess I can use the alternate register in my
assembly function and my main program will be
free to use the primary registers.

Thanks for the help.

Regards

Liyju

--- Mike Rosing <> wrote:
> On Tue, 18 May 2004, Liyju Janardhan wrote:
>
> > My question is, (1)When I am saving and restoring
> I0
> > register do I need to do the same with the
> > corresponding B0 and L0 registers.
>
> Yes.
>
> > (2)What care should be taken with the registers
> when
> > using interrupts?
>
> The simplest thing to do is to use the alternate
> register set
> in interrupts. So you set one or 2 bits in MODE1
> when
> entering, clear them when leaving and your main
> program can
> use the primary registers with out interference.
> It's a
> very fast way to do context changes and you don't
> have to
> worry about how long it takes - it's just 2 cycles
> of overhead
> no matter how many registers you use.
>
> Patience, persistence, truth,
> Dr. mike >
> _____________________________________
> /groups.php3
>
> Yahoo! Groups Links __________________________________




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