Hey guys im having a issue running timer1. Im not sure if its Crossworks or the
actual code.
Im using Crossworks 2
My code is:
T1TCR=0x0;
T1TC=0x01;
T1PR=0x0;
T1PC=0x0;
T1MCR=0x6; // Reset & Stop on match
T1MR0P000; // Timer 1 Match Reg
T1TCR=0x1; // Start timer
The issue is T1TC value doesnt increment past 1. It starts on 0 then 1 then no
more. It stays on 1.
Any thoughts?
LPC210x Timer1 help
Started by ●November 10, 2010
Reply by ●November 10, 20102010-11-10
Are you servicing the interrupt?
DaveS
On Wed, Nov 10, 2010 at 11:24 AM, Jason wrote:
> Hey guys im having a issue running timer1. Im not sure if its Crossworks or
> the actual code.
>
> Im using Crossworks 2
>
> My code is:
>
> T1TCR=0x0;
> T1TC=0x01;
> T1PR=0x0;
> T1PC=0x0;
> T1MCR=0x6; // Reset & Stop on match
> T1MR0P000; // Timer 1 Match Reg
> T1TCR=0x1; // Start timer
>
> The issue is T1TC value doesnt increment past 1. It starts on 0 then 1 then
> no more. It stays on 1.
>
> Any thoughts?
>
>
>
DaveS
On Wed, Nov 10, 2010 at 11:24 AM, Jason wrote:
> Hey guys im having a issue running timer1. Im not sure if its Crossworks or
> the actual code.
>
> Im using Crossworks 2
>
> My code is:
>
> T1TCR=0x0;
> T1TC=0x01;
> T1PR=0x0;
> T1PC=0x0;
> T1MCR=0x6; // Reset & Stop on match
> T1MR0P000; // Timer 1 Match Reg
> T1TCR=0x1; // Start timer
>
> The issue is T1TC value doesnt increment past 1. It starts on 0 then 1 then
> no more. It stays on 1.
>
> Any thoughts?
>
>
>
Reply by ●November 10, 20102010-11-10
Hello David,
Wednesday, November 10, 2010, 7:47:56 PM, you wrote:
Are you servicing the interrupt? DaveS On Wed, Nov 10, 2010 at 11:24 AM, Jason <a...@gmail.com> wrote: Hey guys im having a issue running timer1. Im not sure if its Crossworks or the actual code. Im using Crossworks 2 |
Who cares, really?
http://sonsivri.com/forum/index.php?topic'488.0
-- Paul.
__._,_.___
__,_._,___
Reply by ●November 10, 20102010-11-10
Hey DaveS I have interrupts disabled... I think...
T1MCR=0x4;
Bit 2 aka MR0S is the only bit set which should stop on MR0.
From Manual:
BIT of T1MCR
VALUE of BIT
0 MR0I
1 Interrupt on MR0: an interrupt is generated when MR0
matches the value in the TC.
0 This interrupt is disabled
1 MR0R
1 Reset on MR0: the TC will be reset if MR0 matches it. 0
0 Feature disabled.
2 MR0S
1 Stop on MR0: the TC and PC will be stopped and TCR[0]
will be set to
0 if MR0 matches the TC.
--- In l..., David Smead wrote:
>
> Are you servicing the interrupt?
>
> DaveS
>
> On Wed, Nov 10, 2010 at 11:24 AM, Jason wrote:
>
T1MCR=0x4;
Bit 2 aka MR0S is the only bit set which should stop on MR0.
From Manual:
BIT of T1MCR
VALUE of BIT
0 MR0I
1 Interrupt on MR0: an interrupt is generated when MR0
matches the value in the TC.
0 This interrupt is disabled
1 MR0R
1 Reset on MR0: the TC will be reset if MR0 matches it. 0
0 Feature disabled.
2 MR0S
1 Stop on MR0: the TC and PC will be stopped and TCR[0]
will be set to
0 if MR0 matches the TC.
--- In l..., David Smead wrote:
>
> Are you servicing the interrupt?
>
> DaveS
>
> On Wed, Nov 10, 2010 at 11:24 AM, Jason wrote:
>
Reply by ●November 10, 20102010-11-10
Suggest;
T1TCR=2; // stop and reset the timer
T1PR=0; // prescale by 1
Then do:
> T1MCR=0x6; // Reset & Stop on match
> T1MR0P000; // Timer 1 Match Reg
> T1TCR=0x1; // Start timer
>
...Laurie:{)
On 11/11/2010, at 6:24 AM, "Jason" wrote:
> Hey guys im having a issue running timer1. Im not sure if its Crossworks or the actual code.
>
> Im using Crossworks 2
>
> My code is:
>
> T1TCR=0x0;
> T1TC=0x01;
> T1PR=0x0;
> T1PC=0x0;
> T1MCR=0x6; // Reset & Stop on match
> T1MR0P000; // Timer 1 Match Reg
> T1TCR=0x1; // Start timer
>
> The issue is T1TC value doesnt increment past 1. It starts on 0 then 1 then no more. It stays on 1.
>
> Any thoughts?
T1TCR=2; // stop and reset the timer
T1PR=0; // prescale by 1
Then do:
> T1MCR=0x6; // Reset & Stop on match
> T1MR0P000; // Timer 1 Match Reg
> T1TCR=0x1; // Start timer
>
...Laurie:{)
On 11/11/2010, at 6:24 AM, "Jason" wrote:
> Hey guys im having a issue running timer1. Im not sure if its Crossworks or the actual code.
>
> Im using Crossworks 2
>
> My code is:
>
> T1TCR=0x0;
> T1TC=0x01;
> T1PR=0x0;
> T1PC=0x0;
> T1MCR=0x6; // Reset & Stop on match
> T1MR0P000; // Timer 1 Match Reg
> T1TCR=0x1; // Start timer
>
> The issue is T1TC value doesnt increment past 1. It starts on 0 then 1 then no more. It stays on 1.
>
> Any thoughts?
Reply by ●November 10, 20102010-11-10
Thanks but still a no go. would timer code run in ARM SIM mode? Thats what im
trying. The code locks up but on Actual ARM it runs fine but im unable to check
timing to ensure i got it right.
Any thoughs?
--- In l..., Laurie Gellatly wrote:
>
> Suggest;
> T1TCR=2; // stop and reset the timer
> T1PR=0; // prescale by 1
> Then do:
>
> > T1MCR=0x6; // Reset & Stop on match
> > T1MR0P000; // Timer 1 Match Reg
> > T1TCR=0x1; // Start timer
> >
> ...Laurie:{)
>
> On 11/11/2010, at 6:24 AM, "Jason" wrote:
>
Any thoughs?
--- In l..., Laurie Gellatly wrote:
>
> Suggest;
> T1TCR=2; // stop and reset the timer
> T1PR=0; // prescale by 1
> Then do:
>
> > T1MCR=0x6; // Reset & Stop on match
> > T1MR0P000; // Timer 1 Match Reg
> > T1TCR=0x1; // Start timer
> >
> ...Laurie:{)
>
> On 11/11/2010, at 6:24 AM, "Jason" wrote:
>
Reply by ●November 10, 20102010-11-10
Think you answered your own question if you tell me that it works correctly on
the real hardware and not in the simulator.
...Laurie:{)
On 11/11/2010, at 8:57 AM, "Jason" wrote:
>
> Thanks but still a no go. would timer code run in ARM SIM mode? Thats what im trying. The code locks up but on Actual ARM it runs fine but im unable to check timing to ensure i got it right.
>
> Any thoughs?
>
> --- In l..., Laurie Gellatly wrote:
> >
> > Suggest;
> > T1TCR=2; // stop and reset the timer
> > T1PR=0; // prescale by 1
> > Then do:
> >
> > > T1MCR=0x6; // Reset & Stop on match
> > > T1MR0P000; // Timer 1 Match Reg
> > > T1TCR=0x1; // Start timer
> > >
> > ...Laurie:{)
> >
> >
> >
> > On 11/11/2010, at 6:24 AM, "Jason" wrote:
> >
...Laurie:{)
On 11/11/2010, at 8:57 AM, "Jason" wrote:
>
> Thanks but still a no go. would timer code run in ARM SIM mode? Thats what im trying. The code locks up but on Actual ARM it runs fine but im unable to check timing to ensure i got it right.
>
> Any thoughs?
>
> --- In l..., Laurie Gellatly wrote:
> >
> > Suggest;
> > T1TCR=2; // stop and reset the timer
> > T1PR=0; // prescale by 1
> > Then do:
> >
> > > T1MCR=0x6; // Reset & Stop on match
> > > T1MR0P000; // Timer 1 Match Reg
> > > T1TCR=0x1; // Start timer
> > >
> > ...Laurie:{)
> >
> >
> >
> > On 11/11/2010, at 6:24 AM, "Jason" wrote:
> >
Reply by ●November 10, 20102010-11-10
Hey Laurie you would be or probably are correct but its a pain not being able to
test the actual output since i dont have a logic analyzer or oscilloscope.
Thats why i wanted to test in simulator to ensure the actual values was correct.
Thanks
--- In l..., Laurie Gellatly wrote:
>
> Think you answered your own question if you tell me that it works correctly on the real hardware and not in the simulator.
>
> ...Laurie:{)
>
Thats why i wanted to test in simulator to ensure the actual values was correct.
Thanks
--- In l..., Laurie Gellatly wrote:
>
> Think you answered your own question if you tell me that it works correctly on the real hardware and not in the simulator.
>
> ...Laurie:{)
>
Reply by ●November 11, 20102010-11-11
I noticed that people didn't care if the software was illegal but
maybe they should;
1. Hackers who have illegal software are supported, that encourage
others to do the same. Stolen software is cheap.
2. Lower sales volumes can make small vendors go out of business, so
we have fewer choices of software available.
The larger vendors can afford to protect their investments with more
protective measures so they are not as affected as the smaller
vendors. All you end up with is larger vendors that don't listen to
customers very well.
Actions have consequences so maybe all of us should care.
At 02:38 PM 11/10/2010, you wrote:
>Hello David,
>
>Wednesday, November 10, 2010, 7:47:56 PM, you wrote:
>
>Are you servicing the interrupt?
>
>DaveS
>
>On Wed, Nov 10, 2010 at 11:24 AM, Jason
><a...@gmail.com> wrote:
>
>Hey guys im having a issue running timer1. Im not sure if its
>Crossworks or the actual code.
>
>Im using Crossworks 2
>Who cares, really?
>
>http://sonsivri.com/forum/index.php?topic'488.0
>-- Paul.
Cecil
k5nwa
< www.softrockradio.org > < www.qrpradio.com >
< http://parts.softrockradio.org/ >
Never take life seriously. Nobody gets out alive anyway.
maybe they should;
1. Hackers who have illegal software are supported, that encourage
others to do the same. Stolen software is cheap.
2. Lower sales volumes can make small vendors go out of business, so
we have fewer choices of software available.
The larger vendors can afford to protect their investments with more
protective measures so they are not as affected as the smaller
vendors. All you end up with is larger vendors that don't listen to
customers very well.
Actions have consequences so maybe all of us should care.
At 02:38 PM 11/10/2010, you wrote:
>Hello David,
>
>Wednesday, November 10, 2010, 7:47:56 PM, you wrote:
>
>Are you servicing the interrupt?
>
>DaveS
>
>On Wed, Nov 10, 2010 at 11:24 AM, Jason
><a...@gmail.com> wrote:
>
>Hey guys im having a issue running timer1. Im not sure if its
>Crossworks or the actual code.
>
>Im using Crossworks 2
>Who cares, really?
>
>http://sonsivri.com/forum/index.php?topic'488.0
>-- Paul.
Cecil
k5nwa
< www.softrockradio.org > < www.qrpradio.com >
< http://parts.softrockradio.org/ >
Never take life seriously. Nobody gets out alive anyway.
Reply by ●November 11, 20102010-11-11
--- In l..., k5nwa wrote:
>
> I noticed that people didn't care if the software was illegal but
> maybe they should;
>
> 1. Hackers who have illegal software are supported, that encourage
> others to do the same. Stolen software is cheap.
> 2. Lower sales volumes can make small vendors go out of business, so
> we have fewer choices of software available.
>
> The larger vendors can afford to protect their investments with more
> protective measures so they are not as affected as the smaller
> vendors. All you end up with is larger vendors that don't listen to
> customers very well.
>
> Actions have consequences so maybe all of us should care.
>
That link posted earlier leads to a pretty outrageous thread. Considering the quality of Crossworks and the availability of a personal license, all these attempts to crack the protection are nonsense.
Buy the personal license, install the software and kick back.
OTOH, YAGARTO (with Eclipse & GNU GCC) is 'free' (as 'free' is defined in the Linux world). It is a perfectly capable toolchain and no theft is required.
http://yagarto.de/
In the Linux world, it is pretty trivial to just build the GNU toolchain from source. The instructions are all over the Internet including:
http://gnuarm.com/support.html
The sources for version 4.1 of the toolchain are in
http://gnuarm.com/files.html
Note that the current incantation of YAGARTO is up to ver 4.5 of GCC.
Richard
>
> I noticed that people didn't care if the software was illegal but
> maybe they should;
>
> 1. Hackers who have illegal software are supported, that encourage
> others to do the same. Stolen software is cheap.
> 2. Lower sales volumes can make small vendors go out of business, so
> we have fewer choices of software available.
>
> The larger vendors can afford to protect their investments with more
> protective measures so they are not as affected as the smaller
> vendors. All you end up with is larger vendors that don't listen to
> customers very well.
>
> Actions have consequences so maybe all of us should care.
>
That link posted earlier leads to a pretty outrageous thread. Considering the quality of Crossworks and the availability of a personal license, all these attempts to crack the protection are nonsense.
Buy the personal license, install the software and kick back.
OTOH, YAGARTO (with Eclipse & GNU GCC) is 'free' (as 'free' is defined in the Linux world). It is a perfectly capable toolchain and no theft is required.
http://yagarto.de/
In the Linux world, it is pretty trivial to just build the GNU toolchain from source. The instructions are all over the Internet including:
http://gnuarm.com/support.html
The sources for version 4.1 of the toolchain are in
http://gnuarm.com/files.html
Note that the current incantation of YAGARTO is up to ver 4.5 of GCC.
Richard