<?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中的主题 Floating point value</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Floating-point-value/m-p/2187694#M67965</link>
    <description>&lt;P&gt;I'm using Kw45 sdk example, for KW45 board I'd like to print the Floating point accelerometer values to the terminal using shell I also tried.&lt;/P&gt;&lt;P&gt;sprintf(str,"%f");&lt;/P&gt;&lt;P&gt;printf("%s",str);&lt;/P&gt;&lt;P&gt;IDE using MCU expresso&amp;nbsp;&lt;/P&gt;&lt;P&gt;But using printf or sprintf it is not printing even decimal value.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Chetan&lt;/P&gt;</description>
    <pubDate>Thu, 16 Oct 2025 17:22:38 GMT</pubDate>
    <dc:creator>chetan98</dc:creator>
    <dc:date>2025-10-16T17:22:38Z</dc:date>
    <item>
      <title>Floating point value</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Floating-point-value/m-p/2187694#M67965</link>
      <description>&lt;P&gt;I'm using Kw45 sdk example, for KW45 board I'd like to print the Floating point accelerometer values to the terminal using shell I also tried.&lt;/P&gt;&lt;P&gt;sprintf(str,"%f");&lt;/P&gt;&lt;P&gt;printf("%s",str);&lt;/P&gt;&lt;P&gt;IDE using MCU expresso&amp;nbsp;&lt;/P&gt;&lt;P&gt;But using printf or sprintf it is not printing even decimal value.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Chetan&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2025 17:22:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Floating-point-value/m-p/2187694#M67965</guid>
      <dc:creator>chetan98</dc:creator>
      <dc:date>2025-10-16T17:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Floating point value</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Floating-point-value/m-p/2187836#M67969</link>
      <description>&lt;P&gt;Hello Chetan,&lt;/P&gt;
&lt;P&gt;Could you help us confirm what example are you using and for which SDK version please?&lt;/P&gt;
&lt;P&gt;In the [ble_shell] example from the KW45 SDK, values are printed to the terminal using the function [SHELL_PrintfSynchronization], which is defined in [ble_shell.h].&lt;/P&gt;
&lt;P&gt;To print integer values, the SDK uses [shell_writeDec], which internally calls [FORMAT_Dec2Str] to convert integers into strings. This conversion process is implemented in [fsl_format.c].&lt;/P&gt;
&lt;P&gt;Using this approach as a reference, you could apply a similar method to convert floating-point values to strings and send to terminal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this information work for you.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Luis&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2025 23:46:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Floating-point-value/m-p/2187836#M67969</guid>
      <dc:creator>luis_maravilla</dc:creator>
      <dc:date>2025-10-16T23:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Floating point value</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Floating-point-value/m-p/2192295#M67990</link>
      <description>&lt;P&gt;Hello Happy Diwali,&lt;/P&gt;&lt;P&gt;I am using Kw45 wireless uart and I want print value with 3 precision after point.&lt;/P&gt;&lt;P&gt;For eg 300.645&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chetan&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Oct 2025 06:21:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Floating-point-value/m-p/2192295#M67990</guid>
      <dc:creator>chetan98</dc:creator>
      <dc:date>2025-10-24T06:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Floating point value</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Floating-point-value/m-p/2194492#M68003</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/249367"&gt;@chetan98&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Similarly to the ble_shell example, in the wireless_uart example, values are printed to the terminal using Serial_PrintDec function, which internally calls FORMAT_Dec2Str to convert integers into strings. See fsl_format.c for the conversion process:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*Convert a uint32 to string*/&lt;/P&gt;
&lt;P&gt;uint8_t *FORMAT_Dec2Str(uint32_t num)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using this function as reference, you could implement a function to convert floating-point values to strings through a division-based method (split the float into its integer and decimal parts, convert each part to a string separately, and then combine them with a decimal point in between).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Ana Sofia.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2025 18:39:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Floating-point-value/m-p/2194492#M68003</guid>
      <dc:creator>sofiaurueta</dc:creator>
      <dc:date>2025-10-28T18:39:01Z</dc:date>
    </item>
  </channel>
</rss>

