<?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: PE generated RTC_Enable(NULL) issue in Kinetis Design Studio</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/PE-generated-RTC-Enable-NULL-issue/m-p/347567#M1241</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So maybe this is what you are asking - i thought it would be obvious - &lt;/P&gt;&lt;P&gt;From KDS 1.1.0 I component library - Alphabetical - clock on RTC_LDD. then alt-click to ADD to Project. Now I did it about a week ago and regenerated code a number of times for other components.&lt;/P&gt;&lt;P&gt;From Project Inspector, click on&amp;nbsp; ProcessorExpert.pe - Alt-Click and select&amp;nbsp; "Generate Processor Expert Code"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Oct 2014 16:33:57 GMT</pubDate>
    <dc:creator>neilhancock</dc:creator>
    <dc:date>2014-10-24T16:33:57Z</dc:date>
    <item>
      <title>PE generated RTC_Enable(NULL) issue</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/PE-generated-RTC-Enable-NULL-issue/m-p/347564#M1238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I seem to have come across an issue in KDS 1.1.0 with RTC_LDD component.&lt;/P&gt;&lt;P&gt;Am I missing something?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My target is MK20DX50 on FRDM-K20D50, and I've add component RTC_LDD.&lt;/P&gt;&lt;P&gt;It requires the RTC1 to be enabled, and in ComponentInspector.Methods, I click Enable - GenerateCode&lt;/P&gt;&lt;P&gt;The code it generates in RTC1.c looks like it is cut and pasted from another module and can;t work.&lt;/P&gt;&lt;P&gt;If I use RTC1_Enable(NULL); then it will use the NULL pointer without checking it.&lt;/P&gt;&lt;P&gt;If I try and create a&amp;nbsp; RTC1_TDeviceDataPtr its not declared in an available .h file&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead I use &lt;/P&gt;&lt;P&gt;&amp;nbsp; RTC_PDD_EnableCounter(RTC_BASE_PTR, PDD_ENABLE);&lt;/P&gt;&lt;P&gt;which works.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RTC1.c:&lt;/P&gt;&lt;P&gt;LDD_TError RTC1_Enable(LDD_TDeviceData *DeviceDataPtr) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; RTC1_TDeviceDataPtr DevDataPtr = (RTC1_TDeviceDataPtr)DeviceDataPtr;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Device clock configuration test - this test can be disabled by setting&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; the "Ignore speed mode test" property to the "yes" value in the "Configuration inspector" */&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (!DevDataPtr-&amp;gt;EnMode) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Is the device disabled by user? */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ERR_SPEED;&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;&amp;nbsp; /* If yes then error */&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; RTC_PDD_EnableCounter(RTC_BASE_PTR, PDD_ENABLE);&lt;/P&gt;&lt;P&gt;&amp;nbsp; return ERR_OK;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Oct 2014 22:19:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/PE-generated-RTC-Enable-NULL-issue/m-p/347564#M1238</guid>
      <dc:creator>neilhancock</dc:creator>
      <dc:date>2014-10-23T22:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: PE generated RTC_Enable(NULL) issue</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/PE-generated-RTC-Enable-NULL-issue/m-p/347565#M1239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello Neil,&lt;/P&gt;&lt;P&gt;can you please specify:&lt;/P&gt;&lt;P&gt;"The code it generates in RTC1.c looks like it is cut and pasted from another module and can;t work. &lt;/P&gt;&lt;P&gt;If I use RTC1_Enable(NULL); then it will use the NULL pointer without checking it." ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to avoid any misunderstanding , please specify your question with your demo project. &lt;/P&gt;&lt;P&gt;how to see your problem with project step by step, thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Zhang Jun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 07:45:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/PE-generated-RTC-Enable-NULL-issue/m-p/347565#M1239</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2014-10-24T07:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: PE generated RTC_Enable(NULL) issue</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/PE-generated-RTC-Enable-NULL-issue/m-p/347566#M1240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Zhang&lt;/P&gt;&lt;P&gt;I thought I had done what you asked for as a code snippet - but if you can't see a problem, I don't really care, as I have a workaround, just trying to point out what seems to me an error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I enable the RTC with &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;RTC1_Enable(NULL);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;I believe it will use the NULL pointer in a problem access.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;I can't set up a valid pointer, as the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; RTC1_TDeviceDataPtr&lt;/SPAN&gt; is in the RTC1.c file.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;In the inspector - there isn't a "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; the 'Ignore speed mode test" property to the "yes" value in the "Configuration inspector" '&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="U2.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/47047iA6A5B93385CD455B/image-size/large?v=v2&amp;amp;px=999" role="button" title="U2.jpg" alt="U2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 16:04:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/PE-generated-RTC-Enable-NULL-issue/m-p/347566#M1240</guid>
      <dc:creator>neilhancock</dc:creator>
      <dc:date>2014-10-24T16:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: PE generated RTC_Enable(NULL) issue</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/PE-generated-RTC-Enable-NULL-issue/m-p/347567#M1241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So maybe this is what you are asking - i thought it would be obvious - &lt;/P&gt;&lt;P&gt;From KDS 1.1.0 I component library - Alphabetical - clock on RTC_LDD. then alt-click to ADD to Project. Now I did it about a week ago and regenerated code a number of times for other components.&lt;/P&gt;&lt;P&gt;From Project Inspector, click on&amp;nbsp; ProcessorExpert.pe - Alt-Click and select&amp;nbsp; "Generate Processor Expert Code"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2014 16:33:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/PE-generated-RTC-Enable-NULL-issue/m-p/347567#M1241</guid>
      <dc:creator>neilhancock</dc:creator>
      <dc:date>2014-10-24T16:33:57Z</dc:date>
    </item>
  </channel>
</rss>

