<?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: KL03Z: How to see the 1Hz RTC Clock on RTC_CLKOUT? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-How-to-see-the-1Hz-RTC-Clock-on-RTC-CLKOUT/m-p/727459#M44470</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sara&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As long as you have the RTC operating the only thing needed to output RTC_CLKOUT (1Hz) is to select ALT3 use of PTB13.&lt;BR /&gt;I do it like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;_CONFIG_PERIPHERAL(B, 13, (PB_13_RTC_CLKOUT | PORT_SRE_SLOW | PORT_DSE_LOW));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;which equates to &lt;BR /&gt;1. Enable clocks to port B&lt;BR /&gt;2. Set PTB13 to ALT3 function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;You don't need to set the DDR since it is not used for peripheral functions.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you get no output it is likely to be that the RTC is not operating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is a binary file that you can load to the FRDM-KL03Z which outputs the clock. Use a debugger to check the registers and compare to yours.&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;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. The PAD thing has to do with the fact that PTB13 GPIO and CLKOUT32K are shared. You can ignore it when using RTC_CLKOUT (ALT3 peripheral functions).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 28 Oct 2017 01:03:03 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2017-10-28T01:03:03Z</dc:date>
    <item>
      <title>KL03Z: How to see the 1Hz RTC Clock on RTC_CLKOUT?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-How-to-see-the-1Hz-RTC-Clock-on-RTC-CLKOUT/m-p/727458#M44469</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;I've been trying unsuccessfully to get the 1Hz RTC clock to appear on PTB13, the RTC_CLKOUT pin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I am doing to set-up the RTC and clocks to enable this to happen:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// (01)Set the clock ERCLK32K output on pin13, (00) clock not output&lt;/P&gt;&lt;P&gt;SIM_BWR_SOPT1_OSC32KOUT(SIM_BASE_PTR,0b00); &lt;/P&gt;&lt;P&gt;&amp;nbsp;// Enable access and interrupts for RTC&lt;/P&gt;&lt;P&gt;SIM_BWR_SCGC6_RTC(SIM_BASE_PTR, 1);&lt;BR /&gt;// Enable a clock for the RTC so it can output the 1Hz clock, OSC32KCLK (00), LPO(11), RTC_CLKIN (10)&amp;nbsp;&lt;/P&gt;&lt;P&gt;SIM_BWR_SOPT1_OSC32KSEL(SIM_BASE_PTR, 0b11); &lt;/P&gt;&lt;P&gt;//Selects the RTC 1Hz (0) or OSCERCLK (1) Clock for output on RTC_CLKOUT pin&lt;/P&gt;&lt;P&gt;SIM_BWR_SOPT2_RTCCLKOUTSEL(SIM_BASE_PTR, 0); &lt;/P&gt;&lt;P&gt;//Enable the time counter&lt;/P&gt;&lt;P&gt;RTC_SR=0b00000000000000000000000000010001; &lt;/P&gt;&lt;P&gt;//Enable the port&lt;/P&gt;&lt;P&gt;PORT_BWR_PCR_MUX(PORTB, 13, 0b011); //Set the Alt3 muxing on PortB, pin 13 for RTC_CLKOUT&lt;BR /&gt;GPIO_SET_PDDR(GPIOB, 1U&amp;lt;&amp;lt;13); //Set PORTB pin 13 to output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This does not work, I get a flat line on PTB13. I have played with the sequence of some of these commands, like enabling the time counter RTC_SR after the port definition, but no change. If I change the RTCCLKOUTSEL to 1, I do see the correct signal on PTB13. I am puzzled! Is there something I'm missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, what is the meaning of "Pad Interface" in Figure 5-4 from the user's manual?&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/6976i269DCF208ADE82E0/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;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Oct 2017 19:51:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-How-to-see-the-1Hz-RTC-Clock-on-RTC-CLKOUT/m-p/727458#M44469</guid>
      <dc:creator>sarastout-grand</dc:creator>
      <dc:date>2017-10-26T19:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: KL03Z: How to see the 1Hz RTC Clock on RTC_CLKOUT?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-How-to-see-the-1Hz-RTC-Clock-on-RTC-CLKOUT/m-p/727459#M44470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sara&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As long as you have the RTC operating the only thing needed to output RTC_CLKOUT (1Hz) is to select ALT3 use of PTB13.&lt;BR /&gt;I do it like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;_CONFIG_PERIPHERAL(B, 13, (PB_13_RTC_CLKOUT | PORT_SRE_SLOW | PORT_DSE_LOW));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;which equates to &lt;BR /&gt;1. Enable clocks to port B&lt;BR /&gt;2. Set PTB13 to ALT3 function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;You don't need to set the DDR since it is not used for peripheral functions.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you get no output it is likely to be that the RTC is not operating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is a binary file that you can load to the FRDM-KL03Z which outputs the clock. Use a debugger to check the registers and compare to yours.&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;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. The PAD thing has to do with the fact that PTB13 GPIO and CLKOUT32K are shared. You can ignore it when using RTC_CLKOUT (ALT3 peripheral functions).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Oct 2017 01:03:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03Z-How-to-see-the-1Hz-RTC-Clock-on-RTC-CLKOUT/m-p/727459#M44470</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-10-28T01:03:03Z</dc:date>
    </item>
  </channel>
</rss>

