<?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: MK 64 UART0 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK-64-UART0/m-p/888508#M52569</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please Send us replay, we need Support ASAP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Jan 2019 03:49:51 GMT</pubDate>
    <dc:creator>chaitanyakulkar</dc:creator>
    <dc:date>2019-01-23T03:49:51Z</dc:date>
    <item>
      <title>MK 64 UART0</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK-64-UART0/m-p/888507#M52568</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 am using MK64 UART0 independently on PORT A 14,15 and PORTB&amp;nbsp; 16,17&amp;nbsp; By using Pin mux. but i need to use UART0 on PORT B 16,17 and for Some instant we need to switch its PIN mux. on PORT A 14,15. and After that condition we need to re-innitialised to PORT B 16,17.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SO For Same thing i made on function in which&amp;nbsp;&lt;/P&gt;&lt;P&gt;i) Disable IRQ 31.&lt;/P&gt;&lt;P&gt;ii) Disable Transmission and Reception.&lt;/P&gt;&lt;P&gt;iii) Pin Muxing UART 0 For Particular pin.&lt;/P&gt;&lt;P&gt;iv) Re-Configure interrupt.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after using this My function well Performing Transition from PORT B to PORT A Switching .but After PORT A 14,15 Transmission and Reception finished we are calling Same function then Switching from PORT A&amp;nbsp; to PORT B is not going to happen.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following Function&amp;nbsp; I Have Created&amp;nbsp;&lt;/P&gt;&lt;P&gt;/************************************************************************************************************/&lt;/P&gt;&lt;P&gt;void init_UART0_Printer_DSC_Selection(char DSC_PRINTER_VAL)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt; int CLK_VAL; &lt;/P&gt;&lt;P&gt;disable_irq(31); //FOR UART0 module&lt;BR /&gt; SIM_SOPT5 |= SIM_SOPT5_UART0RXSRC(0x00)|SIM_SOPT5_UART0TXSRC(0x00);&lt;/P&gt;&lt;P&gt;core_clk_mhz = EXTRENAL_CRYSTAL_SEL_MHZ; //100;&lt;BR /&gt; core_clk_khz = core_clk_mhz * 1000;&lt;BR /&gt; periph_clk_khz = core_clk_khz / (((SIM_CLKDIV1 &amp;amp; SIM_CLKDIV1_OUTDIV2_MASK) &amp;gt;&amp;gt; 24)+ 1);&lt;BR /&gt; if(DSC_PRINTER_VAL == DSC_SEL_VAL)&lt;BR /&gt; {&lt;BR /&gt; &lt;BR /&gt;CLK_VAL = DSC_BAUD;&lt;BR /&gt; SIM_SOPT5 |= SIM_SOPT5_UART0RXSRC(0x00)|SIM_SOPT5_UART0TXSRC(0x00);&lt;BR /&gt;&lt;BR /&gt; /************************************************************/&lt;BR /&gt; SIM_SCGC4 &amp;amp;= SIM_SCGC4_UART0_UNMASK; //CLOCK For UART0 Get Disable&lt;BR /&gt; UART_C2_REG(UART0_BASE_PTR) &amp;amp;= ~(UART_C2_TE_MASK | UART_C2_RE_MASK ); // DisableUART0&lt;BR /&gt; UART_C1_REG(UART0_BASE_PTR) = 0x00; /* We need all default settings, so entire register is cleared */&lt;BR /&gt; /************************************************************/&lt;BR /&gt; PORTB_PCR17 = PORT_PCR_MUX(0x3); //TX //PTB17 DSP_TXD UART0 //VBC 16th Feb. 2017&lt;BR /&gt; PORTB_PCR16 = PORT_PCR_MUX(0x3); //RX //PTB16 DSP_RXD UART0 //VBC 16th Feb. 2017&lt;BR /&gt; //OLD uart_init (UART0_BASE_PTR, periph_clk_khz, TERMINAL_BAUD); //UART3_BASE_PTR &lt;BR /&gt; uart_init (UART0_BASE_PTR, core_clk_khz, DSC_BAUD); //UART3_BASE_PTR - Updated 11-1-19 &lt;BR /&gt; &lt;BR /&gt;enable_irq(31); //FOR UART0 module&lt;BR /&gt; set_irq_priority(31,7); //Set priority&lt;BR /&gt; }&lt;BR /&gt; else if(DSC_PRINTER_VAL == PRINTER_SELECTION_VAL )&lt;BR /&gt; {&lt;BR /&gt; //DSC_SELECTED_OPERATION = 0;&lt;BR /&gt; CLK_VAL = TERMINAL_BAUD;&lt;BR /&gt; /************************************************************/&lt;BR /&gt; SIM_SCGC4 &amp;amp;= SIM_SCGC4_UART0_UNMASK; //CLOCK For UART0 Get Disable&lt;BR /&gt; UART_C2_REG(UART0_BASE_PTR) &amp;amp;= ~(UART_C2_TE_MASK | UART_C2_RE_MASK ); // DisableUART0&lt;BR /&gt; UART_C1_REG(UART0_BASE_PTR) = 0x00; /* We need all default settings, so entire register is cleared */&lt;BR /&gt; /************************************************************/&lt;BR /&gt; PORTA_PCR14 = PORT_PCR_MUX(0x3); //TX&lt;BR /&gt; PORTA_PCR15 = PORT_PCR_MUX(0x3); //RX&lt;BR /&gt; &lt;BR /&gt; uart_init (UART0_BASE_PTR, core_clk_khz, TERMINAL_BAUD); //UART3_BASE_PTR&lt;BR /&gt;&lt;BR /&gt; enable_irq(31); //FOR UART0 module&lt;BR /&gt; set_irq_priority(31,7); //Set priority&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; {&lt;BR /&gt;&lt;BR /&gt; CLK_VAL = TERMINAL_BAUD;&lt;BR /&gt; SIM_SCGC4 &amp;amp;= SIM_SCGC4_UART0_UNMASK; //CLOCK For UART0 Get Disable&lt;BR /&gt; UART_C2_REG(UART0_BASE_PTR) &amp;amp;= ~(UART_C2_TE_MASK | UART_C2_RE_MASK ); // DisableUART0&lt;BR /&gt; UART_C1_REG(UART0_BASE_PTR) = 0x00; /* We need all default settings, so entire register is cleared */&lt;BR /&gt; /************************************************************/&lt;BR /&gt; PORTB_PCR17 = PORT_PCR_MUX(0x3); //TX //PTB17 DSP_TXD UART0 //VBC 16th Feb. 2017&lt;BR /&gt; PORTB_PCR16 = PORT_PCR_MUX(0x3); //RX //PTB16 DSP_RXD UART0 //VBC 16th Feb. 2017&lt;BR /&gt; //OLD uart_init (UART0_BASE_PTR, periph_clk_khz, TERMINAL_BAUD); //UART3_BASE_PTR &lt;BR /&gt; uart_init (UART0_BASE_PTR, core_clk_khz, DSC_BAUD); //UART3_BASE_PTR - Updated 11-1-19 &lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; enable_irq(31); //FOR UART3 module&lt;BR /&gt; set_irq_priority(31,7); //Set priority&lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt;/* Enable receiver and transmitter */&lt;BR /&gt; UART_C2_REG(UART0_BASE_PTR) |= (UART_C2_TE_MASK | UART_C2_RE_MASK | UART_C2_RIE_MASK| UART_RWFIFO_RXWATER(2));&lt;BR /&gt; sysclk_Cal = CLK_VAL; //Init required for UART init while config&lt;BR /&gt; &lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/************************************************************************************************************/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Note that&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"DSC_PRINTER_VAL " is Use&amp;nbsp; For UART 0&amp;nbsp; on PORT B 16 and 17&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"PRINTER_SELECTION_VAL&amp;nbsp;"&amp;nbsp;is Use&amp;nbsp; For UART 0&amp;nbsp; on PORT A 14 and 15&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please give me solution for same Problem&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2019 15:26:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK-64-UART0/m-p/888507#M52568</guid>
      <dc:creator>chaitanyakulkar</dc:creator>
      <dc:date>2019-01-21T15:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: MK 64 UART0</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK-64-UART0/m-p/888508#M52569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please Send us replay, we need Support ASAP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2019 03:49:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK-64-UART0/m-p/888508#M52569</guid>
      <dc:creator>chaitanyakulkar</dc:creator>
      <dc:date>2019-01-23T03:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: MK 64 UART0</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK-64-UART0/m-p/888509#M52570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that your solution is far too complicated and is thus the main source of your difficulties.&lt;/P&gt;&lt;P&gt;To change a UART from one pin set to another you just need to do:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1. Disable the receiver&lt;/P&gt;&lt;P&gt;2. Set the original pins to their GPIO function&lt;BR /&gt;3. Set the new pins to their UART function&lt;BR /&gt;4. Re-enable the receiver&lt;BR /&gt;&lt;BR /&gt;The receiver disable is optional but may stop a spurious character being received during the change.&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;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Complete K64 solutions, training and support:http://www.utasker.com/kinetis.html&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Kinetis K64:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- &lt;A href="http://www.utasker.com/kinetis/FRDM-K64F.html" target="test_blank"&gt;http://www.utasker.com/kinetis/FRDM-K64F.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- &lt;A href="http://www.utasker.com/kinetis/TWR-K64F120M.html" target="test_blank"&gt;http://www.utasker.com/kinetis/TWR-K64F120M.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- &lt;A href="http://www.utasker.com/kinetis/TEENSY_3.5.html" target="test_blank"&gt;http://www.utasker.com/kinetis/TEENSY_3.5.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- &lt;A href="http://www.utasker.com/kinetis/Hexiwear-K64F.html" target="test_blank"&gt;http://www.utasker.com/kinetis/Hexiwear-K64F.html&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2019 06:47:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK-64-UART0/m-p/888509#M52570</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2019-01-23T06:47:08Z</dc:date>
    </item>
  </channel>
</rss>

