<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Timer interrupt on lpc3250</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/25299/timer-interrupt-on-lpc3250</link><description> 
Hi, 

 
I am trying to get timer interrupts every second and update a
variable. I use timer0 and do the settings as follows: 

 
TIMCLK_CTRL1 = 0x04; //enable timer0 clock
T0CTCR = 0x00; //use as a timer
T0TCR = 0x01; //enable timer
T0PR = 12999999;</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Timer interrupt on lpc3250</title><link>https://community.arm.com/thread/147582?ContentTypeID=1</link><pubDate>Fri, 22 Jan 2010 00:16:17 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8e2326c1-d369-4cba-a302-38fac8b9b02f</guid><dc:creator>Non Keil Related</dc:creator><description>&lt;p&gt;&lt;p&gt;
I think you should re-examine your solution.&lt;/p&gt;

&lt;p&gt;
You preserve registers R0 to R3 in the ISR and those registers
certainly CAN be used to release the source of the interrupt.&lt;/p&gt;

&lt;p&gt;
Hint: The function you call from your ISR (C_Irq_Handler), what
registers do you think that might use? Were they being preserved in
your original code? These questions would be specific to the ARM core
(not specific to a particular ARM device) and the ABI.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer interrupt on lpc3250</title><link>https://community.arm.com/thread/146494?ContentTypeID=1</link><pubDate>Thu, 21 Jan 2010 23:26:14 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:01953d6b-e205-43fd-95ad-b8f09dfb1dde</guid><dc:creator>Tamir Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
what do you mean you &amp;quot;think&amp;quot;. has the user manual told you that?!
I don&amp;#39;t know your chip, but if it is like the LPC24xx in register
allocation, your argument is plain wrong!&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer interrupt on lpc3250</title><link>https://community.arm.com/thread/144807?ContentTypeID=1</link><pubDate>Thu, 21 Jan 2010 23:21:03 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e411ab5f-95c7-4cc4-aca5-d13f7ad5b193</guid><dc:creator>Aykut Birsen</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi,&lt;/p&gt;

&lt;p&gt;
I found the solution!!&lt;/p&gt;

&lt;p&gt;
I was using r1, r2 and r3 in the interrupt subroutine. I started
using r9 and r10 and now it is working.&lt;/p&gt;

&lt;p&gt;
I think r1, r2 are reserved registers and we cannot use them to
clear the interrupts.&lt;/p&gt;

&lt;p&gt;
Thanks for you all..&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer interrupt on lpc3250</title><link>https://community.arm.com/thread/142538?ContentTypeID=1</link><pubDate>Thu, 21 Jan 2010 04:24:04 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9cd47dde-3830-4282-9064-41d362dc8984</guid><dc:creator>while ();</dc:creator><description>&lt;p&gt;&lt;p&gt;
You are correct it will be in the new MDK.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer interrupt on lpc3250</title><link>https://community.arm.com/thread/132064?ContentTypeID=1</link><pubDate>Tue, 19 Jan 2010 06:56:58 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:da97a36f-8138-45c9-aae2-7c0f1f48c764</guid><dc:creator>IB Shy</dc:creator><description>&lt;p&gt;&lt;p&gt;
Coskun,&lt;/p&gt;

&lt;p&gt;
I can&amp;#39;t see exactly what you have wrong. Your configuration looks
correct, and what you are doing to acknowledge the interrupt looks
correct.&lt;/p&gt;

&lt;p&gt;
Maybe you should concentrate on your interrupt service routine. Do
you have any other interrupts enabled? Do they mis-behave?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer interrupt on lpc3250</title><link>https://community.arm.com/thread/131827?ContentTypeID=1</link><pubDate>Tue, 19 Jan 2010 06:29:02 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:d7e5f8ec-48c2-4b24-877e-dc21d8e3b0ed</guid><dc:creator>IB Shy</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hmmm,&lt;/p&gt;

