<?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: MPC5748G 9 bit frame uart mode in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-9-bit-frame-uart-mode/m-p/470494#M1933</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;your observation is correct. This is how it works on MPC5748G. &lt;/P&gt;&lt;P&gt;Switching to initialization mode doesn’t make sense, so it will be necessary to find another workaround. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;UART mode supports 16bit data frame. You can use only first 9 bits to fill the date and the rest of data bits force to ‘1’. Then it will transmit: &lt;/P&gt;&lt;P&gt;start bit + 9bit data + the rest of the data bits (all ‘1’) + stop bit &lt;/P&gt;&lt;P&gt;For the device on other side, it will look like 9bit data frame. There will be just certain delay between the frames when all the remaining ‘1’ are sent in the frame. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the receiver – if you can ensure that device sends frames to MPC5748G with sufficient delay (length of 8 data bit, at least) then you can use the same method. The receiver on MPC5748G will receive 9bit frame and you will see that bits in the rest of frame are all ‘1’. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can’t ensure that there’s sufficient delay between the frames, it will be necessary to emulate the receiver by software. I can see two options:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Connect RX signal to a pin that supports external interrupt. Once falling edge (start bit) comes to this pin, interrupt will be triggered. In this interrupt, disable the external interrupt and start a timer that will trigger another interrupts which will be triggered in the middle of each data bit. Sample the input pin in each timer interrupt handler. Once all bits are sampled, disable timer and enable external interrupt again. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Second option is the same as above but you can use timer to trigger DMA transfer to sample the input pin. Once all samples are taken, DMA can trigger interrupt which says that new frame is already available. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Jan 2016 11:03:10 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2016-01-07T11:03:10Z</dc:date>
    <item>
      <title>MPC5748G 9 bit frame uart mode</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-9-bit-frame-uart-mode/m-p/470490#M1929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Issue:&amp;nbsp; 9-bit frames with MPC5748G solution or work-around?&lt;/P&gt;&lt;P&gt;Message from customer below&lt;/P&gt;&lt;P&gt;--Brad&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P class="MsoNormal"&gt;In some of our communications using the MC9S12XDP512 processor we use the 9-bit frames of the UART for RS-485 communications.&amp;nbsp; Below is some documentation regarding this feature for the MC9SXDP512 processor.&amp;nbsp; In 9-bit frame mode the 9&lt;SUP&gt;th&lt;/SUP&gt; bit can be configured as a parity bit or data bit.&amp;nbsp; There are registers that can be accessed for the transmit and receive of the 9&lt;SUP&gt;th&lt;/SUP&gt; bit that are easy to access by software.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/120940i9A6A0296F8BA22E0/image-size/large?v=v2&amp;amp;px=999" title="124562_124562.png" alt="124562_124562.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/36040iD8F4AFB785991BA9/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="MsoNormal"&gt;In porting the software from the MC9S12XDP512 processor to the new MPC5748G processor the documentation for the MPC5748G states that the core supports 9-bit frames, but then states that the ninth bit should be a parity bit (page 1931 of the MPC5748GRM.pdf, version 4 document).&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/120941iD5909106D3F04ADB/image-size/large?v=v2&amp;amp;px=999" title="124563_124563.png" alt="124563_124563.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/36119iA26E5D0B89F61C43/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="MsoNormal" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="MsoNormal"&gt;Question:&amp;nbsp; When sending data, it is possible to force a bit of 0 or 1 for the parity bit through the PC[1:0] bits of the LINFlexDx_UARTCR register; however this requires going into initialization mode which is in a different register for changing the UART bit value every time the bit needs to be changed for transmitting data.&amp;nbsp; Below are the control bits of the LINFlexDx_UARTCR register for setting the 9&lt;SUP&gt;th&lt;/SUP&gt; bit value.&lt;/P&gt;&lt;P class="MsoNormal"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/120942i24472187C321771D/image-size/large?v=v2&amp;amp;px=999" title="124564_124564.png" alt="124564_124564.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/36172i837742A64B0164A3/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="MsoNormal" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="MsoNormal"&gt;In regards to receiving data from the UART for 9 bit frames there doesn’t seem to be anyway to examine the bit value of the parity bit (9&lt;SUP&gt;th&lt;/SUP&gt; bit) but in the MC9S12XDP512 processor one can.&amp;nbsp; The LINFlexDx_UARTSR has the PE bit flags that indicate a parity error for received data.&amp;nbsp; It would be helpful if these bits could be configured to give the 9&lt;SUP&gt;th&lt;/SUP&gt; bit value instead, perhaps.&lt;/P&gt;&lt;P class="MsoNormal" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="MsoNormal"&gt;For such a high powered processor I’m a bit surprised that the parity bit cannot be used as a data bit in 9-bit frames.&amp;nbsp;&amp;nbsp;&amp;nbsp; Freescale processors supported this feature in the past and so do other chip manufactures as well.&lt;/P&gt;&lt;P class="MsoNormal" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="MsoNormal"&gt;For our purposes I think we can make the current UART hardware for the MPC5748G processor work for our application, but I wanted to comment to NXP about this issue as this core is really impressive.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2016 00:34:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748G-9-bit-frame-uart-mode/m-p/470490#M1929</guid>
      <dc:creator>bonzo</dc:creator>
      <dc:date>2016-01-06T00:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5748G 9 bit frame uart mode</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-9-bit-frame-uart-mode/m-p/470491#M1930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;SPAN style="font-weight: bold; font-size: 12.6px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;A href="https://community.nxp.com/people/bonzo"&gt;bonzo&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 12.6px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 12.6px;"&gt;Seems this is not a question on i.mx chip for MPU space.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 12.6px;"&gt;Any comments?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 12.6px;"&gt;B.R.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 12.6px;"&gt;Ada&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2016 05:34:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748G-9-bit-frame-uart-mode/m-p/470491#M1930</guid>
      <dc:creator>ada_lu</dc:creator>
      <dc:date>2016-01-06T05:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5748G 9 bit frame uart mode</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-9-bit-frame-uart-mode/m-p/470492#M1931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The main page for MPU support says iMX and Vybrid.&amp;nbsp; I believe MPC5748 is a Vybrid.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2016 17:27:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748G-9-bit-frame-uart-mode/m-p/470492#M1931</guid>
      <dc:creator>bonzo</dc:creator>
      <dc:date>2016-01-06T17:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5748G 9 bit frame uart mode</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-9-bit-frame-uart-mode/m-p/470493#M1932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/bonzo"&gt;bonzo&lt;/A&gt;​, this&amp;nbsp; is not a Vybrid part.&amp;nbsp; Can you remove the&amp;nbsp; customer name? Then let me know to move it to&amp;nbsp; &lt;A href="https://community.nxp.com/space/11357"&gt;S32 Automotive Processors&lt;/A&gt;&amp;nbsp; where&amp;nbsp; TIC&amp;nbsp; team will support it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2016 18:38:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748G-9-bit-frame-uart-mode/m-p/470493#M1932</guid>
      <dc:creator>karina_valencia</dc:creator>
      <dc:date>2016-01-06T18:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5748G 9 bit frame uart mode</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-9-bit-frame-uart-mode/m-p/470494#M1933</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;your observation is correct. This is how it works on MPC5748G. &lt;/P&gt;&lt;P&gt;Switching to initialization mode doesn’t make sense, so it will be necessary to find another workaround. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;UART mode supports 16bit data frame. You can use only first 9 bits to fill the date and the rest of data bits force to ‘1’. Then it will transmit: &lt;/P&gt;&lt;P&gt;start bit + 9bit data + the rest of the data bits (all ‘1’) + stop bit &lt;/P&gt;&lt;P&gt;For the device on other side, it will look like 9bit data frame. There will be just certain delay between the frames when all the remaining ‘1’ are sent in the frame. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the receiver – if you can ensure that device sends frames to MPC5748G with sufficient delay (length of 8 data bit, at least) then you can use the same method. The receiver on MPC5748G will receive 9bit frame and you will see that bits in the rest of frame are all ‘1’. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can’t ensure that there’s sufficient delay between the frames, it will be necessary to emulate the receiver by software. I can see two options:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Connect RX signal to a pin that supports external interrupt. Once falling edge (start bit) comes to this pin, interrupt will be triggered. In this interrupt, disable the external interrupt and start a timer that will trigger another interrupts which will be triggered in the middle of each data bit. Sample the input pin in each timer interrupt handler. Once all bits are sampled, disable timer and enable external interrupt again. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Second option is the same as above but you can use timer to trigger DMA transfer to sample the input pin. Once all samples are taken, DMA can trigger interrupt which says that new frame is already available. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2016 11:03:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748G-9-bit-frame-uart-mode/m-p/470494#M1933</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2016-01-07T11:03:10Z</dc:date>
    </item>
  </channel>
</rss>

