<?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: CF52235: UART in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CF52235-UART/m-p/125967#M287</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi UDP&lt;BR /&gt;&lt;BR /&gt;I won't try to answer all question but did see some things when comparing my code, which may help:&lt;BR /&gt;&lt;BR /&gt;1. To reset the receiver and transmitter you need to write 0x20 then 0x30 to UCR. 0x10 resets the command pointer only.&lt;BR /&gt;&lt;BR /&gt;2. I use 0x0061 for 19600 (with 60MHz clock) - also UCSR = 0xdd. Divide Value = BUS_CLOCK/19200/32&lt;BR /&gt;Are you using 30MHz clock? 49 == 0x31 and not 0x28..&lt;BR /&gt;&lt;BR /&gt;3. I think that this line is possibly faulty. MCF_INTC0_IMRL&amp;amp;=ENABLE_UART1_INT;&lt;BR /&gt;I think the bit should be inverted...? Maybe your define is already inverted though (?)&lt;BR /&gt;&lt;BR /&gt;Hope it helps&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Mark Butcher&lt;BR /&gt;&lt;A href="https://community.nxp.com/www.mjbc.ch" target="test_blank"&gt;www.mjbc.ch&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Aug 2006 04:47:49 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2006-08-08T04:47:49Z</dc:date>
    <item>
      <title>CF52235: UART</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CF52235-UART/m-p/125966#M286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN style="font-size: 2;"&gt;Hello&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 2;"&gt;I am trying the work with the receive interrupt of the uart.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 2;"&gt;I succeeded to get an interrupt when sending data(byte) to the CF52235.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 2;"&gt;When i read the URBn register i get fault data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 2;"&gt;my initialization of the Uart regs are:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 2;"&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;#define UART_INT_LEVEL(x) ((byte)(x&amp;lt;&amp;lt;3)) #define UART_INT_PR_LEVEL(x) (x)MCF_UART0_UCR=0x10;//Reset Reciver And TransmitterMCF_UART0_UIMR=0x2;//Interrupt when Receive Is ReadyMCF_GPIO_PUAPAR=0x55;//Set To Primary Function (To Uart)/* UART 0 Mode Registers */MCF_UART0_UMR = 0x13;//No Parity ,8 Bits (UMR10)//UMR20 --&amp;gt;After UMR10 It Poits To UMR20MCF_UART0_UMR = 0x7;//1 Stop Bit Normal Mode (UMR20) Must Be After UMR10MCF_UART0_UCSR=0xDD;//Clock Source (f(sys)/2)//19200 Baud Rate--&amp;gt; Divider =~49MCF_UART0_UBG1=0x0;//MSB DividerMCF_UART0_UBG2=0x28;//LSB DividerMCF_UART0_UCR=0x5;//Enable Transmit&amp;amp;Receive//Enable Interrupt Of Uart (Not The MaskAll)MCF_INTC0_IMRL&amp;amp;=ENABLE_UART1_INT;MCF_INTC0_ICR13=UART_INT_LEVEL(6)|UART_INT_PR_LEVEL(2);&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;I read the data from the MCF_UART0_URB register ( (*(vuint8 *)(&amp;amp;__IPSBAR[0x00020C])) )&lt;/P&gt;&lt;P&gt;Why is that?&lt;/P&gt;&lt;P&gt;I also did't understand how the fifo works. How i read the fifo data ? what is the fifo address (i know the URB reg)?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 1;"&gt;Alban formatted code &amp;amp; gave meaningful title&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;Message Edited by Alban on &lt;SPAN class="date_text"&gt;2006-08-07&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;09:55 AM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2006 15:47:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CF52235-UART/m-p/125966#M286</guid>
      <dc:creator>UDP</dc:creator>
      <dc:date>2006-08-07T15:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: CF52235: UART</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CF52235-UART/m-p/125967#M287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi UDP&lt;BR /&gt;&lt;BR /&gt;I won't try to answer all question but did see some things when comparing my code, which may help:&lt;BR /&gt;&lt;BR /&gt;1. To reset the receiver and transmitter you need to write 0x20 then 0x30 to UCR. 0x10 resets the command pointer only.&lt;BR /&gt;&lt;BR /&gt;2. I use 0x0061 for 19600 (with 60MHz clock) - also UCSR = 0xdd. Divide Value = BUS_CLOCK/19200/32&lt;BR /&gt;Are you using 30MHz clock? 49 == 0x31 and not 0x28..&lt;BR /&gt;&lt;BR /&gt;3. I think that this line is possibly faulty. MCF_INTC0_IMRL&amp;amp;=ENABLE_UART1_INT;&lt;BR /&gt;I think the bit should be inverted...? Maybe your define is already inverted though (?)&lt;BR /&gt;&lt;BR /&gt;Hope it helps&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Mark Butcher&lt;BR /&gt;&lt;A href="https://community.nxp.com/www.mjbc.ch" target="test_blank"&gt;www.mjbc.ch&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Aug 2006 04:47:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CF52235-UART/m-p/125967#M287</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2006-08-08T04:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: CF52235: UART</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CF52235-UART/m-p/125968#M288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Thanks for the help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem was wrong CPU bus frequency.&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, 08 Aug 2006 21:49:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/CF52235-UART/m-p/125968#M288</guid>
      <dc:creator>UDP</dc:creator>
      <dc:date>2006-08-08T21:49:43Z</dc:date>
    </item>
  </channel>
</rss>

