<?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 FPU setup in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FPU-setup/m-p/229154#M4769</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working with a K60FN1M processor and using CW10.4. I want to make sure that I am setting up the hardware FPU correctly. I have done the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 - Selected Hardware vfpv4 in the Tool Settings under project properties.&lt;/P&gt;&lt;P&gt;2 - Selected c9x for the Library model&lt;/P&gt;&lt;P&gt;3 - Included the ewl c library&lt;/P&gt;&lt;P&gt;4 - Explicitly enabled the FPU by setting bits 10 and 11 in SCB_CPACR&lt;/P&gt;&lt;P&gt;5 - Set both the ASPEN and LSPEN in SCB_FPCCR to enable the extended exception frame and the lazy stacking options&lt;/P&gt;&lt;P&gt;6 - Added the suffix f to all float constants.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using a preemptive task scheduler rather than a full RTOS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to be able to use library routines such as powf(), expf(), etc. and have them only use single precision float values. Is there a specific ewl library that I should specify or certain macros that need to be defined?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Elizabeth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Jun 2013 18:46:14 GMT</pubDate>
    <dc:creator>ERussell</dc:creator>
    <dc:date>2013-06-19T18:46:14Z</dc:date>
    <item>
      <title>FPU setup</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FPU-setup/m-p/229154#M4769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working with a K60FN1M processor and using CW10.4. I want to make sure that I am setting up the hardware FPU correctly. I have done the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 - Selected Hardware vfpv4 in the Tool Settings under project properties.&lt;/P&gt;&lt;P&gt;2 - Selected c9x for the Library model&lt;/P&gt;&lt;P&gt;3 - Included the ewl c library&lt;/P&gt;&lt;P&gt;4 - Explicitly enabled the FPU by setting bits 10 and 11 in SCB_CPACR&lt;/P&gt;&lt;P&gt;5 - Set both the ASPEN and LSPEN in SCB_FPCCR to enable the extended exception frame and the lazy stacking options&lt;/P&gt;&lt;P&gt;6 - Added the suffix f to all float constants.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using a preemptive task scheduler rather than a full RTOS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to be able to use library routines such as powf(), expf(), etc. and have them only use single precision float values. Is there a specific ewl library that I should specify or certain macros that need to be defined?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Elizabeth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jun 2013 18:46:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FPU-setup/m-p/229154#M4769</guid>
      <dc:creator>ERussell</dc:creator>
      <dc:date>2013-06-19T18:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: FPU setup</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FPU-setup/m-p/229155#M4770</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;There is no specific ewl library, you can use the system default one.&lt;/P&gt;&lt;P&gt;About enable the FPU, please check code for your reference:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;; Enable the floating point coprocessor&lt;/P&gt;&lt;P&gt;#if defined (_VFPv4_)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MOVW r1,#60808&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; ; load CPACR&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MOVT r1,#57344&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; ; (0xE000ED88) &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LDR r0,[r1]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ORR.W r0,r0,#VFPEnable&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; Enable FPU&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STR r0, [r1]&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; ; on CP10, CP11&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MOV.W r0,#R2N_Enable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VMSR FPSCR, r0&lt;/P&gt;&lt;P&gt;#endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 02:44:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FPU-setup/m-p/229155#M4770</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2013-07-03T02:44:34Z</dc:date>
    </item>
  </channel>
</rss>

