<?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>Kinetis Microcontrollers中的主题 Re: KL25Z GPIO simulation (Keil)</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-GPIO-simulation-Keil/m-p/405782#M22682</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Complete (approx.) real-time Kinetis peripheral simulation (UART, USB, Ethernet, timers, ports, interrupts, DMA, ADC, etc.) is possible in the uTasker project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the IDE simulators (IAR, Keil, etc.) there is only really CPU instruction simulation that is very slow and doesn't include peripherals. In some cases there is limited peripheral operation (like a debug output) but it is best to read the Help in Keil to see what there atually is in the version that you are using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kinetis: &lt;A href="http://www.utasker.com/kinetis.html" title="http://www.utasker.com/kinetis.html"&gt;µTasker Kinetis support&lt;/A&gt;&lt;/P&gt;&lt;P&gt;KL25: &lt;A href="http://www.utasker.com/kinetis/FRDM-KL25Z.html" title="http://www.utasker.com/kinetis/FRDM-KL25Z.html"&gt;µTasker Kinetis FRDM-KL25Z support&lt;/A&gt; / &lt;A href="http://www.utasker.com/kinetis/TWR-KL25Z48M.html" title="http://www.utasker.com/kinetis/TWR-KL25Z48M.html"&gt;µTasker Kinetis TWR-KL25Z48M support&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;For the complete "out-of-the-box" Kinetis experience and faster time to market&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Apr 2015 14:43:18 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2015-04-14T14:43:18Z</dc:date>
    <item>
      <title>KL25Z GPIO simulation (Keil)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-GPIO-simulation-Keil/m-p/405779#M22679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any way to simulate a simple switch interrupt for KL25Z boards in Keil?&lt;/P&gt;&lt;P&gt;Currently, I have to manually set PDIR, ISFR and NVIC_ISPR. Is there anyway to simulate the behavior of an input switch? (for example, by changing the data, it automatically calls the interrupt)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 10:19:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-GPIO-simulation-Keil/m-p/405779#M22679</guid>
      <dc:creator>a_t</dc:creator>
      <dc:date>2015-04-14T10:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: KL25Z GPIO simulation (Keil)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-GPIO-simulation-Keil/m-p/405780#M22680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello A T,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You also need configure&amp;nbsp; the interrupt of the pin use the "PORTx_PCRn" register.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/49631iA84CB9BACE45F42D/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also configure the pin to GPIO function, enable the related interrupt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example : set PTA19 for GPIO interrupt when the pin is logic zero&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SIM_SCGC5 = SIM_SCGC5_PORTA_MASK;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PORTA_PCR19=PORT_PCR_MUX(1)|PORT_PCR_IRQC(0x08)|PORT_PCR_PE_MASK|PORT_PCR_PS_MASK;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;enable_irq(87); //GPIOA Vector is 103. IRQ# is 103-16=87&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/////////////////////////////////////////////////////////////////////////////&lt;/P&gt;&lt;P&gt;void enable_irq (int irq)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int div;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Make sure that the IRQ is an allowable number. Right now up to 91 is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * used.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Determine which of the NVICISERs corresponds to the irq */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; div = irq/32;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; switch (div)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case 0x0:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVICICPR0 = 1 &amp;lt;&amp;lt; (irq%32);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVICISER0 = 1 &amp;lt;&amp;lt; (irq%32);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case 0x1:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVICICPR1 = 1 &amp;lt;&amp;lt; (irq%32);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVICISER1 = 1 &amp;lt;&amp;lt; (irq%32);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case 0x2:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVICICPR2 = 1 &amp;lt;&amp;lt; (irq%32);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVICISER2 = 1 &amp;lt;&amp;lt; (irq%32);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;////////////////////////////////////&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then when you set the pta10 to zero , it will enter interrupt function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Alice&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 11:02:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-GPIO-simulation-Keil/m-p/405780#M22680</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2015-04-14T11:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: KL25Z GPIO simulation (Keil)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-GPIO-simulation-Keil/m-p/405781#M22681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello @Alice_Yang,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer. Probably I have not expalined all the details. Basically, I have done all the setup. Everything works on the real board.&lt;/P&gt;&lt;P&gt;Now I want to simulate the behaviour in the Keil simulation mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your example setting PTA19 to zero is like pushing a button. I want to simulate it in software. What should I do to simulate the same behaviour?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 11:09:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-GPIO-simulation-Keil/m-p/405781#M22681</guid>
      <dc:creator>a_t</dc:creator>
      <dc:date>2015-04-14T11:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: KL25Z GPIO simulation (Keil)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-GPIO-simulation-Keil/m-p/405782#M22682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Complete (approx.) real-time Kinetis peripheral simulation (UART, USB, Ethernet, timers, ports, interrupts, DMA, ADC, etc.) is possible in the uTasker project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the IDE simulators (IAR, Keil, etc.) there is only really CPU instruction simulation that is very slow and doesn't include peripherals. In some cases there is limited peripheral operation (like a debug output) but it is best to read the Help in Keil to see what there atually is in the version that you are using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kinetis: &lt;A href="http://www.utasker.com/kinetis.html" title="http://www.utasker.com/kinetis.html"&gt;µTasker Kinetis support&lt;/A&gt;&lt;/P&gt;&lt;P&gt;KL25: &lt;A href="http://www.utasker.com/kinetis/FRDM-KL25Z.html" title="http://www.utasker.com/kinetis/FRDM-KL25Z.html"&gt;µTasker Kinetis FRDM-KL25Z support&lt;/A&gt; / &lt;A href="http://www.utasker.com/kinetis/TWR-KL25Z48M.html" title="http://www.utasker.com/kinetis/TWR-KL25Z48M.html"&gt;µTasker Kinetis TWR-KL25Z48M support&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;For the complete "out-of-the-box" Kinetis experience and faster time to market&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 14:43:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-GPIO-simulation-Keil/m-p/405782#M22682</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2015-04-14T14:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: KL25Z GPIO simulation (Keil)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-GPIO-simulation-Keil/m-p/405783#M22683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the very helpful answer. I was looking at it to see whether it is compatible with Keil. But it is not free. Is it?&lt;/P&gt;&lt;P&gt;Would it be possible to find C programs that simulate at least some features/behaviours&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;/SPAN&gt; of the ports, interrupts and peripherals?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 15:13:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-GPIO-simulation-Keil/m-p/405783#M22683</guid>
      <dc:creator>a_t</dc:creator>
      <dc:date>2015-04-17T15:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: KL25Z GPIO simulation (Keil)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-GPIO-simulation-Keil/m-p/405784#M22684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The uTasker project with Kinetis simulaton is free for non-commercial use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The simulator doesn't work together with Keil but the code that it simulates is the same as Keil uses to build the project - that is, one develops and simulates in the simulator (i.e. using VisualStudio) and then cross-compiles in Keil to generate the target code and do any additional HW debugging.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Therefore it is "compatible" with Keil, IAR, KDS, CW etc. but doesn't actually run in these IDEs as simulation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kinetis: &lt;A class="jive-link-external-small" data-content-finding="Community" href="http://www.utasker.com/kinetis.html" target="_blank"&gt;µTasker Kinetis support&lt;/A&gt;&lt;/P&gt;&lt;P&gt;KL25: &lt;A class="jive-link-external-small" data-content-finding="Community" href="http://www.utasker.com/kinetis/FRDM-KL25Z.html" target="_blank"&gt;µTasker Kinetis FRDM-KL25Z support&lt;/A&gt; / &lt;A class="jive-link-external-small" data-content-finding="Community" href="http://www.utasker.com/kinetis/TWR-KL25Z48M.html" target="_blank"&gt;µTasker Kinetis TWR-KL25Z48M support&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;For the complete "out-of-the-box" Kinetis experience and faster time to market&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 16:42:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL25Z-GPIO-simulation-Keil/m-p/405784#M22684</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2015-04-17T16:42:56Z</dc:date>
    </item>
  </channel>
</rss>

