<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: The usual VIC problem not resolved. in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/The-usual-VIC-problem-not-resolved/m-p/534622#M4199</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by nmariner on Fri May 09 15:53:10 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok sorry, I will stick with same thread.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I start with ISP enabled for debug, it has the same effect as erasing full memory and starting debug. This does not seem to change anything, ie: interrupt can hit once at startup but then does not hit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I notice LPC-Link board LED is always flickering on during run, I assume it's not reading VIC registers as I did read this could cause problems as VIC may think interrupt is in progress so masking other interrupts.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The LPC-Link board I have is one with LPC11U14 REV A. I have removed links for the demo part of the board so I can connect JTAG to board with LPC2368 on.The target board is bespoke design, not demo board. It has been in use with this software before so It is a working board but the JTAG has never been used before for developing on it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The previous software developer just used debug messages from UARTS and LEDs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Expresso version is 7.1.1 although 7.0.2 had same results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This software I am using is totally cut down version of original code to act as test bed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have not managed to re-create data abort problem since resetting processor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just to update, compiling for release code and running without debug still does not toggle LEDs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nigel.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 23:07:52 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T23:07:52Z</dc:date>
    <item>
      <title>The usual VIC problem not resolved.</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/The-usual-VIC-problem-not-resolved/m-p/534620#M4197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by nmariner on Wed May 07 09:43:48 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;After trying many things I stripped out code into new project with basic timer2 running.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Still have problems with timer2 int not always hitting although on some builds if I reset the code twice I could get the interrupt to hit regularly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now it seems that code just goes into error state (data abort) in startup code when run.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know what's happening so have included all code in zip file in case someont else has an idea. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Reset processor, erased flash and re-debug and no data abort now, but still no interrupt!&lt;/SPAN&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338177"&gt;VIC_test_project.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:07:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/The-usual-VIC-problem-not-resolved/m-p/534620#M4197</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: The usual VIC problem not resolved.</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/The-usual-VIC-problem-not-resolved/m-p/534621#M4198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lpcxpresso-support on Wed May 07 12:45:45 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Rather than continually creating new threads (which just means we have to keep going hunting for everything that has been said before), it would really help us to help you if you actually tried what we have previously suggested, and also provided us with the other information that we have asked you for…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fforum%2Flpc2368-vic-inturrupt-not-happening%23comment-1137083" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/forum/lpc2368-vic-inturrupt-not-happening#comment-1137083&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But basically…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Result of powering up with ISP selected before starting a debug session&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- LPCXpresso version&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Debug probe&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Target board&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With regards to data abort, when you see this, try using the Restart button and seeing if you then end up at main().&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPCXpresso Support&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:07:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/The-usual-VIC-problem-not-resolved/m-p/534621#M4198</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: The usual VIC problem not resolved.</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/The-usual-VIC-problem-not-resolved/m-p/534622#M4199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by nmariner on Fri May 09 15:53:10 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok sorry, I will stick with same thread.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I start with ISP enabled for debug, it has the same effect as erasing full memory and starting debug. This does not seem to change anything, ie: interrupt can hit once at startup but then does not hit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I notice LPC-Link board LED is always flickering on during run, I assume it's not reading VIC registers as I did read this could cause problems as VIC may think interrupt is in progress so masking other interrupts.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The LPC-Link board I have is one with LPC11U14 REV A. I have removed links for the demo part of the board so I can connect JTAG to board with LPC2368 on.The target board is bespoke design, not demo board. It has been in use with this software before so It is a working board but the JTAG has never been used before for developing on it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The previous software developer just used debug messages from UARTS and LEDs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Expresso version is 7.1.1 although 7.0.2 had same results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This software I am using is totally cut down version of original code to act as test bed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have not managed to re-create data abort problem since resetting processor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just to update, compiling for release code and running without debug still does not toggle LEDs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nigel.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:07:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/The-usual-VIC-problem-not-resolved/m-p/534622#M4199</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: The usual VIC problem not resolved.</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/The-usual-VIC-problem-not-resolved/m-p/534623#M4200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lpcxpresso-support on Mon May 12 07:51:39 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;First of all, if you look at the example I provided, you will see that you need to tag C functions used as interrupt handlers, so that the compiler can generate appropriate entry/exit code for them. There is more detail of this in the GCC docs, but basically you need to change:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;void timer2_handler()&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;__attribute__((interrupt("IRQ")))
void timer2_handler()&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This appears to solve your '&lt;/SPAN&gt;&lt;I&gt;interrupt only triggered once&lt;/I&gt;&lt;SPAN&gt;' issue when testing your project here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In addition, I've noticed that occasionally, because of the way reset is handled when starting a debug connection, you can get interrupts getting registered before your code has actually set things up (because the code that was already in flash got partially executed before the debugger took control). This can be solved by modifying the cr_startup_…. file to clear any interrupts in the VIC before switching on IRQs at the ARM core level. To do this change:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MSR&amp;nbsp;&amp;nbsp; CPSR_c,#MODE_SYS|F_BIT// System Mode&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;SPAN&gt;to&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
LDR r10, =0xFFFFF014// VICIntEnClear register
LDR r0,=0xFFFFFFFF
STR r0,[r10]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MSR&amp;nbsp;&amp;nbsp; CPSR_c,#MODE_SYS|F_BIT// System Mode&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let us know how you get on after making these changes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPCXpresso Support&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:07:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/The-usual-VIC-problem-not-resolved/m-p/534623#M4200</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: The usual VIC problem not resolved.</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/The-usual-VIC-problem-not-resolved/m-p/534624#M4201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by nmariner on Tue May 13 09:38:04 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I did notice the tag on the interrupt function but as the original code that I have been stripping down didn't seem to have this (and I have searched for it) I didn't include it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Everything works fine now this is included, don't know how things were working on the original code then !&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a reference for all of the __attribute__ directives so I can see what's available and what they all do?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nigel.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:07:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/The-usual-VIC-problem-not-resolved/m-p/534624#M4201</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: The usual VIC problem not resolved.</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/The-usual-VIC-problem-not-resolved/m-p/534625#M4202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lpcxpresso-support on Tue May 13 10:25:46 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes. Look in the docs (Help-&amp;gt;Help Contents).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:07:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/The-usual-VIC-problem-not-resolved/m-p/534625#M4202</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:07:54Z</dc:date>
    </item>
  </channel>
</rss>

