<?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>LPC MicrocontrollersのトピックRe: SDK_2_14_0_LPCXpresso54628 - fsl_enet.c using pow (x,y) from math.h</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/SDK-2-14-0-LPCXpresso54628-fsl-enet-c-using-pow-x-y-from-math-h/m-p/1748639#M54571</link>
    <description>&lt;P&gt;Hi Rong,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The pow function does not need to be inluded with libm option. But if I use libm parameter this use of pow gives an error.&lt;/P&gt;&lt;P&gt;Please provide an example to use the pow function with the library libm parameter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another way is&amp;nbsp;to check if the use of the pow function is really necessary. This would I prefer.&lt;/P&gt;&lt;P&gt;Wishes,&lt;/P&gt;&lt;P&gt;Marcus&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Oct 2023 10:21:06 GMT</pubDate>
    <dc:creator>Marcus1</dc:creator>
    <dc:date>2023-10-30T10:21:06Z</dc:date>
    <item>
      <title>SDK_2_14_0_LPCXpresso54628 - fsl_enet.c using pow (x,y) from math.h</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SDK-2-14-0-LPCXpresso54628-fsl-enet-c-using-pow-x-y-from-math-h/m-p/1734793#M54283</link>
      <description>&lt;P&gt;Hallo,&lt;/P&gt;&lt;P&gt;I had errors compiling&amp;nbsp;fsl_enet.c. So I had a closer look. The errors came from using math.h.&lt;/P&gt;&lt;P&gt;Please check this below:&lt;/P&gt;&lt;P&gt;Pow(2,y) should be the same like 2&amp;lt;&amp;lt;y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Maybe you could check some boarders.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If that is the same please use shifting registers as this is embedded stuff.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code change. Math.h would not be used at all in&amp;nbsp;fsl_enet.c.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;//            txFifoSize = (uint32_t)pow(
//                (double)2, (double)(uint32_t)(((base-&amp;gt;MAC_HW_FEAT[1] &amp;amp; ENET_MAC_HW_FEAT_TXFIFOSIZE_MASK) &amp;gt;&amp;gt; ENET_MAC_HW_FEAT_TXFIFOSIZE_SHIFT) +
//                    7U));
            txFifoSize = (uint32_t)(2&amp;lt;&amp;lt;(uint32_t)(((base-&amp;gt;MAC_HW_FEAT[1] &amp;amp; ENET_MAC_HW_FEAT_TXFIFOSIZE_MASK) &amp;gt;&amp;gt; ENET_MAC_HW_FEAT_TXFIFOSIZE_SHIFT) +
                    7U));&lt;/LI-CODE&gt;&lt;P&gt;Best wishes,&lt;/P&gt;&lt;P&gt;Marcus&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 10:53:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SDK-2-14-0-LPCXpresso54628-fsl-enet-c-using-pow-x-y-from-math-h/m-p/1734793#M54283</guid>
      <dc:creator>Marcus1</dc:creator>
      <dc:date>2023-10-06T10:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: SDK_2_14_0_LPCXpresso54628 - fsl_enet.c using pow (x,y) from math.h</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SDK-2-14-0-LPCXpresso54628-fsl-enet-c-using-pow-x-y-from-math-h/m-p/1735268#M54291</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried to use the code, it appears it is okay to use the pow(double,double); I can pass the compilation.&lt;/P&gt;
