Sign in

username:

password:



Not a member?

Search motoroladsp



Search tips

Subscribe to motoroladsp



motoroladsp by Keywords

56303 | 563xx | 5680 | 56805 | 5680x | 56F80 | 56F800DEMO | 56F805 | 56f807 | 56F830 | ADC | Bootloader | Codec | CodeWarrior | CW5 | CW6 | Debugger | DSP56303 | DSP56303EVM | DSP563xx | DSP5680 | DSP56800 | DSP56807 | DSP56858 | DSP56858EVM | DSP56F803 | DSP56F805 | DSP56F807 | DSP56F80x | DSP56F826 | DSP56F827 | DSP56F8xx | EVM | FFT | Flash_over_jtag | GPIO | Interrupt | Interrupts | JTAG | LCD | Linker | MCF5307 | Metrowerks | Modulus | MSCAN | PCMaster | PWM | Quad | Rif | RTOS | SDK | SPI

Discussion Groups

Discussion Groups | Freescale DSPs | Question on Quad Timer

Technical discussions about Freescale (Motorola) DSPs (including the DSP56000, DSP56300, DSP56600, 56800 DSPs).

  

Post a new Thread

Question on Quad Timer - praveen - Jul 6 20:45:00 2004



Hi All Anyone Know how the calculation is done in the case of a quad timer.

I am using DSP56f801, the IP bus is configured at 40 Mhz.

const qt_sState quadParam0=
{
/* Mode = */ qtCount,
/* InputSource = */ qtPrescalerDiv128,
/* InputPolarity = */ qtNormal,
/* SecondaryInputSource = */ 0,

/* CountFrequency = */ qtOnce,
/* CountLength = */ qtUntilCompare,
/* CountDirection = */ qtDown,

/* OutputMode = */ qtAssertWhileActive,
/* OutputPolarity = */ qtNormal,
/* OutputDisabled = */ 1,

/* Master = */ 0,
/* OutputOnMaster = */ 0,
/* CoChannelInitialize = */ 0,
/* AssertWhenForced = */ 0,

/* CaptureMode = */ qtDisabled,

/* CompareValue1 = */ 0x8000,
/* CompareValue2 = */ 0,
/* InitialLoadValue = */ 0xFFFF,

/* CallbackOnCompare = */ { CallBackOnCompare0, 0 },
/* CallbackOnOverflow = */ { 0, 0 },
/* CallbackOnInputEdge = */ { 0, 0 }}

I like to know what will be the time interval with which the
callback functions will be called if i use the above configuration.

Please give the formula for calculation.

Thanks
Praveen





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

RE: Question on Quad Timer - Johnson, Jerry - Jul 6 21:11:00 2004

RE: [motoroladsp] Question on Quad Timer

for the 56F8xx family, it might be: (65535 - 0) * 128 * 25 = nanoseconds, or 209.712 milliseconds from the time that the counter is enabled.

Add to that, context save time, and interrupt latency.

25ns = period for 40MhzCounting.
128 = prescaler.
65535 = preload value.
0 = compare value (compare register 2 for count down operation).

Jerry.

> -----Original Message-----
> From: praveen [mailto:p...@yahoo.co.in]
> Sent: Tuesday, July 06, 2004 3:46 PM
> To: m...@yahoogroups.com
> Subject: [motoroladsp] Question on Quad Timer
>
>
> Hi All
>
>
> Anyone Know  how the calculation is done in the case of a quad timer.
>
> I am using DSP56f801, the IP bus is configured at 40 Mhz.
>
> const qt_sState quadParam0=
>             &nbs p;               {
>  /* Mode = */               &nb sp;       qtCount,
>     /* InputSource = */             qtPrescalerDiv128,
>     /* InputPolarity = */           qtNormal,
>     /* SecondaryInputSource = */    0,
>
>     /* CountFrequency = */          qtOnce,
>     /* CountLength = */             qtUntilCompare,
>     /* CountDirection = */          qtDown,
>
>     /* OutputMode = */              qtAssertWhileActive,
>     /* OutputPolarity = */          qtNormal,
>     /* OutputDisabled = */          1,
>
>     /* Master = */               &nb sp;  0,
>     /* OutputOnMaster = */          0,
>     /* CoChannelInitialize = */     0,
>     /* AssertWhenForced = */        0,
>
>     /* CaptureMode = */             qtDisabled,
>
>     /* CompareValue1 = */           0x8000,
>     /* CompareValue2 = */           0,
>     /* InitialLoadValue = */        0xFFFF,
>
>     /* CallbackOnCompare = */       { CallBackOnCompare0, 0 },
>     /* CallbackOnOverflow = */      { 0, 0 },
>     /* CallbackOnInputEdge = */     { 0, 0 }}
>
> I  like to know what will be the time interval with which the
> callback functions will be called if i use the above configuration.
>
>  Please give the formula for calculation.
>
> Thanks
> Praveen 
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~-->
> Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
> Now with Pop-Up Blocker. Get it for free!
> http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/PNArlB/TM
> --------------------------------------------------------------
> ------~->
>
> _____________________________________
> /groups.php3

> Yahoo! Groups Links
>
>

>
>
> ______________________________________________________________
> __________
> This email has been scanned for all viruses by the MessageLabs SkyScan
> service. For more information visit http://www.messagelabs.com
> ______________________________________________________________
> __________
>


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information visit http://www.messagelabs.com
________________________________________________________________________


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

