<?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>Setting interrupt flag when a specific key has be enter</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/21254/setting-interrupt-flag-when-a-specific-key-has-be-enter</link><description> 
Hi! 
For a few months i started programming with ARM7(CPU:LPC 2138).I have
this interrupt driven UART I/O: 

 
 void sio_irq (void) __irq {
 volatile char dummy;
 volatile char IIR;
 struct buf_st *p;

 /*-------------------------------------------</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Setting interrupt flag when a specific key has be enter</title><link>https://community.arm.com/thread/138379?ContentTypeID=1</link><pubDate>Mon, 05 Mar 2007 07:33:58 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a7279a7e-5137-4e14-954b-18f957065b6b</guid><dc:creator>Peclare Mambe</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thanks for trying to help me.I have found the solution of mein
problem.&lt;/p&gt;

&lt;p&gt;
may God blessed you.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting interrupt flag when a specific key has be enter</title><link>https://community.arm.com/thread/134937?ContentTypeID=1</link><pubDate>Fri, 23 Feb 2007 11:44:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3e753d4a-3d65-4d25-b20a-99a489547244</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Well, as I&amp;#39;ve just been doing some searching on this, I have these
2 references to hand:&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://c2.com/cgi/wiki?CircularBuffer"&gt;c2.com/.../wiki&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
&lt;a target="_blank" href="http://www.embedded.com/shared/printableArticle.jhtml?articleID=15300198"&gt;www.embedded.com/.../printableArticle.jhtml&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
but you really need to learn how to use internet search engines
effectively!&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting interrupt flag when a specific key has be enter</title><link>https://community.arm.com/thread/123675?ContentTypeID=1</link><pubDate>Fri, 23 Feb 2007 11:13:14 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:0f5a61c7-565a-49dd-83a6-807ab13e405a</guid><dc:creator>Per Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;a href="http://www.google.com/search?hl=en&amp;amp;q=what+is+a+fifo"&gt;www.google.com/search&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://www.google.com/search?hl=en&amp;amp;q=what+is+a+ring+buffer"&gt;www.google.com/search&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://www.google.com/search?hl=en&amp;amp;q=what+is+bit+flag"&gt;www.google.com/search&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting interrupt flag when a specific key has be enter</title><link>https://community.arm.com/thread/112677?ContentTypeID=1</link><pubDate>Fri, 23 Feb 2007 09:35:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1d72b44e-2ee0-47bd-aad8-1457e696e522</guid><dc:creator>Peclare Mambe</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi!&lt;br /&gt;
very thanks for answer me.&lt;br /&gt;
But still have question(please excuse my inexperience)&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;The signal can be a bit set in a global variable, for
example.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
How and where can i set this bit?&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;Please look up on the net: FIFO, circular buffer, signal flags,
interrupt handler&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
i have looked for all that but i didn&amp;#39;t find something good for
signal flag and circular buffer.&lt;br /&gt;
plaese when you have some links for me i would be thanksfull to have
it.&lt;/p&gt;

&lt;p&gt;
Best regard&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting interrupt flag when a specific key has be enter</title><link>https://community.arm.com/thread/98939?ContentTypeID=1</link><pubDate>Wed, 21 Feb 2007 10:48:48 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1fd7584e-b67d-408b-a105-ca3500091051</guid><dc:creator>Jonny Doin</dc:creator><description>&lt;p&gt;&lt;p&gt;
It seems that you are misplacing some concepts here.&lt;br /&gt;
You are talking about &amp;#39;interrupt&amp;#39; but describe a high-level
process.&lt;/p&gt;

&lt;p&gt;
Interrupts are very low-level. In other words, your UART ISR
handler will get executed (i.e., an interrupt will be fired) *EVERY*
time a character is received by the UART.&lt;/p&gt;

&lt;p&gt;
You describe some &amp;#39;sequence&amp;#39; of characters that your code must
respond to. That&amp;#39;s OK, but you have to handle the sequence at a
higher level.&lt;/p&gt;

&lt;p&gt;
For example: If you let your UART handler just do the work of
receiving the chars and placing them in a circular buffer (or FIFO),
and then signaling to the rest of the system that chars are
available, then the UART handler is kept simple, generic and small.
The signal can be a bit set in a global variable, for example.&lt;/p&gt;

&lt;p&gt;
Then your main program can check if the signal is set, and analyse
the FIFO for the magic chars you want, and get the following chars in
the sequence as you wish. Please not that the signal flag has nothing
to do with the interrupt flag.&lt;/p&gt;

&lt;p&gt;
Please look up on the net: FIFO, circular buffer, signal flags,
interrupt handler.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting interrupt flag when a specific key has be enter</title><link>https://community.arm.com/thread/74843?ContentTypeID=1</link><pubDate>Wed, 21 Feb 2007 10:32:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:eb0752d0-0054-4507-ba53-7c2e429cb5f2</guid><dc:creator>Peclare Mambe</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thanks for the answer.&lt;/p&gt;

&lt;p&gt;
But i have a question:What is a RTOS?how can i use it?&lt;br /&gt;
How can i practically make a decision if i want to insert the
received character into the received buffer or not?&lt;br /&gt;
I give some explanation:When a special character(for example &amp;#39;#&amp;#39;)has
been given,it is the sign that the next characters build an
instruction.A the end of this instruction the interrupt flag will be
clear.&lt;br /&gt;
I hope that you understand what i mean.&lt;/p&gt;

&lt;p&gt;
Best reguards.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting interrupt flag when a specific key has be enter</title><link>https://community.arm.com/thread/47838?ContentTypeID=1</link><pubDate>Tue, 20 Feb 2007 15:16:35 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6e89c440-0078-4d14-808f-779500f37799</guid><dc:creator>Per Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
You can&amp;#39;t filter what characters the serial port receives. The
interrupt will always be taken. Then, you can decide if you want to
insert the received character into the receive buffer or not.&lt;/p&gt;

&lt;p&gt;
If using a RTOS, you don&amp;#39;t have to wake up the consumer thread
unless the rx interrupt processed a trigger character.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>