<?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: S08RNA4 Internal clock setting in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/S08RNA4-Internal-clock-setting/m-p/284666#M20351</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Derrick,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I debugged the code&amp;nbsp; and the Default value is not what they have mentioned in datasheet WDOG_TOVAL : 0x09C4=2500 instant of that it's WDOG_TOVAL :0x0004.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am really sorry to say but this is the first time i am using Freescale controller and really having very bad experience with datasheet.I can't trust anymore default values also&amp;nbsp; from now on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case 4msec what they mentioned as defult reset time does make sense&amp;nbsp; @ 1Khz frequency with the tolerance mentioned in datasheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the problem is i am getting 9.18msec which is far more than the tolerance they have mentioned.why??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Nov 2013 09:15:09 GMT</pubDate>
    <dc:creator>Robinwithu</dc:creator>
    <dc:date>2013-11-19T09:15:09Z</dc:date>
    <item>
      <title>S08RNA4 Internal clock setting</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/S08RNA4-Internal-clock-setting/m-p/284660#M20345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everybody,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need help regarding internal clock setting of S9S08RNA4 freescale controller&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; void main(void)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DisableInterrupts;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __RESET_WATCHDOG();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Watchdog Timer is enabled : is having 1 Khz Internal Default clock and Default Values of&amp;nbsp; appx. msec but&lt;/P&gt;&lt;P&gt;&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;&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;&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; // in code m gettting 9.21 msec , don't know why&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ICS_C1 = 0x04;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // internal reference clock to FLL and FLL is generating 16000 Khz&amp;nbsp; ; Ref. Freqeuncy&amp;nbsp; is set at 31250 Hz * 512 = Appx.16 Mhz &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ICS_C2 = 0x00;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // BDIV = 00, Freq is now 16Mhz &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ICS_C3 = 0x60;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Trimmed Value of Internal System Frequency&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORT_PTAOE = 0x0F;&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;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Define PortA (A0-A3) all Pin As Output&amp;nbsp; ; one is Output Enabled and Zero is Output Disabled for Data Direction &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORT_PTBOE = 0x00; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORT_PTBIE = 0x30;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; Define PortB (B4 and B5) as Input Pin&amp;nbsp; ; one is Input Enabled and Zero is Input Disabled for Data Direction &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORT_PTAD =&amp;nbsp; 0x00;&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;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Initialise the PORTA &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORT_PTBD =&amp;nbsp; 0x00;&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;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Initialise The PORTB &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(1){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORT_PTAD =&amp;nbsp; 0x0F;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(100);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PORT_PTAD =&amp;nbsp; 0x00;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(100);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; void delay(int k) {&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int delay ;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (delay=0;delay&amp;lt;k;delay++);&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So in above code i am having two questions&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Why i am getting Delay Period of 130µsec 'On' and 130µsec OFF .@ 16Mhz Frequency .I am expecting&amp;nbsp; 1/16Mhz= 6.25 µsec&lt;/P&gt;&lt;P&gt;2) Default Reset time of Watchdog is appx. 4msec but i am getting 9.18msec .&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please find Ref.manual for S9S08RN4&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Nov 2013 14:17:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/S08RNA4-Internal-clock-setting/m-p/284660#M20345</guid>
      <dc:creator>Robinwithu</dc:creator>
      <dc:date>2013-11-18T14:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: S08RNA4 Internal clock setting</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/S08RNA4-Internal-clock-setting/m-p/284661#M20346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without looking at the manual you attached I'd make a guess that the bus clock is always half the cpu clock before any further divisions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Nov 2013 17:26:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/S08RNA4-Internal-clock-setting/m-p/284661#M20346</guid>
      <dc:creator>iansmusical</dc:creator>
      <dc:date>2013-11-18T17:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: S08RNA4 Internal clock setting</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/S08RNA4-Internal-clock-setting/m-p/284662#M20347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Legg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Off course i looked manual and i know that the bus clock is always half the cpu clock in Default mode , but the problem is i am not getting the result what i am expecting with this delay and also in manual if you see the Setting of&amp;nbsp; ICS_C2 and ICS_C3 register on page 140&amp;nbsp; it looks like their is some mistake.can you please have a look on page 140 and tell me that is that setting for 20Mhz and 5Mhz is correct? and also Watch dog timer&amp;nbsp; , why i am getting&amp;nbsp; reset after 9.2 msec (Deafult) instant of 4msec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Nov 2013 18:07:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/S08RNA4-Internal-clock-setting/m-p/284662#M20347</guid>
      <dc:creator>Robinwithu</dc:creator>
      <dc:date>2013-11-18T18:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: S08RNA4 Internal clock setting</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/S08RNA4-Internal-clock-setting/m-p/284663#M20348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry I didn't mean to imply you hadn't read the manual. I've taken a look at page 40 and yes the register names are incorrect but the descriptions for 20MHz and 5MHz do seem to be correct. For example, take 20MHz and divide by 32 gives 500KHz. Of course, whether these values when actually written to the registers generate this frequency is perhaps questionable!?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To me there is an extra divide by 2 occurring somewhere, so while it's intended to have a 20MHz bus clock, it's actually 10MHz. Have you tried putting an oscilloscope on the LED output pins and just toggling them on and off without a delay? That way you can calculate the exact number of cycles the instruction(s) take to perform the toggle and measure it on the oscilloscope.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My experience with early Freescale documentation for MPC5xxx parts is that and I'm sorry to say Freescale, not good! I had a chip that claimed a 16MHz default internal clock which was really running at 15MHz but not explained anywhere. Perhaps there is an issue like this within the RN series!?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Nov 2013 20:34:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/S08RNA4-Internal-clock-setting/m-p/284663#M20348</guid>
      <dc:creator>iansmusical</dc:creator>
      <dc:date>2013-11-18T20:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: S08RNA4 Internal clock setting</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/S08RNA4-Internal-clock-setting/m-p/284664#M20349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Pradeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the S08RNA4 the CPU is being clocked at the same rate as the bus – i.e., there is no divide-by-2.&amp;nbsp; Please refer to Figure 1-2 “System clock distribution diagram”.&amp;nbsp; The S08RN and S08Px families use a newer, lower power implementation of the CPU (HCS08 V6) which is capable of being clocked at the same frequency as the bus.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a CPU/bus frequency of 20MHz you should not need to write to register ICS_C3 as per the following description found on page 134:&lt;/P&gt;&lt;P&gt;“All MCU devices are factory programmed with a trim value in a factory reserved memory location. This value is uploaded to the ICS_C3 register and ICS_C4 register during any reset initialization.”&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to the specifications in the corresponding data sheet, the factory trim value should be for 39.0625kHz.&amp;nbsp; In FEI mode this gets multiplied by 512 resulting in a CPU/bus frequency of 20MHz.&amp;nbsp; If this is not the frequency which you desire, I suggest instructing the debug tool (i.e., CodeWarrior) to measure, calculate and store a trim value.&amp;nbsp; Your code will then need to copy this into ICS_C3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’m not sure how you arrived at the value of 0x60 for the ICS_C3 register, but this value really can’t be fixed as it will vary from device to device.&amp;nbsp; This is why the BDM interface tool will need to calculate the appropriate trim value for the MCU which it is programming.&amp;nbsp; The result of this calculation is stored at a fixed location in Flash and your program would then copy this value into ICS_C3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I disassemble your delay routine I calculate that the port pins will toggle approximately every 2454 cycles.&amp;nbsp; For k &amp;lt;256, your delay routine calculation is 42 + (24 × k) cycles.&amp;nbsp; For a value of 100, your delay routine needs 2442 cycles:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 24: void delay (int k)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;delay:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;00000009 89&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PSHX&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;0000000A 8B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PSHH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;0000000B A7FE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AIS&amp;nbsp;&amp;nbsp;&amp;nbsp; #-2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 27:&amp;nbsp;&amp;nbsp; for (delay=0; delay&amp;lt;k; delay++);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;0000000D 95&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TSX&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; ; 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;0000000E 6F01&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLR&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,X&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; 5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;00000010 7F&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLR&amp;nbsp;&amp;nbsp;&amp;nbsp; ,X&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; 4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;00000011 2006&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BRA&amp;nbsp;&amp;nbsp;&amp;nbsp; *+8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; 3&amp;nbsp;&amp;nbsp; abs = 0x0019&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;00000013 95&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TSX&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; ; 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;00000014 6C01&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INC&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,X&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; 5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;00000016 2601&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BNE&amp;nbsp;&amp;nbsp;&amp;nbsp; *+3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; 3&amp;nbsp;&amp;nbsp; abs = 0x0019&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;00000018 7C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INC&amp;nbsp;&amp;nbsp;&amp;nbsp; ,X&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; 4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;00000019 9EFE03&amp;nbsp;&amp;nbsp; LDHX&amp;nbsp;&amp;nbsp; 3,SP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; 5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;0000001C 9EF301&amp;nbsp;&amp;nbsp; CPHX&amp;nbsp;&amp;nbsp; 1,SP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; 6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;0000001F 92F2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BGT&amp;nbsp;&amp;nbsp;&amp;nbsp; *-12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; 3&amp;nbsp;&amp;nbsp; abs = 0x0013&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; 28: }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;00000021 A704&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AIS&amp;nbsp;&amp;nbsp;&amp;nbsp; #4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: 10pt;"&gt;00000023 81&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RTS&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; ; 6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using your measurement of 130μs on and off, I calculate that your bus is actually running at about 18.9MHz and that the internal reference is being trimmed to approximately 36869kHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, a faster way to write your delay routine would be:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;void&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;delay&lt;/STRONG&gt; (&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;int&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; k)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;for&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; (; k!=0;k--);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if k &amp;lt;256, this would be even faster:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;void&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; &lt;STRONG&gt;delay&lt;/STRONG&gt; (&lt;/SPAN&gt;&lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;char&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; k)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG style="color: #7f0055; font-size: 10pt; font-family: Consolas;"&gt;for&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt; (; k!=0;k--);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; color: black; font-size: 10pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although I would prefer to use “uint8_t” and “uint16_t” instead of “char” and “int”, respectively.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the watchdog, you do not indicate that you are changing any of its default settings.&amp;nbsp; Upon reset, the watchdog timeout value is set to 0x09C4 = 2500 and its clock source is the internal 1kHz low-power oscillator.&amp;nbsp; The accuracy of this oscillator is specified as being in the range between 670Hz and 1.25kHz.&amp;nbsp;&amp;nbsp; This should result in a watchdog timeout of approximately 2.5 seconds (i.e., between 2 and 3.73 seconds).&amp;nbsp; In order to get a watchdog timeout of less than 10ms, you must be writing to the watchdog registers.&amp;nbsp; I suggest taking a look at these registers via the debugger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Derrick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Nov 2013 21:48:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/S08RNA4-Internal-clock-setting/m-p/284664#M20349</guid>
      <dc:creator>Derrick</dc:creator>
      <dc:date>2013-11-18T21:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: S08RNA4 Internal clock setting</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/S08RNA4-Internal-clock-setting/m-p/284665#M20350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Derrick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for Answer .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the S08RNA4 the CPU is being clocked at the same rate as the bus – i.e., there is no divide-by-2.&amp;nbsp; Please refer to Figure 1-2 “System clock distribution diagram”.&amp;nbsp; The S08RN and S08Px families use a newer, lower power implementation of the CPU (HCS08 V6) which is capable of being clocked at the same frequency as the bus.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;:Sorry may be i am Wrong but what&amp;nbsp; I said in a Default mode&amp;nbsp; means , If i am not changing the values of ICS_C1 , ICS_C2 and ICS_C3 register and using as it is default programmed vaules than CPU is running at Appx. 8Mhz , half of Bus clock.Also in Figure 1 as you mentioned , i can see that the CPU frequency is circa 8Mhz not 20Mhz After reset.(Bdiv = 2) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a CPU/bus frequency of 20MHz you should not need to write to register ICS_C3 as per the following description found on page 134: &lt;/P&gt;&lt;P&gt;: please correct me if i am wrong to Operate my CPU at 20Mhz , I Must change the value of ICS_C1=0X04 and ICS_C2=0X00 (Default 0x20) and can i do the setting for Reference frequency&amp;nbsp; value in code worrior Run=&amp;gt; Run configuration=&amp;gt;Target Settings=&amp;gt; Edit=&amp;gt;Advance Programming Option =&amp;gt; use custom refrence frequency =&amp;gt;&amp;nbsp; 39.0625Khz , does it will work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;“All MCU devices are factory programmed with a trim value in a factory reserved memory location. This value is uploaded to the ICS_C3 register and ICS_C4 register during any reset initialization.”&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;:&amp;nbsp; Here i would like to know.on Page nr 140 the values of ICS_C1, ICS_C2 and ICS_C3 what they mentioned for 20Mhz or for 5 Mhz or for 500 Khz , How that is possible cause they are not using ICS_C2 and Writting the values only&amp;nbsp; in Trimming Register ICS_C3?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I disassemble your delay routine I calculate that the port pins will toggle approximately every 2454 cycles.&amp;nbsp; For k &amp;lt;256, your delay routine calculation is 42 + (24 × k) cycles.&amp;nbsp; For a value of 100, your delay routine needs 2442 cycles:&lt;/P&gt;&lt;P&gt;please could you tell me in datasheet where they mentioned the formula for k&amp;lt;256,&amp;nbsp; 42 + (24 × k) cycles ???? what is the formula to calculate delay ,if i have int or long int variable ???&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the watchdog, you do not indicate that you are changing any of its default settings.&amp;nbsp; Upon reset, the watchdog timeout value is set to 0x09C4 = 2500 and its clock source is the internal 1kHz low-power oscillator.&amp;nbsp; The accuracy of this oscillator is specified as being in the range between 670Hz and 1.25kHz.&amp;nbsp;&amp;nbsp; This should result in a watchdog timeout of approximately 2.5 seconds (i.e., between 2 and 3.73 seconds).&amp;nbsp; In order to get a watchdog timeout of less than 10ms, you must be writing to the watchdog registers.&amp;nbsp; I suggest taking a look at these registers via the debugger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually for WDT i am using it in default mode and in my code in while loop i am only switching the LED ON i.e.PORT_PTAD =&amp;nbsp; 0x0F; it means that code will come out only after WDT reset from forever while loop and what i can see on my Oscilloscope is it's resetting after every 9.18msec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please see on Page 313 they mentioned "1. The default timeout value after reset is approximately 4 ms." just above the NOTE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;pradeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 08:56:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/S08RNA4-Internal-clock-setting/m-p/284665#M20350</guid>
      <dc:creator>Robinwithu</dc:creator>
      <dc:date>2013-11-19T08:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: S08RNA4 Internal clock setting</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/S08RNA4-Internal-clock-setting/m-p/284666#M20351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Derrick,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I debugged the code&amp;nbsp; and the Default value is not what they have mentioned in datasheet WDOG_TOVAL : 0x09C4=2500 instant of that it's WDOG_TOVAL :0x0004.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am really sorry to say but this is the first time i am using Freescale controller and really having very bad experience with datasheet.I can't trust anymore default values also&amp;nbsp; from now on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case 4msec what they mentioned as defult reset time does make sense&amp;nbsp; @ 1Khz frequency with the tolerance mentioned in datasheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the problem is i am getting 9.18msec which is far more than the tolerance they have mentioned.why??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 09:15:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/S08RNA4-Internal-clock-setting/m-p/284666#M20351</guid>
      <dc:creator>Robinwithu</dc:creator>
      <dc:date>2013-11-19T09:15:09Z</dc:date>
    </item>
  </channel>
</rss>

