<?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: Serial Communications not working correctly in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Serial-Communications-not-working-correctly/m-p/193700#M7645</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay I have found the cause. Jumpers J111 and J112 were not set correctly, and the wrong clock source was selected.&lt;BR /&gt;&lt;BR /&gt;I still have a problem. I am not receiving the full number of bytes.&amp;nbsp; Only getting the first one or two. The same code worked with AVR, so do not understand why.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ray.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Mar 2011 13:57:38 GMT</pubDate>
    <dc:creator>rayhall</dc:creator>
    <dc:date>2011-03-28T13:57:38Z</dc:date>
    <item>
      <title>Serial Communications not working correctly</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Serial-Communications-not-working-correctly/m-p/193699#M7644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to Freescale products, and have been using Atmel AVR in the past. I have&lt;BR /&gt;the EVB9S12XEP100 and trying to lean how things are done. I used Processor Expert&lt;BR /&gt;to create the&amp;nbsp; code for the serial communications. The code below does send data, but&lt;BR /&gt;all I get is garbage. Baud rate for code and terminal software are the same.&lt;BR /&gt;&lt;BR /&gt;This is all the code &lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.tfelectronics.com.au%2Fbin%2FTestComms.zip" rel="noopener noreferrer" target="_blank"&gt;TestComms.zip&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Ray.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;const uint8_t okay[6] = {0x24,0x4F,0x6B,0x61,0x79,0x7E};&amp;nbsp;&amp;nbsp; // "$Okay~"//------------------------ Delay ------------------------------static void delay(void) {&amp;nbsp; volatile unsigned long i;&amp;nbsp; for(i=0;i&amp;lt;50000;i++);}//---------------------- USART TxString -----------------------void USART_TxString(const uint8_t StringPtr[], uint16_t len){&amp;nbsp;&amp;nbsp; while (len--) // send len bytes&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (AS1_SendChar(*StringPtr) == ERR_OK){&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; StringPtr++;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; }}//------------------------- Main ------------------------------------void main(void){&amp;nbsp;&amp;nbsp; PE_low_level_init();&amp;nbsp;&amp;nbsp;&amp;nbsp; for(;;){&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; USART_TxString(okay, 6);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:47:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Serial-Communications-not-working-correctly/m-p/193699#M7644</guid>
      <dc:creator>rayhall</dc:creator>
      <dc:date>2020-10-29T09:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: Serial Communications not working correctly</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Serial-Communications-not-working-correctly/m-p/193700#M7645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay I have found the cause. Jumpers J111 and J112 were not set correctly, and the wrong clock source was selected.&lt;BR /&gt;&lt;BR /&gt;I still have a problem. I am not receiving the full number of bytes.&amp;nbsp; Only getting the first one or two. The same code worked with AVR, so do not understand why.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ray.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2011 13:57:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Serial-Communications-not-working-correctly/m-p/193700#M7645</guid>
      <dc:creator>rayhall</dc:creator>
      <dc:date>2011-03-28T13:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: Serial Communications not working correctly</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Serial-Communications-not-working-correctly/m-p/193701#M7646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Problem solved. Used the SendBlock function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for all the help..&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;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2011 15:37:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Serial-Communications-not-working-correctly/m-p/193701#M7646</guid>
      <dc:creator>rayhall</dc:creator>
      <dc:date>2011-03-29T15:37:26Z</dc:date>
    </item>
  </channel>
</rss>