&lt;p&gt;
I think I might have found a minor problem with the RL-ARM code
for the LPC3250. Specifically, the function/macro
&lt;i&gt;&lt;b&gt;OS_TFIRQ()&lt;/b&gt;&lt;/i&gt; in RTX_Config.C&lt;/p&gt;

&lt;p&gt;
Will do more checks and if confirmed, pass onto Keil support.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer interrupt on lpc3250</title><link>https://community.arm.com/thread/130589?ContentTypeID=1</link><pubDate>Tue, 19 Jan 2010 06:05:53 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c9d393dc-d40d-46e9-a557-dbfb596221ff</guid><dc:creator>IB Shy</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thanks &lt;i&gt;while(1);&lt;/i&gt;, I&amp;#39;m on that one already. No luck so far
though :(&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer interrupt on lpc3250</title><link>https://community.arm.com/thread/125950?ContentTypeID=1</link><pubDate>Tue, 19 Jan 2010 05:59:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3ad1b52f-a823-4e19-9bf6-52d175c5d1c3</guid><dc:creator>while ();</dc:creator><description>&lt;p&gt;&lt;p&gt;
You can take a look at examples here:&lt;br /&gt;
&lt;a href="http://ics.nxp.com/support/software/lpc32xx.cdl.drivers/"&gt;ics.nxp.com/.../&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
it might help.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer interrupt on lpc3250</title><link>https://community.arm.com/thread/115498?ContentTypeID=1</link><pubDate>Tue, 19 Jan 2010 05:32:54 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:10118809-32fa-4069-a268-670440ef1aad</guid><dc:creator>IB Shy</dc:creator><description>&lt;p&gt;&lt;p&gt;
I think the info &lt;i&gt;while(1);&lt;/i&gt; is providing relates to the high
speed timer, whereas the OP is asking for info on Timer#0.&lt;/p&gt;

&lt;p&gt;
I can&amp;#39;t see any Keil examples that use any of the timers of the
LPC3250 apart from the high speed one.&lt;/p&gt;

&lt;p&gt;
As it happens, I&amp;#39;m looking as something similar right now on the
LPC3250; but a different problem. Using RL-ARM, I can get a periodic
interrupt from Timer#0, until I call &lt;i&gt;isr_evt_set&lt;/i&gt;, then no more
high speed interrupts come through.&lt;/p&gt;

&lt;p&gt;
So I&amp;#39;m also (probably) doing something wrong. Will post again if I
find anything.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer interrupt on lpc3250</title><link>https://community.arm.com/thread/103730?ContentTypeID=1</link><pubDate>Tue, 19 Jan 2010 04:58:20 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8d092078-7121-4bcd-b174-edafc07859d4</guid><dc:creator>while ();</dc:creator><description>&lt;p&gt;&lt;p&gt;
After timer interrupt happens&lt;/p&gt;

&lt;pre&gt;
HSTIM_INT     =  0x06;
MIC_RSR       =  (1 &amp;lt;&amp;lt; 5);
&lt;/pre&gt;

&lt;p&gt;
is done, see if you do write also these registers after interrupt
happens.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer interrupt on lpc3250</title><link>https://community.arm.com/thread/78045?ContentTypeID=1</link><pubDate>Tue, 19 Jan 2010 04:54:32 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:35fc608f-8d93-4d18-a463-ebca0b468677</guid><dc:creator>Aykut Birsen</dc:creator><description>&lt;p&gt;&lt;p&gt;
I looked at the RTX_Blinky example, but couldn&amp;#39;t really get the
solution. Could you further help me please?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer interrupt on lpc3250</title><link>https://community.arm.com/thread/57606?ContentTypeID=1</link><pubDate>Tue, 19 Jan 2010 02:29:24 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f855e020-bc46-4190-8d9f-80960c557072</guid><dc:creator>while ();</dc:creator><description>&lt;p&gt;&lt;p&gt;
Problem is that you are not clearing interrupt correctly.&lt;/p&gt;

&lt;p&gt;
You can look at Keil example for reference in folder:&lt;br /&gt;
\Keil\ARM\Boards\Phytec\LPC3250\RTX_Blinky\ where you installed
MDK.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>