<?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 [MC9S08] uart + RS485 problem in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/MC9S08-uart-RS485-problem/m-p/198544#M7380</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi everyone, i've been trying to set up communication between my board and laptop using sci, max481 and usb&amp;lt;-&amp;gt;rs485 converter. I set in terminal, converter and component in PE like this: 9600 baud, none parity checking, one stop bit. I enabled interrupts from errors, tx and rx. Starting the program in debugger i checked that when data is received, RDRF bit is set (data is in SCIxD register), but immediately Interrupt on Error is requested and Framing Error bit is set. While this interrupt is being services also bit OR in SCIxS1 is set. Then all of them are cleared. And that's what happen all the time. I've got no idea what is going on. Maybe it must by done in other way, I not really familiar with CW an hc9s08 uCs. If any code or details needed, write please. I'd appreciate any help, Best regards Mishup&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 09 May 2010 17:03:25 GMT</pubDate>
    <dc:creator>Mishup</dc:creator>
    <dc:date>2010-05-09T17:03:25Z</dc:date>
    <item>
      <title>[MC9S08] uart + RS485 problem</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/MC9S08-uart-RS485-problem/m-p/198544#M7380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi everyone, i've been trying to set up communication between my board and laptop using sci, max481 and usb&amp;lt;-&amp;gt;rs485 converter. I set in terminal, converter and component in PE like this: 9600 baud, none parity checking, one stop bit. I enabled interrupts from errors, tx and rx. Starting the program in debugger i checked that when data is received, RDRF bit is set (data is in SCIxD register), but immediately Interrupt on Error is requested and Framing Error bit is set. While this interrupt is being services also bit OR in SCIxS1 is set. Then all of them are cleared. And that's what happen all the time. I've got no idea what is going on. Maybe it must by done in other way, I not really familiar with CW an hc9s08 uCs. If any code or details needed, write please. I'd appreciate any help, Best regards Mishup&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 May 2010 17:03:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/MC9S08-uart-RS485-problem/m-p/198544#M7380</guid>
      <dc:creator>Mishup</dc:creator>
      <dc:date>2010-05-09T17:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: [MC9S08] uart + RS485 problem</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/MC9S08-uart-RS485-problem/m-p/198545#M7381</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;Are you using an internal clock source for your BUSCLK? and is it calibrated?&lt;/P&gt;&lt;P&gt;Baudrate misamtch is the most common cause of framing errors. The overrun could be becasue you are not handling the FE properly. Some code would be useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 May 2010 04:19:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/MC9S08-uart-RS485-problem/m-p/198545#M7381</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2010-05-10T04:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: [MC9S08] uart + RS485 problem</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/MC9S08-uart-RS485-problem/m-p/198546#M7382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I don't know if I understood You correctly. In CPU component I set High Speed Box on internal clock and Internal Bus Clock at 16 MHz. I don't see in SCI component (nor in registers) possibility to change clock for this module. This is how I handle interrupt errors: void uart_com_OnError(void) { led_ctrl_ClrBit(0); (void)SCI1S1; (void)SCI1D; } That's all. Anything else I configured with PE components library I am beginner in this stuff, so please be understanding. Mishup&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 May 2010 18:13:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/MC9S08-uart-RS485-problem/m-p/198546#M7382</guid>
      <dc:creator>Mishup</dc:creator>
      <dc:date>2010-05-10T18:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: [MC9S08] uart + RS485 problem</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/MC9S08-uart-RS485-problem/m-p/198547#M7383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know if I understood You correctly. In CPU component I set High Speed Box on internal clock and Internal Bus Clock at 16 MHz. I don't see in SCI component (nor in registers) possibility to change clock for this module.&lt;/P&gt;&lt;P&gt;This is how I handle interrupt errors:&lt;/P&gt;&lt;P&gt;void uart_com_OnError(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;led_ctrl_ClrBit(0);&lt;/P&gt;&lt;P&gt;(void)SCI1S1;&lt;/P&gt;&lt;P&gt;(void)SCI1D;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;That's all. Anything else I configured with PE components library I am beginner in this stuff, so please be understanding.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for doubling.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mishup&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 May 2010 18:26:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/MC9S08-uart-RS485-problem/m-p/198547#M7383</guid>
      <dc:creator>Mishup</dc:creator>
      <dc:date>2010-05-10T18:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: [MC9S08] uart + RS485 problem</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/MC9S08-uart-RS485-problem/m-p/198548#M7384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;(void)SCI1S1; (void)SCI1D; void == do nothing. The above code are so called null statements. To actually clear the flags, do like this: volatile uint8_t dummy; dummy = SCI1S1; dummy = SCI1D&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 May 2010 13:29:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/MC9S08-uart-RS485-problem/m-p/198548#M7384</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2010-05-12T13:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: [MC9S08] uart + RS485 problem</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/MC9S08-uart-RS485-problem/m-p/198549#M7385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Lundin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I have previously used expressions like&lt;/P&gt;&lt;P&gt;SCI1S1;&lt;/P&gt;&lt;P&gt;CW&amp;nbsp;does&amp;nbsp;appear to generate the required code, at least with the default compiler options,&amp;nbsp;possibly&amp;nbsp;LDA SCI1S1.&amp;nbsp; The void cast eliminates a compiler warning because the value is not assigned to a variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it works, why make&amp;nbsp;the code&amp;nbsp;more complex by creating a dummy local variable?&amp;nbsp; Why your variable need to be volatile escapes me - is this also to avoid a compiler warning message?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 May 2010 19:51:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/MC9S08-uart-RS485-problem/m-p/198549#M7385</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-05-13T19:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: [MC9S08] uart + RS485 problem</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/MC9S08-uart-RS485-problem/m-p/198550#M7386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;The volatile dummy variable is there to ensure that the register is actually read no matter which optimizer settings that are active, or which C compiler that is used. If you just write SCIS1; you are the mercy of implementation-specific behavior and the code isn't portable between Codewarrior projects or to other compilers.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 May 2010 19:59:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/MC9S08-uart-RS485-problem/m-p/198550#M7386</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2010-05-18T19:59:49Z</dc:date>
    </item>
  </channel>
</rss>

