<?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>MQX Software SolutionsのトピックRe: K40 BSP API function to obtain system clock setting</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/K40-BSP-API-function-to-obtain-system-clock-setting/m-p/240954#M6802</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check core psp,&amp;nbsp; mqx/source/psp/cortex_m , there's psptypes header file where are typedef's .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13643754716044424" jivemacro_uid="_13643754716044424" modifiedtitle="true"&gt;
&lt;P&gt;#ifndef USE_32BIT_TYPES&lt;/P&gt;
&lt;P&gt;/* Type for the CPU's natural size */&lt;/P&gt;
&lt;P&gt;typedef uint_32&amp;nbsp; _mqx_uint, _PTR_ _mqx_uint_ptr;&lt;/P&gt;
&lt;P&gt;typedef int_32&amp;nbsp;&amp;nbsp; _mqx_int,&amp;nbsp; _PTR_ _mqx_int_ptr;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/* How big a data pointer is on this processor */&lt;/P&gt;
&lt;P&gt;typedef uint_32&amp;nbsp; _psp_data_addr, _PTR_ _psp_data_addr_ptr;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/* How big a code pointer is on this processor */&lt;/P&gt;
&lt;P&gt;typedef uint_32&amp;nbsp; _psp_code_addr, _PTR_ _psp_code_addr_ptr;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/* Maximum type */&lt;/P&gt;
&lt;P&gt;typedef uint_32&amp;nbsp; _mqx_max_type, _PTR_ _mqx_max_type_ptr;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/* _mem_size is equated to the a type that can hold the maximum data address */&lt;/P&gt;
&lt;P&gt;typedef uint_32 _mem_size, _PTR_ _mem_size_ptr;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/* Used for file sizes. */&lt;/P&gt;
&lt;P&gt;typedef uint_32&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _file_size;&lt;/P&gt;
&lt;P&gt;typedef int_32&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _file_offset;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;#else&lt;/P&gt;
&lt;P&gt;#define _mqx_uint&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint_32&lt;/P&gt;
&lt;P&gt;#define _mqx_uint_ptr&amp;nbsp; uint_32_ptr&lt;/P&gt;
&lt;P&gt;#define _mqx_int&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int_32&lt;/P&gt;
&lt;P&gt;#define _mqx_int_ptr&amp;nbsp;&amp;nbsp; int_32_ptr&lt;/P&gt;
&lt;P&gt;#define _psp_data_addr uint_32&lt;/P&gt;
&lt;P&gt;#define _psp_code_addr uint_32&lt;/P&gt;
&lt;P&gt;#define _mqx_max_type&amp;nbsp; uint_32&lt;/P&gt;
&lt;P&gt;#define _mem_size&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint_32&lt;/P&gt;
&lt;P&gt;#endif&lt;/P&gt;
&lt;SPAN class="mce_paste_marker"&gt;
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Mar 2013 09:11:16 GMT</pubDate>
    <dc:creator>c0170</dc:creator>
    <dc:date>2013-03-27T09:11:16Z</dc:date>
    <item>
      <title>K40 BSP API function to obtain system clock setting</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/K40-BSP-API-function-to-obtain-system-clock-setting/m-p/240949#M6797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; What is the API function in K series(For example, K40) BSP to obtain current system clock value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; In some of the low level DSPI driver code provided by Freescale, this function has been used:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;EM&gt; clock_speed = _bsp_get_clock(_bsp_get_clock_configuration(), dspi_info_ptr-&amp;gt;CLOCK_SOURCE);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; However, unless I'm missing something, the second parameter cannot be accessed by a higher level driver. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; My question is whether there is any other function to obtain the system clock or some way the second parameter in the above function is accessible from higher level driver code.&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, 26 Mar 2013 10:49:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/K40-BSP-API-function-to-obtain-system-clock-setting/m-p/240949#M6797</guid>
      <dc:creator>sriramchadalava</dc:creator>
      <dc:date>2013-03-26T10:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: K40 BSP API function to obtain system clock setting</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/K40-BSP-API-function-to-obtain-system-clock-setting/m-p/240950#M6798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sriram Chadalavada,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;take a look into &lt;STRONG&gt;freq_change&lt;/STRONG&gt; example, it uses _cm_get_clock(void). This function is part of cm driver located in io/cm, where are other function which you might find useful. This particular:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13643660701685062" jivemacro_uid="_13643660701685062" modifiedtitle="true"&gt;
