<?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>I2C-Master in RTX</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/30234/i2c-master-in-rtx</link><description> 
Hello! 
I try to get the I2C2-Interface of my LPC2362 to work in RTX. I
already got it work without RTX, where I oriented on sample code. 
When I try the I2C2-Interface with the RTX, I observe that I cannot
start the I2C-Communication (timeout). I assume</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: I2C-Master in RTX</title><link>https://community.arm.com/thread/119654?ContentTypeID=1</link><pubDate>Wed, 04 Apr 2012 18:04:17 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:decf232b-b1a5-49a6-acc4-6c719375d9ae</guid><dc:creator>John Linq</dc:creator><description>&lt;p&gt;&lt;p&gt;

&lt;a href="http://www.arm.com/files/pdf/cortex-m3_programming_for_arm7_developers.pdf"&gt;www.arm.com/.../cortex-m3_programming_for_arm7_developers.pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
For the ARM7TDMI processor, it is common for the interrupt
handling to be implemented with an assembly code wrapper. This is
required for nested interrupt handling, and for redirecting of
interrupt requests to various interrupt handlers due to the IRQ
vector being shared between all interrupts except FIQ (Fast
Interrupt). &lt;b&gt;This type of code wrapper can be completely eliminated
on the Cortex-M3 processor because the exception mechanism
automatically handles nested interrupts and executes the correct
interrupt handler.&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;Cortex-M3 processor exception handlers can be programmed as a C
function&lt;/b&gt; with the saving and restoring of registers R0-R3, R12,
R13, PSR and PC being carried out by the processor as part of its
exception entry and return sequence.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C-Master in RTX</title><link>https://community.arm.com/thread/84786?ContentTypeID=1</link><pubDate>Tue, 03 Apr 2012 11:17:23 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:54f997f5-e158-46b5-a533-96efd2e158af</guid><dc:creator>Stefan G</dc:creator><description>&lt;p&gt;&lt;p&gt;
Salut Bernard!&lt;/p&gt;

&lt;p&gt;
In my Project, I use __irq suffix to announce that
&amp;quot;I2C0_IRQHandler (void)&amp;quot; as the Interupt service routine. I don&amp;#39;t
know why it is not placed in the library you&amp;#39;ve given. But I am also
using an ARM7 instead of an M3.&lt;/p&gt;

&lt;p&gt;
Concerning your other question with the definition defined in RTX
that this function is an interrupt:&lt;br /&gt;
This is done in &amp;quot;void I2C0Init( void )&amp;quot;.&lt;br /&gt;
There you have the command&lt;/p&gt;

&lt;p&gt;
/* Install interrupt handler */ NVIC_EnableIRQ(I2C0_IRQn);&lt;/p&gt;

&lt;p&gt;
I do not know the implementation of this function, but I assume
that it should perform something similar as in my code: Give the
pointer to the ISR, set a priority for the interrupt and enable
it.&lt;/p&gt;

&lt;p&gt;
VICVectAddr30 = (U32)I2C2MasterHandler; /* pointer for ISR */&lt;br /&gt;
VICVectCntl30 = 0x01; /* use it for I2C2 Interrupt; describes
priority[0..15] */&lt;br /&gt;
VICIntEnable = (1 &amp;lt;&amp;lt; 30); /* Enable Interrupt */&lt;/p&gt;

&lt;p&gt;
Maybe you can have a closer look what this function actually does,
and whether there are mayor differences between ARM7 and M3.&lt;/p&gt;

&lt;p&gt;
Good Luck!&lt;br /&gt;
Stefan&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C-Master in RTX</title><link>https://community.arm.com/thread/80124?ContentTypeID=1</link><pubDate>Tue, 03 Apr 2012 08:33:15 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9cc41a53-e2b5-4b0f-8df1-42b186605ffa</guid><dc:creator>Bernard de l&amp;amp;#39;Escaille</dc:creator><description>&lt;p&gt;&lt;p&gt;
We have the same problem but with an LPC1768 (Cortex M3)&lt;/p&gt;

&lt;p&gt;
It works without multitasking!&lt;br /&gt;
I use the library of NXP : &lt;a href="http://ics.nxp.com/support/software/code.bundle.lpc17xx.keil/"&gt;ics.nxp.com/.../&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
What needs to change so that the library works with RTX?&lt;br /&gt;
The &amp;quot;I2C0_IRQHandler (void)&amp;quot; is the interrupt function. It&amp;#39;s my
understanding. But what time is defined in RTX that this function is
an interrupt?&lt;br /&gt;
When I add __ irq function after it changes nothing!&lt;br /&gt;
You must add it sth else?&lt;/p&gt;

&lt;p&gt;
Thank you for your help&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C-Master in RTX</title><link>https://community.arm.com/thread/60544?ContentTypeID=1</link><pubDate>Tue, 27 Mar 2012 01:19:16 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:bb13b235-d259-4d95-bd17-8c14e9efe763</guid><dc:creator>Stefan G</dc:creator><description>&lt;p&gt;&lt;p&gt;
There&amp;#39;s one small error in the code, it must be:&lt;br /&gt;
VICVectCntl30 = 0x01; /* use it for I2C2 Interrupt; describes
priority[0..15] */&lt;/p&gt;

&lt;p&gt;
I solved this issue...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>