<?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: _time_set doesnt save time</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/time-set-doesnt-save-time/m-p/242410#M6845</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are correct about those other errors, and I have changed those with no impact, however mqh.h defines the functions as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;extern void&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;&amp;nbsp; _time_get(TIME_STRUCT_PTR);&lt;/P&gt;&lt;P&gt;extern void&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;&amp;nbsp; _time_set(TIME_STRUCT_PTR);&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>Thu, 31 Jan 2013 20:16:11 GMT</pubDate>
    <dc:creator>kdavis</dc:creator>
    <dc:date>2013-01-31T20:16:11Z</dc:date>
    <item>
      <title>_time_set doesnt save time</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/time-set-doesnt-save-time/m-p/242406#M6841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using a MCF54418 with MQX 3.8.1, when I am updating the time using _time_set() then read immediately after using time_get() the times do not match, the get time is still the time from up (usually a few seconds) where as I tried setting the seconds to 1356048000. Can anyone possibly shed some light on this? Thank you in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 16:01:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/time-set-doesnt-save-time/m-p/242406#M6841</guid>
      <dc:creator>kdavis</dc:creator>
      <dc:date>2013-01-30T16:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: _time_set doesnt save time</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/time-set-doesnt-save-time/m-p/242407#M6842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kevin davis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you share some code, project or at least code snippet, just to be sure I test the same scenario which you have been having problems. It makes an entire process faster. Thank you.&lt;/P&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>Thu, 31 Jan 2013 07:38:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/time-set-doesnt-save-time/m-p/242407#M6842</guid>
      <dc:creator>c0170</dc:creator>
      <dc:date>2013-01-31T07:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: _time_set doesnt save time</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/time-set-doesnt-save-time/m-p/242408#M6843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh sure thing, sorry I prolly should have thought of it. This first part is from my main, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="_jivemacro_uid_13596443488874701 jive_text_macro jive_macro_code" jivemacro_uid="_13596443488874701" modifiedtitle="true"&gt;
&lt;P&gt;TIME_STRUCT mqx_time;&lt;/P&gt;
&lt;P&gt;mqx_time.SECONDS = 1356048000;&lt;/P&gt;
&lt;P&gt;_time_set(&amp;amp;mqx_time);&lt;/P&gt;
&lt;P&gt;_time_get(&amp;amp;mqx_time);&lt;/P&gt;
&lt;P&gt;printf("seconds = %i",mqx_time.SECONDS);&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This always prints 0 for seconds. when it should be printing what I set it to right above, 1356048000. I traced it as far into the PSP as I can understand, and I see some values change in the kernel, but I don't necessarily know how to tell if its doing that correctly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2013 15:00:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/time-set-doesnt-save-time/m-p/242408#M6843</guid>
      <dc:creator>kdavis</dc:creator>
      <dc:date>2013-01-31T15:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: _time_set doesnt save time</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/time-set-doesnt-save-time/m-p/242409#M6844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I notice you are not looking at the return values.&amp;nbsp; I suspect the "_time_set()" at line 3 is failing.&amp;nbsp; I see 2 errors in your code.&amp;nbsp; 1) you are using an uninitialized value from the stack.&amp;nbsp; 2) incorrect value for printf format string&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code should look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;TIME_STRUCT mqx_time;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-style: inherit; font-family: helvetica, arial; color: black; background-color: inherit; font-size: 9pt !important;"&gt;mqx_time.SECONDS = &lt;SPAN class="number" style="font-style: inherit; color: green; background-color: inherit; font-size: 9pt !important;"&gt;1356048000&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt;;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-family: helvetica, arial;"&gt;mqx_time.MILLISECONDS = 0;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-style: inherit; font-family: helvetica, arial; color: black; background-color: inherit; font-size: 9pt !important;"&gt;_time_set(&amp;amp;mqx_time);&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-style: inherit; font-family: helvetica, arial; color: black; background-color: inherit; font-size: 9pt !important;"&gt;_time_get(&amp;amp;mqx_time);&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-style: inherit; font-family: helvetica, arial; color: black; background-color: inherit; font-size: 9pt !important;"&gt;printf(&lt;SPAN class="string" style="font-style: inherit; color: blue; background-color: inherit; font-size: 9pt !important;"&gt;"seconds = %u"&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt;,mqx_time.SECONDS);&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&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>Thu, 31 Jan 2013 18:47:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/time-set-doesnt-save-time/m-p/242409#M6844</guid>
      <dc:creator>PhilH</dc:creator>
      <dc:date>2013-01-31T18:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: _time_set doesnt save time</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/time-set-doesnt-save-time/m-p/242410#M6845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are correct about those other errors, and I have changed those with no impact, however mqh.h defines the functions as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;extern void&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;&amp;nbsp; _time_get(TIME_STRUCT_PTR);&lt;/P&gt;&lt;P&gt;extern void&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;&amp;nbsp; _time_set(TIME_STRUCT_PTR);&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>Thu, 31 Jan 2013 20:16:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/time-set-doesnt-save-time/m-p/242410#M6845</guid>
      <dc:creator>kdavis</dc:creator>
      <dc:date>2013-01-31T20:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: _time_set doesnt save time</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/time-set-doesnt-save-time/m-p/242411#M6846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kevin Davis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tested this on K60 because I do not have currently MCF board available, and it worked as expected. This is basic functionality which must work out of box, there was one bug in _psp_ticks_to_time but that does not have any impact on your result.&lt;/P&gt;&lt;P&gt;Check locals in your debugger if there's really 0 in TIME_STRUCT :smileywink:&lt;/P&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>Fri, 01 Feb 2013 07:20:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/time-set-doesnt-save-time/m-p/242411#M6846</guid>
      <dc:creator>c0170</dc:creator>
      <dc:date>2013-02-01T07:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: _time_set doesnt save time</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/time-set-doesnt-save-time/m-p/242412#M6847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know, thats why its so strange, and it was working the other day, could I have changed something in the BSP to disable the time functions or something along those lines?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also here is the value of the time struct after get&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;mqx_time&lt;/TD&gt;&lt;TD&gt;0x440089e8&lt;/TD&gt;&lt;TD&gt;0x440089e8&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;SECONDS&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0x440089e8&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;MILLISECONDS&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;TD&gt;0x440089ec&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 14:34:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/time-set-doesnt-save-time/m-p/242412#M6847</guid>
      <dc:creator>kdavis</dc:creator>
      <dc:date>2013-02-01T14:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: _time_set doesnt save time</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/time-set-doesnt-save-time/m-p/242413#M6848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found the issue, it actually was due to something a coworker commited, for some reason they removed the add_ticks part to get_time, so it only ever returned the time from the start. Not sure why they did that yet, but that is what happened, thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2013 15:24:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/time-set-doesnt-save-time/m-p/242413#M6848</guid>
      <dc:creator>kdavis</dc:creator>
      <dc:date>2013-02-01T15:24:21Z</dc:date>
    </item>
  </channel>
</rss>

