<?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>LPC MicrocontrollersのトピックRe: SDK CLOCK_SetupFROClocking API of LPC546XX</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/SDK-CLOCK-SetupFROClocking-API-of-LPC546XX/m-p/724962#M29312</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are right, thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Mar 2018 08:18:36 GMT</pubDate>
    <dc:creator>daweiyou</dc:creator>
    <dc:date>2018-03-16T08:18:36Z</dc:date>
    <item>
      <title>SDK CLOCK_SetupFROClocking API of LPC546XX</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SDK-CLOCK-SetupFROClocking-API-of-LPC546XX/m-p/724960#M29310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SDK 2.3, it provide&amp;nbsp;CLOCK_SetupFROClocking API to setup FRO, the FRO have FREQTRIM field with factory trim for 96MHz FRO. I have two questions about this field and API:&lt;/P&gt;&lt;P&gt;1.If Select 48MHz FRO output, is&amp;nbsp;the trim field same as 96MHz trim setting?&lt;/P&gt;&lt;P&gt;2.why SDK API could hard code the trim value? since factory trim, the trim value is maybe different.&lt;/P&gt;&lt;P&gt;thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define INDEX_SECTOR_TRIM48 ((uint32_t *)0x01000448U)&lt;BR /&gt;#define INDEX_SECTOR_TRIM96 ((uint32_t *)0x0100044CU)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Set FRO Clocking */&lt;BR /&gt;status_t CLOCK_SetupFROClocking(uint32_t iFreq)&lt;BR /&gt;{&lt;BR /&gt; uint32_t usb_adj;&lt;BR /&gt; if ((iFreq != 12000000U) &amp;amp;&amp;amp; (iFreq != 48000000U) &amp;amp;&amp;amp; (iFreq != 96000000U))&lt;BR /&gt; {&lt;BR /&gt; return kStatus_Fail;&lt;BR /&gt; }&lt;BR /&gt; /* Power up the FRO and set this as the base clock */&lt;BR /&gt; POWER_DisablePD(kPDRUNCFG_PD_FRO_EN);&lt;BR /&gt; /* back up the value of whether USB adj is selected, in which case we will have a value of 1 else 0 */&lt;BR /&gt; usb_adj = ((SYSCON-&amp;gt;FROCTRL) &amp;amp; SYSCON_FROCTRL_USBCLKADJ_MASK) &amp;gt;&amp;gt; SYSCON_FROCTRL_USBCLKADJ_SHIFT;&lt;BR /&gt; if (iFreq &amp;gt; 12000000U)&lt;BR /&gt; {&lt;BR /&gt; if (iFreq == 96000000U)&lt;BR /&gt; {&lt;BR /&gt; SYSCON-&amp;gt;FROCTRL = ((SYSCON_FROCTRL_TRIM_MASK | SYSCON_FROCTRL_FREQTRIM_MASK) &amp;amp; *INDEX_SECTOR_TRIM96) |&lt;BR /&gt; SYSCON_FROCTRL_SEL(1) | SYSCON_FROCTRL_WRTRIM(1) | SYSCON_FROCTRL_USBCLKADJ(usb_adj) |&lt;BR /&gt; SYSCON_FROCTRL_HSPDCLK(1);&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt; SYSCON-&amp;gt;FROCTRL = ((SYSCON_FROCTRL_TRIM_MASK | SYSCON_FROCTRL_FREQTRIM_MASK) &amp;amp; *INDEX_SECTOR_TRIM48) |&lt;BR /&gt; SYSCON_FROCTRL_SEL(0) | SYSCON_FROCTRL_WRTRIM(1) | SYSCON_FROCTRL_USBCLKADJ(usb_adj) |&lt;BR /&gt; SYSCON_FROCTRL_HSPDCLK(1);&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt; SYSCON-&amp;gt;FROCTRL &amp;amp;= ~SYSCON_FROCTRL_HSPDCLK(1);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;return 0U;&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Mar 2018 02:43:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SDK-CLOCK-SetupFROClocking-API-of-LPC546XX/m-p/724960#M29310</guid>
      <dc:creator>daweiyou</dc:creator>
      <dc:date>2018-03-04T02:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: SDK CLOCK_SetupFROClocking API of LPC546XX</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SDK-CLOCK-SetupFROClocking-API-of-LPC546XX/m-p/724961#M29311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dawei,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.If Select 48MHz FRO output, is&amp;nbsp;the trim field same as 96MHz trim setting?&lt;/P&gt;&lt;P&gt;TS: The factory trim value was saved at internal ROM address, the different frequency using the different address.&lt;/P&gt;&lt;P&gt;As macro definition,&lt;/P&gt;&lt;P&gt;#define INDEX_SECTOR_TRIM48 ((uint32_t *)0x01000448U)&lt;BR /&gt;#define INDEX_SECTOR_TRIM96 ((uint32_t *)0x0100044CU)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.why SDK API could hard code the trim value? since factory trim, the trim value is maybe different.&lt;/P&gt;&lt;P&gt;TS: I did a test with two LPCXpresso54608 boards to call the same CLOCK_SetupFROClocking(48000000U) function,&lt;/P&gt;&lt;P&gt;the SYSCON_FROCTRL [FREQTRIM] bits with different value.&lt;/P&gt;&lt;P&gt;That means the there with different trim value during factory trim phase and storage at&amp;nbsp; ROM address 0x01000448.&lt;/P&gt;&lt;P&gt;First board:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/45559i7B83E6B34F0C408D/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Second board:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/45781iEB1B9E0A137AC575/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Below is SYSCON_FROCTRL register value after call BOARD_BootClockFROHF96M() function:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/50020i715762B5C9DD92E3/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Mike&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2018 09:17:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SDK-CLOCK-SetupFROClocking-API-of-LPC546XX/m-p/724961#M29311</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2018-03-06T09:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: SDK CLOCK_SetupFROClocking API of LPC546XX</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SDK-CLOCK-SetupFROClocking-API-of-LPC546XX/m-p/724962#M29312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are right, thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2018 08:18:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SDK-CLOCK-SetupFROClocking-API-of-LPC546XX/m-p/724962#M29312</guid>
      <dc:creator>daweiyou</dc:creator>
      <dc:date>2018-03-16T08:18:36Z</dc:date>
    </item>
  </channel>
</rss>

