<?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>problem in lpc2138 external interrupt</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/38660/problem-in-lpc2138-external-interrupt</link><description> 
hai 
i am doing basic programs in lpc2138 ARM controller 
problem is exter nal interrupt is only once generates 
but again it is not generate.send me what is the problem.this is my
code 

 
//***************************************************** 

</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: problem in lpc2138 external interrupt</title><link>https://community.arm.com/thread/115466?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2010 01:21:41 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f3873289-4c33-4bfc-9272-583b7452cbcd</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Do you really think that formatting is correct and easy to
read?&lt;/p&gt;

&lt;p&gt;
Look - the instructions really are very clearly stated: &lt;a href="http://www.danlhenry.com/caps/keil_code.png"&gt;www.danlhenry.com/.../keil_code.png&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
If you can miss details as obvious as that, you probably need to
re-read the lpc2138 for any important details that you&amp;#39;ve missed
there!&lt;/p&gt;

&lt;p&gt;
But one thing the instructions don&amp;#39;t mention: use only
&lt;b&gt;spaces&lt;/b&gt; to lay out your code - do &lt;i&gt;&lt;b&gt;not&lt;/b&gt;&lt;/i&gt; use
TABs!&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem in lpc2138 external interrupt</title><link>https://community.arm.com/thread/102027?ContentTypeID=1</link><pubDate>Wed, 06 Jan 2010 21:05:25 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:24ac3aa3-284c-43b5-a1f8-fa33215aed9c</guid><dc:creator>JANGA chinna</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hello Per Westermark&lt;/p&gt;

&lt;p&gt;
i removed printf statement then also it generate only once a
interrupt.VICVectAddr15=0x0000002f;I had passed vector address like
this.&lt;br /&gt;
#include&amp;lt;lpc213x.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
extern void init_serial(void);&lt;br /&gt;
unsigned char temp;&lt;br /&gt;
void EXTINTVectoredIRQ (void)__irq;&lt;br /&gt;
unsigned int x=0;&lt;/p&gt;

&lt;p&gt;
void EXTINTVectoredIRQ (void)__irq&lt;br /&gt;
{&lt;/p&gt;

&lt;p&gt;
x++;&lt;br /&gt;
x=x&amp;lt;&amp;lt;16;&lt;br /&gt;
IO1SET=x;&lt;br /&gt;
EXTINT=0X00000020;&lt;br /&gt;
VICVectAddr15=0x0000002f;&lt;/p&gt;

&lt;p&gt;
}&lt;/p&gt;

&lt;p&gt;
int main()&lt;br /&gt;
{&lt;/p&gt;

&lt;p&gt;
IODIR1=0X00FF0000;&lt;br /&gt;
IODIR0=0X20000000;&lt;br /&gt;
PINSEL1=0X00000000;&lt;br /&gt;
PINSEL0=0X200000C5; //interrupt pin p0.14&lt;br /&gt;
EXTMODE = 0; // LEVEL sensitive mode on EINT1&lt;br /&gt;
EXTPOLAR = 0;&lt;br /&gt;
VICDefVectAddr = 0x0000002f;&lt;br /&gt;
VICIntSelect |=0x00000000;&lt;br /&gt;
VICVectAddr15 |=(unsigned int)EXTINTVectoredIRQ;&lt;br /&gt;
VICVectCntl15 |= 0x0000002f;&lt;br /&gt;
VICIntEnable |=0x00008000;&lt;br /&gt;
while(1)&lt;br /&gt;
{&lt;/p&gt;

&lt;p&gt;
IO1CLR =0X000000ff;&lt;br /&gt;
IOSET1 =0x000000ff;&lt;/p&gt;

&lt;p&gt;
}&lt;/p&gt;

&lt;p&gt;
}&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem in lpc2138 external interrupt</title><link>https://community.arm.com/thread/102028?ContentTypeID=1</link><pubDate>Wed, 06 Jan 2010 20:49:48 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2a4ffd47-99e9-42b1-9f92-e36e32723b7e</guid><dc:creator>JANGA chinna</dc:creator><description>&lt;p&gt;&lt;p&gt;
hello sir&lt;br /&gt;
this is my code this code is enters ISR only once please help me.&lt;/p&gt;

&lt;p&gt;
#include&amp;lt;lpc213x.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
extern void init_serial(void);&lt;br /&gt;
unsigned char temp;&lt;br /&gt;
void EXTINTVectoredIRQ (void)__irq;&lt;br /&gt;
unsigned int x=0;&lt;br /&gt;
void EXTINTVectoredIRQ (void)__irq {&lt;br /&gt;
x++;&lt;br /&gt;
x=x&amp;lt;&amp;lt;16;&lt;br /&gt;
IO1SET=x;&lt;br /&gt;
EXTINT=0X00000020;&lt;br /&gt;
VICVectAddr15=0x0000002f;&lt;br /&gt;
} int main()&lt;br /&gt;
{ IODIR1=0X00FF0000;&lt;br /&gt;
IODIR0=0X20000000;&lt;br /&gt;
PINSEL1=0X00000000;&lt;br /&gt;
PINSEL0=0X200000C5; //interrupt pin p0.14&lt;br /&gt;
EXTMODE = 0; // LEVEL sensitive mode on EINT1&lt;br /&gt;
EXTPOLAR = 0;&lt;br /&gt;
VICDefVectAddr = 0x0000002f;&lt;br /&gt;
VICIntSelect |=0x00000000;&lt;br /&gt;
VICVectAddr15 |=(unsigned int)EXTINTVectoredIRQ;&lt;br /&gt;
VICVectCntl15 |= 0x0000002f;&lt;br /&gt;
VICIntEnable |=0x00008000;&lt;br /&gt;
while(1)&lt;br /&gt;
{ IO1CLR =0X000000ff;&lt;br /&gt;
IOSET1 =0x000000ff;&lt;br /&gt;
} }&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem in lpc2138 external interrupt</title><link>https://community.arm.com/thread/90200?ContentTypeID=1</link><pubDate>Wed, 06 Jan 2010 20:34:32 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:afb87650-5faa-421f-be71-584493b8263e</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Not sure if you did any changes to the code besides removing the
****************.&lt;/p&gt;

