Forums

Reading Timer register on the fly

Started by christian_rosnoblet October 27, 2004

Hello all,

I am using the timer A chanel 3 to generate a overlfow interrupt a a
fixed period on my DSP56F807.
For order job, i want, in my main loop, to read the value of the
counter on the fly. I reading directly the Counter (CNTR) register
and when read a second time this register the value is always null,
as if reading the counter register reset the regsiter and stop the
timer.
The documentation of user manual (chapiter 14) is not explicit about
reading counter on the fly. Is there other documentation on using
timer more complete?
Is someone use directely the counter regsiter? and how?
What is the used of the Hold Register (the documentation is not
explicit...)

Thanks for help

Christian




hello Christian...you can directly read the counter
register to see value of the counter....

like that:
//*************************
unsigned int cnt1;

void main(void)
{
PE_low_level_init(); PESL(TMRA0, QT_WRITE_CONTROL_REG, 0b0011000000000000);
PESL(TMRA0, QT_WRITE_COMPARE_REG1, 0xFFFF);

cnt1 = PESL(TMRA0, QT_READ_COUNTER_REG, ...);

cnt1 = PESL(TMRA0, QT_READ_COUNTER_REG, ...);

}

also you can use other functions to read and write
registrers(like getReg16())..

here is important point: in debug mode when you stop
the program, counter continues to run....
//************************************************
--- christian_rosnoblet <>
wrote:

>
> Hello all,
>
> I am using the timer A chanel 3 to generate a
> overlfow interrupt a a
> fixed period on my DSP56F807.
> For order job, i want, in my main loop, to read the
> value of the
> counter on the fly. I reading directly the Counter
> (CNTR) register
> and when read a second time this register the value
> is always null,
> as if reading the counter register reset the
> regsiter and stop the
> timer.
> The documentation of user manual (chapiter 14) is
> not explicit about
> reading counter on the fly. Is there other
> documentation on using
> timer more complete?
> Is someone use directely the counter regsiter? and
> how?
> What is the used of the Hold Register (the
> documentation is not
> explicit...)
>
> Thanks for help
>
> Christian >
>


__________________________________________________




RE: [motoroladsp] Reading Timer register on the fly

The hold registers are used to read multiple counters when the counters are in cascade count mode.  When a counter is read, the other cascaded counter values are latched in the hold registers, so that they can subsequently be read independent of there actual count value following the initial counter read.  They will be reloaded on a read of any counter register in the group.  Thus, random reading of counter registers can upset a latched, multi-counter value.

-----Original Message-----
From: christian_rosnoblet [mailto:C...@Rotronics.com]
Sent: Wednesday, October 27, 2004 12:51 PM
To: m...@yahoogroups.com
Subject: [motoroladsp] Reading Timer register on the fly

Hello all,

I am using the timer A chanel 3 to generate a overlfow interrupt a a
fixed period on my DSP56F807.
For order job, i want, in my main loop, to read the value of the
counter on the fly. I reading directly the Counter (CNTR) register
and when read a second time this register the value is always null,
as if reading the counter register reset the regsiter and stop the
timer.
The documentation of user manual (chapiter 14) is not explicit about
reading counter on the fly. Is there other documentation on using
timer more complete?
Is someone use directely the counter regsiter? and how?
What is the used of the Hold Register (the documentation is not
explicit...)

Thanks for help

Christian


------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/PNArlB/TM
--------------------------------~->

_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer.  You need to do a "reply all" if you want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:  m...@yahoogroups.com

To Post:  m...@yahoogroups.com

To Leave: m...@yahoogroups.com

Archives: http://www.yahoogroups.com/group/motoroladsp

More Groups: http://www.dsprelated.com/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 e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender. This footnote also confirms that this e-mail message has been scanned by MessageLabs in accordance with the Giddings Lewis, LLC e-mail policy.