<?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: ADC1 freezes whole CPU in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC1-freezes-whole-CPU/m-p/162177#M698</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course. I atteched the whole Eclipse project.&lt;/P&gt;&lt;P&gt;He should create a sine wave on DAC0_OUT and toggle the Pin PTC1 each time the ADC interrupt handler is called.&lt;/P&gt;&lt;P&gt;The ADC0 runs in free run mode, capturing the state of the poti of the tower board (ADC1_DM1).&lt;/P&gt;&lt;P&gt;The main loop will create the sine wave with a frequency depending on the ADC value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Aug 2011 16:19:46 GMT</pubDate>
    <dc:creator>FabianS</dc:creator>
    <dc:date>2011-08-26T16:19:46Z</dc:date>
    <item>
      <title>ADC1 freezes whole CPU</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC1-freezes-whole-CPU/m-p/162174#M695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to use the ADC1 on the Tower evaluation board with K60.&lt;/P&gt;&lt;P&gt;For initialisation I use the Processor Expert (see attetchment) and this is the start code:&lt;/P&gt;&lt;P&gt;[code]adc1Data=ADCPoti_Init(NULL);﻿&lt;/P&gt;&lt;P&gt;ADCPoti_SelectSampleGroup(adc1Data, 0);﻿&lt;/P&gt;&lt;P&gt;ADCPoti_StartLoopMeasurement(adc1Data);﻿[/code]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After calling StartLoopMeasurement﻿() the whole system hangs, not even the jtag debugger is able to pause the system. Interesting is, with disabled interrupt for ADC1 everything works fine, exept the interrupt of course.&amp;nbsp;&lt;/P&gt;&lt;P&gt;With interrupt enabled, the interrupt handler it is called once and never again. Is there something I have to do in the interrupt or what is my problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2011 21:35:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC1-freezes-whole-CPU/m-p/162174#M695</guid>
      <dc:creator>FabianS</dc:creator>
      <dc:date>2011-08-25T21:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: ADC1 freezes whole CPU</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC1-freezes-whole-CPU/m-p/162175#M696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems that this is a problem of my main loop:&lt;/P&gt;&lt;P&gt;[code]&amp;nbsp;&amp;nbsp;&amp;nbsp; while(1)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //Cpu_DisableInt();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DA1_SetValue(dac1Data, (((uint16_t)((sin(dacX)+1.0)*2047.0))&amp;amp;0x00000fff));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; dacX+=((double)adc1_value)/255.0*0.04;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if(dacX&amp;gt;2*3.14159265)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; dacX=0.0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //Cpu_EnableInt();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for(i=0; i&amp;lt;10000; i++)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; asm("nop");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //GPIOD_PTOR = (1&amp;lt;&amp;lt;6);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }﻿[/code]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this code the cpu crashes after a few seconds, uncommenting the Cpu_DisableInt()﻿ and&amp;nbsp;Cpu_EnableInt();﻿ functions solves this problem. I tryed to find out which command is responsible for that but it seems like all commands are. Is it a problem with the floating point operations? Maybe they are not interruptable? Any idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2011 15:06:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC1-freezes-whole-CPU/m-p/162175#M696</guid>
      <dc:creator>FabianS</dc:creator>
      <dc:date>2011-08-26T15:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: ADC1 freezes whole CPU</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC1-freezes-whole-CPU/m-p/162176#M697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;could you please post here the whole project that leads you to getting the error?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;BR /&gt;Vojtech Filip&lt;BR /&gt;Processor Expert Support Team﻿&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2011 15:36:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC1-freezes-whole-CPU/m-p/162176#M697</guid>
      <dc:creator>ProcessorExpert</dc:creator>
      <dc:date>2011-08-26T15:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: ADC1 freezes whole CPU</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC1-freezes-whole-CPU/m-p/162177#M698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course. I atteched the whole Eclipse project.&lt;/P&gt;&lt;P&gt;He should create a sine wave on DAC0_OUT and toggle the Pin PTC1 each time the ADC interrupt handler is called.&lt;/P&gt;&lt;P&gt;The ADC0 runs in free run mode, capturing the state of the poti of the tower board (ADC1_DM1).&lt;/P&gt;&lt;P&gt;The main loop will create the sine wave with a frequency depending on the ADC value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2011 16:19:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC1-freezes-whole-CPU/m-p/162177#M698</guid>
      <dc:creator>FabianS</dc:creator>
      <dc:date>2011-08-26T16:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: ADC1 freezes whole CPU</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC1-freezes-whole-CPU/m-p/162178#M699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have reproduced the same behavior, the project freezes after a while. It seems that the problem is related to usage of floating point math and interrupts. I have reproduced the same behavior with new simple project containing just one timer interrupt and main loop containing floating point expression and assignment.&lt;/P&gt;&lt;P&gt;As a workaround it seems to work to disable interrupts as you did or removing floating point calculation.&lt;/P&gt;&lt;P&gt;I have asked compiler team to check this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;BR /&gt;Petr Hradsky&lt;BR /&gt;Processor Expert Support Team&lt;BR /&gt;&lt;BR /&gt;﻿&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 18:41:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC1-freezes-whole-CPU/m-p/162178#M699</guid>
      <dc:creator>ProcessorExpert</dc:creator>
      <dc:date>2011-08-31T18:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: ADC1 freezes whole CPU</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC1-freezes-whole-CPU/m-p/162179#M700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any news on this?&amp;nbsp;&amp;nbsp; I notice that my system has been crashing during a floating point operation.&amp;nbsp;&amp;nbsp; I have narrowed it down to the floating point operations but I can't seem to make it happen on demand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 07:47:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC1-freezes-whole-CPU/m-p/162179#M700</guid>
      <dc:creator>emh203</dc:creator>
      <dc:date>2011-11-08T07:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: ADC1 freezes whole CPU</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC1-freezes-whole-CPU/m-p/162180#M701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are seeing a similar thing using floating point trig.&amp;nbsp; The CPU seems to freeze along with the debugger.&amp;nbsp; Has there been any progress in resolving this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, Norman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2012 05:53:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC1-freezes-whole-CPU/m-p/162180#M701</guid>
      <dc:creator>HummingbirdElec</dc:creator>
      <dc:date>2012-01-09T05:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: ADC1 freezes whole CPU</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC1-freezes-whole-CPU/m-p/162181#M702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Installed CW MCU 10.2 this morning and they issue seems to be resolved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Feb 2012 06:09:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/ADC1-freezes-whole-CPU/m-p/162181#M702</guid>
      <dc:creator>Alex_HMBE</dc:creator>
      <dc:date>2012-02-09T06:09:55Z</dc:date>
    </item>
  </channel>
</rss>