&lt;p&gt;
But does the code seems correctly posted this time? Where are the
indenting? Did you really, really read the posting instructions - I
even told you exactly where to read.&lt;/p&gt;

&lt;p&gt;
Your code should look like:&lt;/p&gt;

&lt;pre&gt;
#include &amp;lt;stdio.h&amp;gt;

int main(void) {
    printf(&amp;quot;Hello World!\n&amp;quot;);
    return 0;
}
&lt;/pre&gt;

&lt;p&gt;
&lt;br /&gt;
Why is it so hard to post your code as:&lt;/p&gt;

&lt;pre&gt;
void EXTINTVectoredIRQ (void)__irq {
    unsigned int temp;
    IOCLR1=0XFFFFFFFF;
    EXTINT=0X00000020;
    temp = VICIRQStatus;
    printf(&amp;quot;isr_temp=%x\n&amp;quot;,temp);
    VICVectAddr15=0;
}
&lt;/pre&gt;

&lt;p&gt;
Do you think it will be too easy to read then?&lt;/p&gt;

&lt;p&gt;
And by the way - you still like to use printf() in your interrupt
handler. Have you spent any time pondering the execution time of
printf() yet? Have you considered the amount of stack space you need
to allocate for your interrupt handlers, since they have a separate
stack from the mail code?&lt;/p&gt;

&lt;p&gt;
And have you tried my suggestion about what register to write to
when acknowledging the interrupt?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem in lpc2138 external interrupt</title><link>https://community.arm.com/thread/57544?ContentTypeID=1</link><pubDate>Wed, 06 Jan 2010 20:19:06 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:eda22b99-e757-465d-94a3-1e2a00b3dcad</guid><dc:creator>JANGA chinna</dc:creator><description>&lt;p&gt;&lt;p&gt;
#include&amp;lt;lpc213x.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
extern void init_serial(void);&lt;br /&gt;
unsigned char temp;&lt;br /&gt;
void EXTINTVectoredIRQ (void)__irq;&lt;br /&gt;
void EXTINTVectoredIRQ (void)__irq&lt;br /&gt;
{ unsigned int temp;&lt;br /&gt;
IOCLR1=0XFFFFFFFF;&lt;br /&gt;
EXTINT=0X00000020;&lt;br /&gt;
temp = VICIRQStatus;&lt;br /&gt;
printf(&amp;quot;isr_temp=%x\n&amp;quot;,temp);&lt;br /&gt;
VICVectAddr15=0;&lt;br /&gt;
} int main()&lt;br /&gt;
{ init_serial();&lt;br /&gt;
//printf(&amp;quot;temp\n&amp;quot;);&lt;br /&gt;
IODIR1=0X00FF0000;&lt;br /&gt;
IODIR0=0X20000000;&lt;br /&gt;
PINSEL1=0X00000000;&lt;br /&gt;
PINSEL0=0X200000C5; //interrupt pin p0.14&lt;br /&gt;
EXTMODE = 0; // LEVEL sensitive mode on EINT1&lt;br /&gt;
EXTPOLAR = 0;&lt;br /&gt;
VICDefVectAddr = 0x0000002f;&lt;br /&gt;
VICIntSelect |=0x00000000;&lt;br /&gt;
VICVectAddr15 |=(unsigned int)EXTINTVectoredIRQ;&lt;br /&gt;
VICVectCntl15 |= 0x0000002f;&lt;br /&gt;
VICIntEnable |=0x00008000;&lt;br /&gt;
PINSEL0=0X20000005;&lt;br /&gt;
temp = VICIRQStatus;&lt;br /&gt;
printf(&amp;quot;temp=%x\n&amp;quot;,temp);&lt;br /&gt;
while(1)&lt;br /&gt;
{ IO1CLR =0X00FF0000;&lt;br /&gt;
IOSET1 =0x00FF0000;&lt;br /&gt;
} }&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem in lpc2138 external interrupt</title><link>https://community.arm.com/thread/90199?ContentTypeID=1</link><pubDate>Wed, 06 Jan 2010 04:08:36 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c2449715-9db2-4bed-abd8-9a38040c4c5d</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
1) Please post code correctly formatted as code. Clearly described
just above the message input textbox.&lt;/p&gt;

&lt;p&gt;
2) Avoid using printf() inside interrupt handlers. They are
expected to be very quick - unless you are using a design where all
interrupts nests, and this is the lowest-priority interrupt.&lt;/p&gt;

&lt;p&gt;
3) I&amp;#39;m not sure if you can acknowledge the interrupt by writing
VICVectAddr15=0; The traditional way to acknowledge the interrupt is
to write to VICVectAddr.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem in lpc2138 external interrupt</title><link>https://community.arm.com/thread/57528?ContentTypeID=1</link><pubDate>Tue, 05 Jan 2010 23:23:34 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7cb27eb6-d0c3-492b-a912-9cc98dc6e25e</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;a href="http://www.keil.com/forum/docs/thread16116.asp"&gt;http://www.keil.com/forum/docs/thread16116.asp&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>