&lt;P&gt;#include &amp;lt;stdarg.h&amp;gt;&lt;BR /&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;BR /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;BR /&gt;#include "board.h"&lt;BR /&gt;#include "peripherals.h"&lt;BR /&gt;#include "pin_mux.h"&lt;BR /&gt;#include "clock_config.h"&lt;BR /&gt;#include "LPC54628.h"&lt;BR /&gt;#include "fsl_debug_console.h"&lt;BR /&gt;#include "math.h"&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;uint32_t i;&lt;BR /&gt;/* TODO: insert other include files here. */&lt;/P&gt;
&lt;P&gt;/* TODO: insert other definitions and declarations here. */&lt;/P&gt;
&lt;P&gt;/*&lt;BR /&gt;* @brief Application entry point.&lt;BR /&gt;*/&lt;/P&gt;
&lt;P&gt;double dfa,dfb,dfc;&lt;BR /&gt;int main(void)&lt;BR /&gt;{&lt;BR /&gt;// float dfa,dfa,dfc;&lt;BR /&gt;/* Init board hardware. */&lt;BR /&gt;BOARD_InitBootPins();&lt;BR /&gt;BOARD_InitBootClocks();&lt;BR /&gt;BOARD_InitBootPeripherals();&lt;BR /&gt;#ifndef BOARD_INIT_DEBUG_CONSOLE_PERIPHERAL&lt;BR /&gt;/* Init FSL debug console. */&lt;BR /&gt;BOARD_InitDebugConsole();&lt;BR /&gt;#endif&lt;/P&gt;
&lt;P&gt;PRINTF("Hello World\n");&lt;BR /&gt;dfa=10;&lt;BR /&gt;dfb=4;&lt;BR /&gt;dfc=pow(10,2);&lt;BR /&gt;dfc=pow(dfa,dfb);&lt;BR /&gt;/* Force the counter to be placed into memory. */&lt;BR /&gt;volatile static int i = 0 ;&lt;BR /&gt;/* Enter an infinite loop, just incrementing a counter. */&lt;BR /&gt;while(1) {&lt;BR /&gt;i++ ;&lt;BR /&gt;/* 'Dummy' NOP to allow source level single stepping of&lt;BR /&gt;tight while() loop */&lt;BR /&gt;__asm volatile ("nop");&lt;BR /&gt;}&lt;BR /&gt;return 0 ;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Sun, 08 Oct 2023 06:32:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SDK-2-14-0-LPCXpresso54628-fsl-enet-c-using-pow-x-y-from-math-h/m-p/1735268#M54291</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2023-10-08T06:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: SDK_2_14_0_LPCXpresso54628 - fsl_enet.c using pow (x,y) from math.h</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SDK-2-14-0-LPCXpresso54628-fsl-enet-c-using-pow-x-y-from-math-h/m-p/1748639#M54571</link>
      <description>&lt;P&gt;Hi Rong,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The pow function does not need to be inluded with libm option. But if I use libm parameter this use of pow gives an error.&lt;/P&gt;&lt;P&gt;Please provide an example to use the pow function with the library libm parameter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another way is&amp;nbsp;to check if the use of the pow function is really necessary. This would I prefer.&lt;/P&gt;&lt;P&gt;Wishes,&lt;/P&gt;&lt;P&gt;Marcus&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 10:21:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SDK-2-14-0-LPCXpresso54628-fsl-enet-c-using-pow-x-y-from-math-h/m-p/1748639#M54571</guid>
      <dc:creator>Marcus1</dc:creator>
      <dc:date>2023-10-30T10:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: SDK_2_14_0_LPCXpresso54628 - fsl_enet.c using pow (x,y) from math.h</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SDK-2-14-0-LPCXpresso54628-fsl-enet-c-using-pow-x-y-from-math-h/m-p/1752376#M54634</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;As an alternative, I suppose that you can use the following code to figure out the Fifo size:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;            txFifoSize =1&amp;lt;&amp;lt;[(base-&amp;gt;MAC_HW_FEAT[1])&amp;amp; ENET_MAC_HW_FEAT_TXFIFOSIZE_MASK) &amp;gt;&amp;gt; ENET_MAC_HW_FEAT_TXFIFOSIZE_SHIFT)]-7;

 &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Pls check if it is correct.&lt;/P&gt;
&lt;P&gt;Hope it is helpful&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 01:46:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SDK-2-14-0-LPCXpresso54628-fsl-enet-c-using-pow-x-y-from-math-h/m-p/1752376#M54634</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2023-11-06T01:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: SDK_2_14_0_LPCXpresso54628 - fsl_enet.c using pow (x,y) from math.h</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SDK-2-14-0-LPCXpresso54628-fsl-enet-c-using-pow-x-y-from-math-h/m-p/1752699#M54643</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Rong,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;you are right but +7 as before and cast uint32_t to be sure :-).&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;txFifoSize = (uint32_t)(1&amp;lt;&amp;lt;(uint32_t)(((base-&amp;gt;MAC_HW_FEAT[1] &amp;amp; ENET_MAC_HW_FEAT_TXFIFOSIZE_MASK) &amp;gt;&amp;gt; ENET_MAC_HW_FEAT_TXFIFOSIZE_SHIFT) + 7U));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Marcus&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 09:25:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SDK-2-14-0-LPCXpresso54628-fsl-enet-c-using-pow-x-y-from-math-h/m-p/1752699#M54643</guid>
      <dc:creator>Marcus1</dc:creator>
      <dc:date>2023-11-06T09:25:56Z</dc:date>
    </item>
  </channel>
</rss>