&lt;P&gt;BSP_CLOCK_CONFIGURATION _cm_get_clock_configuration&lt;/P&gt;
&lt;P&gt;(&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; void&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return _bsp_get_clock_configuration();&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;SPAN class="mce_paste_marker"&gt;
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MartinK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 06:38:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/K40-BSP-API-function-to-obtain-system-clock-setting/m-p/240950#M6798</guid>
      <dc:creator>c0170</dc:creator>
      <dc:date>2013-03-27T06:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: K40 BSP API function to obtain system clock setting</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/K40-BSP-API-function-to-obtain-system-clock-setting/m-p/240951#M6799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kojto,&lt;/P&gt;&lt;P&gt; Thanks for the response.&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; I'll take a look at the code in freq_change example.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; But the code you've posted also returns a &lt;SPAN style="color: #000000; font-family: helvetica, arial; font-size: 12px; background-color: #ffffff;"&gt;BSP_CLOCK_CONFIGURATION type. One still needs to extract the clock speed from this, for example, by using the function call I cited in my initial post. My question was if there is a way to avoid that?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 07:08:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/K40-BSP-API-function-to-obtain-system-clock-setting/m-p/240951#M6799</guid>
      <dc:creator>sriramchadalava</dc:creator>
      <dc:date>2013-03-27T07:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: K40 BSP API function to obtain system clock setting</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/K40-BSP-API-function-to-obtain-system-clock-setting/m-p/240952#M6800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sriram,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13643706941808295" jivemacro_uid="_13643706941808295"&gt;
&lt;P&gt;_mqx_uint fsys;&lt;/P&gt;
&lt;P&gt;fsys = _time_get_ticks_per_sec() * _time_get_hwticks_per_tick();&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;printf(&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"&lt;SPAN style="text-decoration: underline;"&gt;fsys&lt;/SPAN&gt;= %i\n"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;, fsys);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 07:52:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/K40-BSP-API-function-to-obtain-system-clock-setting/m-p/240952#M6800</guid>
      <dc:creator>Martin_</dc:creator>
      <dc:date>2013-03-27T07:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: K40 BSP API function to obtain system clock setting</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/K40-BSP-API-function-to-obtain-system-clock-setting/m-p/240953#M6801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Martin :smileyhappy:. &lt;/P&gt;&lt;P&gt;One question though. What is the upper bound of _mqx_int data type?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 08:58:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/K40-BSP-API-function-to-obtain-system-clock-setting/m-p/240953#M6801</guid>
      <dc:creator>sriramchadalava</dc:creator>
      <dc:date>2013-03-27T08:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: K40 BSP API function to obtain system clock setting</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/K40-BSP-API-function-to-obtain-system-clock-setting/m-p/240954#M6802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check core psp,&amp;nbsp; mqx/source/psp/cortex_m , there's psptypes header file where are typedef's .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13643754716044424" jivemacro_uid="_13643754716044424" modifiedtitle="true"&gt;
&lt;P&gt;#ifndef USE_32BIT_TYPES&lt;/P&gt;
&lt;P&gt;/* Type for the CPU's natural size */&lt;/P&gt;
&lt;P&gt;typedef uint_32&amp;nbsp; _mqx_uint, _PTR_ _mqx_uint_ptr;&lt;/P&gt;
&lt;P&gt;typedef int_32&amp;nbsp;&amp;nbsp; _mqx_int,&amp;nbsp; _PTR_ _mqx_int_ptr;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/* How big a data pointer is on this processor */&lt;/P&gt;
&lt;P&gt;typedef uint_32&amp;nbsp; _psp_data_addr, _PTR_ _psp_data_addr_ptr;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/* How big a code pointer is on this processor */&lt;/P&gt;
&lt;P&gt;typedef uint_32&amp;nbsp; _psp_code_addr, _PTR_ _psp_code_addr_ptr;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/* Maximum type */&lt;/P&gt;
&lt;P&gt;typedef uint_32&amp;nbsp; _mqx_max_type, _PTR_ _mqx_max_type_ptr;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/* _mem_size is equated to the a type that can hold the maximum data address */&lt;/P&gt;
&lt;P&gt;typedef uint_32 _mem_size, _PTR_ _mem_size_ptr;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/* Used for file sizes. */&lt;/P&gt;
&lt;P&gt;typedef uint_32&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _file_size;&lt;/P&gt;
&lt;P&gt;typedef int_32&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _file_offset;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;#else&lt;/P&gt;
&lt;P&gt;#define _mqx_uint&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint_32&lt;/P&gt;
&lt;P&gt;#define _mqx_uint_ptr&amp;nbsp; uint_32_ptr&lt;/P&gt;
&lt;P&gt;#define _mqx_int&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int_32&lt;/P&gt;
&lt;P&gt;#define _mqx_int_ptr&amp;nbsp;&amp;nbsp; int_32_ptr&lt;/P&gt;
&lt;P&gt;#define _psp_data_addr uint_32&lt;/P&gt;
&lt;P&gt;#define _psp_code_addr uint_32&lt;/P&gt;
&lt;P&gt;#define _mqx_max_type&amp;nbsp; uint_32&lt;/P&gt;
&lt;P&gt;#define _mem_size&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint_32&lt;/P&gt;
&lt;P&gt;#endif&lt;/P&gt;
&lt;SPAN class="mce_paste_marker"&gt;
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 09:11:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/K40-BSP-API-function-to-obtain-system-clock-setting/m-p/240954#M6802</guid>
      <dc:creator>c0170</dc:creator>
      <dc:date>2013-03-27T09:11:16Z</dc:date>
    </item>
  </channel>
</rss>

