<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://socialledge.com/sjsu/index.php?action=history&amp;feed=atom&amp;title=LPC17xx_Memory_Map_%26_Interrupts</id>
		<title>LPC17xx Memory Map &amp; Interrupts - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://socialledge.com/sjsu/index.php?action=history&amp;feed=atom&amp;title=LPC17xx_Memory_Map_%26_Interrupts"/>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=LPC17xx_Memory_Map_%26_Interrupts&amp;action=history"/>
		<updated>2026-04-15T01:24:06Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.27.1</generator>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=LPC17xx_Memory_Map_%26_Interrupts&amp;diff=5580&amp;oldid=prev</id>
		<title>Preet: /* Interrupts on Cortex M3 Core */</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=LPC17xx_Memory_Map_%26_Interrupts&amp;diff=5580&amp;oldid=prev"/>
				<updated>2014-02-22T00:49:13Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Interrupts on Cortex M3 Core&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 00:49, 22 February 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l23&quot; &gt;Line 23:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The easiest way to define an interrupt function is to:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The easiest way to define an interrupt function is to:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#160; Look up Interrupt Names in file '''L0/src/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;cr_startup_lpc175x&lt;/del&gt;.cpp'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#160; Look up Interrupt Names in file '''L0/src/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;startup&lt;/ins&gt;.cpp'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*:&amp;#160; Look for declaration of a bunch of functions at this file with keyword '''ALIAS'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*:&amp;#160; Look for declaration of a bunch of functions at this file with keyword '''ALIAS'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*:&amp;#160; For example: &amp;lt;code&amp;gt;UART0_IRQHandler();&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*:&amp;#160; For example: &amp;lt;code&amp;gt;UART0_IRQHandler();&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Preet</name></author>	</entry>

	<entry>
		<id>http://socialledge.com/sjsu/index.php?title=LPC17xx_Memory_Map_%26_Interrupts&amp;diff=1336&amp;oldid=prev</id>
		<title>Preet at 21:46, 31 August 2012</title>
		<link rel="alternate" type="text/html" href="http://socialledge.com/sjsu/index.php?title=LPC17xx_Memory_Map_%26_Interrupts&amp;diff=1336&amp;oldid=prev"/>
				<updated>2012-08-31T21:46:30Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Memory Map ==&lt;br /&gt;
LPC Memory map can be accessed by using structures, but the &amp;quot;LPC17xx.h&amp;quot; file may be confusing at first to find your LPC registers.  The memory map is accessed by structure names followed by structure members.  Let's work through an example in which you are trying to find out how to access PINSEL0 mentioned in your LPC datasheet:&lt;br /&gt;
*  Open up &amp;quot;'''LPC17xx.h'''&amp;quot; (it is in Project/L0 folder)&lt;br /&gt;
*  Search for &amp;quot;'''PINSEL0'''&amp;quot;&lt;br /&gt;
*:  You will see that this is inside a struct called '''LPC_PINCON_TypeDef''':&lt;br /&gt;
*  Now search for &amp;quot;'''LPC_PINCON_TypeDef'''&amp;quot; with a #define in the same line.&lt;br /&gt;
*:  You will see that '''LPC_PINCON''' is a pointer of this struct&lt;br /&gt;
*:  &amp;lt;code&amp;gt;#define '''LPC_PINCON'''            ((LPC_PINCON_TypeDef    *) LPC_PINCON_BASE) &amp;lt;/code&amp;gt;&lt;br /&gt;
*  You can now access '''PINSEL0''' by :&lt;br /&gt;
*:  &amp;lt;code&amp;gt;LPC_PINCON-&amp;gt;PINSEL0 = XYZ;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At first this may get tedius, but once you get more experience, you won't open the '''LPC17xx.h''' file very often.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
LPC_SC-&amp;gt;PCONP |= (1 &amp;lt;&amp;lt; 12);     // Power up ADC&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interrupts on Cortex M3 Core ==&lt;br /&gt;
Unlike the LPC12xx (ARM7) processors, the Cortex M3 core saves interrupt context automatically.  Hence no interrupt attribute is needed and furthermore, function address doesn't need to be specified into any control registers since interrupt vector is fixed.&lt;br /&gt;
&lt;br /&gt;
The easiest way to define an interrupt function is to:&lt;br /&gt;
*  Look up Interrupt Names in file '''L0/src/cr_startup_lpc175x.cpp'''&lt;br /&gt;
*:  Look for declaration of a bunch of functions at this file with keyword '''ALIAS'''&lt;br /&gt;
*:  For example: &amp;lt;code&amp;gt;UART0_IRQHandler();&amp;lt;/code&amp;gt;&lt;br /&gt;
*  Define this function in one of your source code files.&lt;br /&gt;
*:  Enclose in '''extern &amp;quot;C&amp;quot;{ }''' tags if you are defining the name in *.cpp file&lt;br /&gt;
*:  '''extern &amp;quot;C&amp;quot;''' is not needed if you are defining this in *.c file&lt;br /&gt;
*  Enable the Interrupt using CMS Interrupt API:&lt;br /&gt;
*:   &amp;lt;code&amp;gt;NVIC_EnableIRQ(UART0_IRQn);&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
// Here is the Interrupt Function in a main.cpp file&lt;br /&gt;
extern &amp;quot;C&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
    void UART0_IRQHandler()&lt;br /&gt;
    {&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Enable Interrupt somewhere in your code:&lt;br /&gt;
NVIC_EnableIRQ(UART0_IRQn);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Preet</name></author>	</entry>

	</feed>