<?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>8-bit Microcontrollers中的主题 Re: SH4 external clock</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SH4-external-clock/m-p/167418#M10786</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By the external oscillator I mean an external component which produces 40 MHz square wave. The oscillator is connected to EXTAL pin of my MCU.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Dec 2010 01:10:04 GMT</pubDate>
    <dc:creator>gaminn</dc:creator>
    <dc:date>2010-12-07T01:10:04Z</dc:date>
    <item>
      <title>SH4 external clock</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SH4-external-clock/m-p/167417#M10785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I buought 40 MHz external oscillator. How to enable this clock in MCU (SH4) - what to write to registers?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Dec 2010 17:19:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SH4-external-clock/m-p/167417#M10785</guid>
      <dc:creator>gaminn</dc:creator>
      <dc:date>2010-12-06T17:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: SH4 external clock</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SH4-external-clock/m-p/167418#M10786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By the external oscillator I mean an external component which produces 40 MHz square wave. The oscillator is connected to EXTAL pin of my MCU.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Dec 2010 01:10:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SH4-external-clock/m-p/167418#M10786</guid>
      <dc:creator>gaminn</dc:creator>
      <dc:date>2010-12-07T01:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: SH4 external clock</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SH4-external-clock/m-p/167419#M10787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Martin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To use the 40MHz external oscillator module, you will need to select FBELP mode, as described in the data sheet.&amp;nbsp; However, for FBELP mode you will not be able to debug since the BDM will be disabled in this mode.&amp;nbsp; You will probably need to do your debugging using FEI mode.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is your reason for choosing to use this particular oscillator module?&amp;nbsp; Using a 5MHz oscillator or crystal&amp;nbsp;would make it feasible to use FEE mode, and still achieve the maximum bus frequency.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Dec 2010 02:02:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SH4-external-clock/m-p/167419#M10787</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-12-07T02:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: SH4 external clock</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SH4-external-clock/m-p/167420#M10788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply. I tried to run this code at the beggining of my program:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ICSC1 = 0b10000000; //&amp;nbsp;CLKS = 0b10&lt;BR /&gt;ICSC2 = 0b00001000; // LP = 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but with no success.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it the code that should enable FBELP mode? What should be the level of my external oscillator output? &amp;nbsp;Must it be 0 - Vcc or can it be less?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need precise clock for my application. I think I can't achieve 50 ppm over 0-70°C by using crystal + internal MCUs oscillator and PLL. Or can I?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Dec 2010 02:44:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SH4-external-clock/m-p/167420#M10788</guid>
      <dc:creator>gaminn</dc:creator>
      <dc:date>2010-12-07T02:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: SH4 external clock</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SH4-external-clock/m-p/167421#M10789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Martin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Perhaps the RANGE bit, within ICSC2, should be set for high frequency operation, even though you are using an external oscillator module.&amp;nbsp; The output from the module will need to be a square wave with&amp;nbsp;full logic swing at 5 volts, particularly at the frequency you are using.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a much lower oscillator frequency of, say 5 MHz, a lower swing may be tolerated by configuring as an external&amp;nbsp;crystal, complete with bias resistor between the two oscillator pins at the MCU, and then AC coupling the oscillator module output into EXTAL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you fail to enter FBELP mode, does operation continue in the default FEI mode?&amp;nbsp; Another factor might be that, if the BDM is active when you attempt to switch for FBELP mode, this may prevent the switching from occuring.&amp;nbsp; I am not sure about this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using a suitable crystal, achieving 50ppm stability over 0-70 degree C may be achievable, but would be difficult with the Pierce oscillator configuration used, due to temperature variation of the load capacitance.&amp;nbsp; Even if the external capacitors are NPO type,&amp;nbsp;the pin capacitance will appear in parallel with each capacitor, and will be a significant component&amp;nbsp;when a low capacitance crystal is used.&amp;nbsp; You would also need to provide frequency trimming of the reference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, an oscillator module of 5MHz maximum frequency might be utilised.&amp;nbsp; When using FEE mode, the bus frequency would be subject to short term jitter, a characteristic of the FLL circuit, but this will not affect the long term frequency accuracy.&amp;nbsp; The jitter can be avoided within the timing modules, by choosing a clock source other than the bus frequency.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The RTC module may alternatively be driven by ICSERCLK, directly from your external oscillator.&amp;nbsp; The TPM and MTIM modules may alternatively be driven by one half the ICSFFCLK frequency.&amp;nbsp; For a 4MHz oscillator this would be 15.626 kHz, and for a 5MHz oscillator, 19.53125 kHz.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Dec 2010 13:02:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SH4-external-clock/m-p/167421#M10789</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-12-07T13:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: SH4 external clock</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SH4-external-clock/m-p/167422#M10790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello bigmac,&lt;/P&gt;&lt;P&gt;I have probably suceeded in enabling external 40 MHz clock. See this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;void main(void) {  volatile unsigned char i = 0;    ICSC1 = 0b10000000;  ICSC2 = 0b00101010;  PTADD_PTADD0 = 1
   for(;;) {    PTAD_PTAD0 = 1;    PTAD_PTAD0 = 0;    i = ICSSC;    __RESET_WATCHDOG();  }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I connected oscilloscope to the PTA0 pin. I can see square wave, its high level (that is time between PTAD_PTAD0 = 1; and PTAD_PTAD0 = 0&lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" id="smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt; lasts for 250 ns, that is 4 MHz. Considering that BCLR instruction needs 5 cycles (bus cycles?), I get 20 MHz of bus clock and 40 MHz (2 * 20) of system clock.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I'm little confused - I can debug (run, stop, step, set breakpoint) my MCU.. &amp;nbsp;I use Codewarrior 5.9.0 and USBDM 4.0 (USBDM-CF). How is it possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:14:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SH4-external-clock/m-p/167422#M10790</guid>
      <dc:creator>gaminn</dc:creator>
      <dc:date>2020-10-29T09:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: SH4 external clock</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SH4-external-clock/m-p/167423#M10791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Martin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe it is possible that the MCU mode does not switch because BDM is already active, and remains running in FEI mode, with a bus frequency of approximately 20 MHz.&amp;nbsp; Reading the ICSSC register should reveal whether this is the case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 13:55:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SH4-external-clock/m-p/167423#M10791</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-12-08T13:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: SH4 external clock</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SH4-external-clock/m-p/167424#M10792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello bigmac,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sorry, I forgot to mention that I can see that ICSSC holds 0x08 value during debugging. It means, that the MCU runs from external clock...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 15:11:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SH4-external-clock/m-p/167424#M10792</guid>
      <dc:creator>gaminn</dc:creator>
      <dc:date>2010-12-08T15:11:09Z</dc:date>
    </item>
  </channel>
</rss>