RE: Question on Quad Timer - Ebersman, Howard - Jul 6 21:48:00 2004

You take the IPbus and divide by the prescaler to get the timer period.
 
Then, you look at the mode to find out how many ticks between interrupts. Generally it this is equal to the compare value minus the load value. This can be a little tricky for PWM modes and such. There are 2 compare values for some modes.
 
Hope this helps.
Howard
-----Original Message-----
From: praveen [mailto:p...@yahoo.co.in]
Sent: Tuesday, July 06, 2004 4:46 PM
To: m...@yahoogroups.com
Subject: [motoroladsp] Question on Quad Timer

Hi AllAnyone Know  how the calculation is done in the case of a quad timer.

I am using DSP56f801, the IP bus is configured at 40 Mhz.

const qt_sState quadParam0=
               &nb sp;            {
/* Mode = */               &nb sp;       qtCount,
    /* InputSource = */             qtPrescalerDiv128,
    /* InputPolarity = */           qtNormal,
    /* SecondaryInputSource = */    0,

    /* CountFrequency = */          qtOnce,
    /* CountLength = */             qtUntilCompare,
    /* CountDirection = */          qtDown,

    /* OutputMode = */              qtAssertWhileActive,
    /* OutputPolarity = */          qtNormal,
    /* OutputDisabled = */          1,

    /* Master = */               &nb sp;  0,
    /* OutputOnMaster = */          0,
    /* CoChannelInitialize = */     0,
    /* AssertWhenForced = */        0,

    /* CaptureMode = */             qtDisabled,

    /* CompareValue1 = */           0x8000,
    /* CompareValue2 = */           0,
    /* InitialLoadValue = */        0xFFFF,

    /* CallbackOnCompare = */       { CallBackOnCompare0, 0 },
    /* CallbackOnOverflow = */      { 0, 0 },
    /* CallbackOnInputEdge = */     { 0, 0 }}

I  like to know what will be the time interval with which the
callback functions will be called if i use the above configuration.

Please give the formula for calculation.

Thanks
Praveen 


_____________________________________
/groups.php3





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

Re: Question on Quad Timer - praveen - Jul 7 2:09:00 2004

Thanks to both of you Then according to the formula the time should be 0.1 sec .But i used
in the following code to switch on /off a LED.

just a skeleton code
void main()

{

// LED drivers declared

// timer drivers declared

count =0
interrupt =TRUE

while(1)
{

if(interrupt = TRUE)
{
switch(count %2)
{

case 0 :off

case 1: true

}
}
}
}

// outside main

call back function declared
{
count = count+1;

}

But the time difference between the LED on /off is around 5 sec.Why
so much difference from 0.1 sec to 5 sec.

Please reply .

Thanks

Praveen --- In , "Ebersman, Howard"
<HEbersman@m...> wrote:
> You take the IPbus and divide by the prescaler to get the timer
period.
>
> Then, you look at the mode to find out how many ticks between
interrupts.
> Generally it this is equal to the compare value minus the load
value. This
> can be a little tricky for PWM modes and such. There are 2 compare
values
> for some modes.
>
> Hope this helps.
> Howard
>
> -----Original Message-----
> From: praveen [mailto:powerarm2001@y...]
> Sent: Tuesday, July 06, 2004 4:46 PM
> To:
> Subject: [motoroladsp] Question on Quad Timer > Hi All > Anyone Know how the calculation is done in the case of a quad
timer.
>
> I am using DSP56f801, the IP bus is configured at 40 Mhz.
>
> const qt_sState quadParam0=
> {
> /* Mode = */ qtCount,
> /* InputSource = */ qtPrescalerDiv128,
> /* InputPolarity = */ qtNormal,
> /* SecondaryInputSource = */ 0,
>
> /* CountFrequency = */ qtOnce,
> /* CountLength = */ qtUntilCompare,
> /* CountDirection = */ qtDown,
>
> /* OutputMode = */ qtAssertWhileActive,
> /* OutputPolarity = */ qtNormal,
> /* OutputDisabled = */ 1,
>
> /* Master = */ 0,
> /* OutputOnMaster = */ 0,
> /* CoChannelInitialize = */ 0,
> /* AssertWhenForced = */ 0,
>
> /* CaptureMode = */ qtDisabled,
>
> /* CompareValue1 = */ 0x8000,
> /* CompareValue2 = */ 0,
> /* InitialLoadValue = */ 0xFFFF,
>
> /* CallbackOnCompare = */ { CallBackOnCompare0, 0 },
> /* CallbackOnOverflow = */ { 0, 0 },
> /* CallbackOnInputEdge = */ { 0, 0 }}
>
> I like to know what will be the time interval with which the
> callback functions will be called if i use the above configuration.
>
> Please give the formula for calculation.
>
> Thanks
> Praveen >
>
> _____________________________________
> /groups.php3
> <http://www.dsprelated.com/groups.php3 >
>
> Yahoo! Groups Sponsor
>
> ADVERTISEMENT <http://us.ard.yahoo.com/SIG=1297bujej/M=295196.4901138.6071305.300117
6/D=gr
>
oups/S=1705771855:HM/EXP=1089233380/A=2128215/R=0/SIG=10se96mf6/*http:
//comp
> anion.yahoo.com> click here
>
> <http://us.adserver.yahoo.com/l?
M=295196.4901138.6071305.3001176/D=groups/S=
> :HM/A=2128215/rand=540290140 > _____
>
> > .




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