<?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 Re: Get current time on RT1170-EVK in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Get-current-time-on-RT1170-EVK/m-p/1538524#M22062</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/207355"&gt;@Suijunqiang&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well, when you imported the code and drivers, did you remember to import the clock configuration settings too?&lt;/P&gt;&lt;P&gt;For example, I looked at the snvs_hp_rtc_cm7 SDK example, and it shows a dependence on&amp;nbsp;kCLOCK_SnvsHp.&lt;/P&gt;&lt;P&gt;If this clock is not configured (with the correct settings) in your merged project, then this could cause your problem, I think.&lt;/P&gt;&lt;P&gt;Let me know,&lt;/P&gt;&lt;P&gt;D_TTSA&lt;/P&gt;</description>
    <pubDate>Mon, 17 Oct 2022 11:23:33 GMT</pubDate>
    <dc:creator>D_TTSA</dc:creator>
    <dc:date>2022-10-17T11:23:33Z</dc:date>
    <item>
      <title>Get current time on RT1170-EVK</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Get-current-time-on-RT1170-EVK/m-p/1278833#M14290</link>
      <description>&lt;P&gt;Good day&lt;/P&gt;&lt;P&gt;I would like to get the current time since the standard Epoch (00:00 01-01-1970) on my RT1170-EVK.&lt;/P&gt;&lt;P&gt;In other words, I want to have the functionality of the time() function from time.h on my board.&lt;/P&gt;&lt;P&gt;This function just returns zero, so I tried other avenues (like the SNVS_HP &amp;amp; SNVS_LP drivers), but nothing could give me the CURRENT time from the Real-Time Clock.&lt;/P&gt;&lt;P&gt;With the SNVS drivers, I can only set a time and calculate differences in time.&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 09:08:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Get-current-time-on-RT1170-EVK/m-p/1278833#M14290</guid>
      <dc:creator>D_TTSA</dc:creator>
      <dc:date>2021-05-19T09:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Get current time on RT1170-EVK</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Get-current-time-on-RT1170-EVK/m-p/1278865#M14291</link>
      <description>&lt;P&gt;For any other newbies with a similar question:&lt;/P&gt;&lt;P&gt;I realised the solution is to just set the time to the current time using the SNVS_HP/LP driver, as in the example evkmimxrt1170_snvs_lp_srtc_cm4.&lt;/P&gt;&lt;P&gt;As long as the processor is powered, this will give you the 'current' time.&lt;/P&gt;&lt;P&gt;Most final implementations have a small battery to power the LP registers to keep the RTC value ticking.&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 09:37:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Get-current-time-on-RT1170-EVK/m-p/1278865#M14291</guid>
      <dc:creator>D_TTSA</dc:creator>
      <dc:date>2021-05-19T09:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: Get current time on RT1170-EVK</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Get-current-time-on-RT1170-EVK/m-p/1537429#M22028</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/185524"&gt;@D_TTSA&lt;/a&gt;&amp;nbsp; your&amp;nbsp;&lt;SPAN&gt;evkmimxrt1170_snvs_lp_srtc_cm4 example works well on my devices, but when I merge your code into my project get nothing&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Current datetime: hd-hd-hd hd:hd:hd", I have checked my code several times, but still not sure the reason, so would please give some comments?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks &amp;amp; Best Regards&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Sui&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 02:15:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Get-current-time-on-RT1170-EVK/m-p/1537429#M22028</guid>
      <dc:creator>Suijunqiang</dc:creator>
      <dc:date>2022-10-14T02:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: Get current time on RT1170-EVK</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Get-current-time-on-RT1170-EVK/m-p/1537664#M22035</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/207355"&gt;@Suijunqiang&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need more information to be able to help you.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;What do you mean by "merge your code into my project"? Did you import the correct drivers?&lt;/LI&gt;&lt;LI&gt;What do you mean by "get nothing"? What values are printed?&lt;/LI&gt;&lt;LI&gt;Do you want to hold the value when your device is switched off, and restore the clock value after a reboot? If not, please describe your desired functionality.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Fri, 14 Oct 2022 08:11:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Get-current-time-on-RT1170-EVK/m-p/1537664#M22035</guid>
      <dc:creator>D_TTSA</dc:creator>
      <dc:date>2022-10-14T08:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Get current time on RT1170-EVK</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Get-current-time-on-RT1170-EVK/m-p/1538160#M22048</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/185524"&gt;@D_TTSA&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your comments, and my answer as below in&lt;FONT color="#99CC00"&gt; green&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Best Regards&lt;/P&gt;&lt;P&gt;Sui&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.nxp.com/t5/user/viewprofilepage/user-id/207355" target="_blank"&gt;@Suijunqiang&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need more information to be able to help you.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;What do you mean by "merge your code into my project"? Did you import the correct drivers?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;FONT color="#99CC00"&gt;&amp;gt;&amp;gt;&amp;gt;I am using the example of "evkmimxrt1170_sd_jpeg_cm7" for the board of MIMXRT1170-EVK, and try to merge all your code as well as drivers(I try merge every thing), into the example.&lt;BR /&gt;By the way, the two projects work well independent.&lt;/FONT&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;What do you mean by "get nothing"? What values are printed?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;FONT color="#99CC00"&gt;&amp;gt;&amp;gt;&amp;gt;when &lt;EM&gt;PRINTF("Current datetime: %04hd-%02hd-%02hd %02hd:%02hd:%02hd\r\n", rtcDate.year, rtcDate.month, rtcDate.day,&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#99CC00"&gt;rtcDate.hour, rtcDate.minute, rtcDate.second);&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#99CC00"&gt;we get&amp;nbsp;&lt;EM&gt;"Current datetime: hd-hd-hd hd:hd:hd"&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Do you want to hold the value when your device is switched off, and restore the clock value after a reboot? If not, please describe your desired functionality.&lt;BR /&gt;&lt;FONT color="#99CC00"&gt;&amp;gt;&amp;gt;&amp;gt;No, at this moment we only need current time to verify how much time in different code operation;&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Mon, 17 Oct 2022 01:04:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Get-current-time-on-RT1170-EVK/m-p/1538160#M22048</guid>
      <dc:creator>Suijunqiang</dc:creator>
      <dc:date>2022-10-17T01:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Get current time on RT1170-EVK</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Get-current-time-on-RT1170-EVK/m-p/1538524#M22062</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/207355"&gt;@Suijunqiang&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well, when you imported the code and drivers, did you remember to import the clock configuration settings too?&lt;/P&gt;&lt;P&gt;For example, I looked at the snvs_hp_rtc_cm7 SDK example, and it shows a dependence on&amp;nbsp;kCLOCK_SnvsHp.&lt;/P&gt;&lt;P&gt;If this clock is not configured (with the correct settings) in your merged project, then this could cause your problem, I think.&lt;/P&gt;&lt;P&gt;Let me know,&lt;/P&gt;&lt;P&gt;D_TTSA&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 11:23:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Get-current-time-on-RT1170-EVK/m-p/1538524#M22062</guid>
      <dc:creator>D_TTSA</dc:creator>
      <dc:date>2022-10-17T11:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: Get current time on RT1170-EVK</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Get-current-time-on-RT1170-EVK/m-p/1538977#M22069</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/185524"&gt;@D_TTSA&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;How to set "&lt;SPAN&gt;kCLOCK_SnvsHp"&lt;/SPAN&gt; dependence in my project?&lt;BR /&gt;I have merged all your MACROs in to my code, also I searched "&lt;SPAN&gt;kCLOCK_SnvsHp" in your code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;sui@CNSHA1JTS517LP:/mnt/c/Users/3502594/src/nxp/evkmimxrt1170_snvs_hp_rtc_cm7$&lt;FONT color="#00FF00"&gt; find . -type f | xargs grep -i "kCLOCK_SnvsHp"&lt;/FONT&gt;&lt;BR /&gt;Binary file ./Debug/evkmimxrt1170_snvs_hp_rtc_cm7.axf matches&lt;BR /&gt;Binary file ./Debug/source/snvs_hp_rtc.o matches&lt;BR /&gt;grep: ./evkmimxrt1170_snvs_hp_rtc_cm7: No such file or directory&lt;BR /&gt;grep: LinkServer: No such file or directory&lt;BR /&gt;grep: Debug.launch: No such file or directory&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;./source/snvs_hp_rtc.c:#define kCLOCK_SnvsHp0 kCLOCK_SnvsHp&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/197021i880834D041393573/image-size/large?v=v2&amp;amp;px=999" role="button" title="0.png" alt="0.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 06:11:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Get-current-time-on-RT1170-EVK/m-p/1538977#M22069</guid>
      <dc:creator>Suijunqiang</dc:creator>
      <dc:date>2022-10-18T06:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: Get current time on RT1170-EVK</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Get-current-time-on-RT1170-EVK/m-p/1538996#M22070</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/207355"&gt;@Suijunqiang&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know why you are referring to the&amp;nbsp;&lt;STRONG&gt;CM4&lt;/STRONG&gt; example as "my" code - it is NXP's code.&lt;/P&gt;&lt;P&gt;I have looked into it again, and yes, you are correct - it's rather strange that the SDK example defines this macro, but does not use it (and kCLOCK_SnvsHp is not defined, but it doesn't give an error?).&lt;/P&gt;&lt;P&gt;Anyway, since you have copied the source code and drivers across from the SDK example into your code, there are two potential causes of the difference between the example project and your project. They are:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Project properties -&amp;gt; C/C++ General -&amp;gt; Paths and Symbols -&amp;gt; Symbols&lt;/LI&gt;&lt;LI&gt;The configuration file (.mex) that defines the pinmux and clock routing&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I see that the SDK examples do not have a .mex file by default. However, I think that it is most likely a pin problem, since, as mentioned above, the RTC does not seem to be dependent on a specific clock.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try to find all symbol, clock and pin differences between the two project. I'm quite certain that you will find your problem there.&lt;/P&gt;&lt;P&gt;D_TTSA&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 06:33:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Get-current-time-on-RT1170-EVK/m-p/1538996#M22070</guid>
      <dc:creator>D_TTSA</dc:creator>
      <dc:date>2022-10-18T06:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Get current time on RT1170-EVK</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Get-current-time-on-RT1170-EVK/m-p/1539894#M22095</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/185524"&gt;@D_TTSA&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ohaaaaaaaaa.....&lt;/P&gt;&lt;P&gt;Dear, D_TTSA,&lt;/P&gt;&lt;P&gt;It works fine now, the issue cause by the function of PRINTF formate .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Best Regards&lt;/P&gt;&lt;P&gt;Sui&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 08:00:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Get-current-time-on-RT1170-EVK/m-p/1539894#M22095</guid>
      <dc:creator>Suijunqiang</dc:creator>
      <dc:date>2022-10-19T08:00:36Z</dc:date>
    </item>
  </channel>
</rss>

